Need to know the reason why GCC able to compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

I am checking below code on gcc 4.4 and gcc 4.6

Below Code compile well.
#include<stdio.h>
int main()
{
struct a{
        int c;
        int b[];
        } d;
return 0;
}

Fail:

#include<stdio.h>
int main()
{
struct a{
        int b[];
        int c;
        } d;
return 0;
}
test.c: In function âmainâ:
test.c:5: error: flexible array member not at end of struct





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux