Need to know the reason why GCC able to compile
Jonathan Wakely
jwakely.gcc@gmail.com
Thu May 16 16:33:00 GMT 2013
(You don't need to CC gcc-help@gnu.org, that address forwards to
gcc-help@gcc.gnu.org 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.
More information about the Gcc-help
mailing list