This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [no-commit-intention] Naive unnamed fields for main_type [Re: [patch] Fix gdb-gdb.py for flds_bnds copy-pastes]


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> `long long' is apparently not supported by ISO C90 compilers, so it
Jan> is a bug if GDB claims C90 compatibility.  Or what do you mean?

I mean that this is clearly a C90 violation.

Another question is whether some compilers accept parts of C99 but not
all of it.

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.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]