This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [no-commit-intention] Naive unnamed fields for main_type [Re: [patch] Fix gdb-gdb.py for flds_bnds copy-pastes]
On Fri, 10 Feb 2012 20:21:43 +0100, Tom Tromey wrote:
> As to the original problem, anonymous unions are a GCC extension, now in
> C11 -- but not in C99:
>
> barimba. echo 'struct { int a; struct { int b; }; } s;'|gcc --syntax-only -x c - -Wall -std=c99 -pedantic
> <stdin>:1:34: warning: ISO C99 doesn’t support unnamed structs/unions [-pedantic]
>
> So moving to C99 wouldn't help that.
In GCC PR c/52182 Joseph S. Myers explained me my ISO C99 misread, that GCC is
right with this error.
Thanks,
Jan