Below is a sample code to test. GCC with the option allegedly says
that the line «obj = {0};» isn't initializes «mystruct::b» member to
anything, although it really is.

struct mystruct{
        int a;
        int b[2];
};

int main(){
        mystruct obj = {1,{2,3}};
        printf("%i\n", obj.b[1]);
        obj = {0};
        printf("%i\n", obj.b[1]);
        return 0;
}

A bug?

Version: gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2

Reply via email to