Re: Need to know the reason why GCC able to compile

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

 



(You don't need to CC gcc-help@xxxxxxx, that address forwards to
gcc-help@xxxxxxxxxxx anyway)


On 16 May 2013 13:53, naveen yadav wrote:
>
> 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

What don't you understand about the error?

http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html shows how to use
such an array, but if it isn't hte last member of the struct you can't
do that.





[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