This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ANNOUNCEMENT] GDB 7.6 released!
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 29 Apr 2013 08:32:14 +0400
- Subject: Re: [ANNOUNCEMENT] GDB 7.6 released!
- References: <announce dot 20130426140741 dot GA13837 at adacore dot com> <83k3nptk18 dot fsf at gnu dot org> <837gjotnc9 dot fsf at gnu dot org> <20130428073805 dot GU3525 at adacore dot com> <83ip36sjxd dot fsf at gnu dot org>
> > I am wondering why we are not seeing this on other platforms...
>
> Probably because I was using a _really_ old compiler (3.4.2) on the
> machine where I saw this.
This would suggest that I misunderstood the C standard regarding
enum types. I thought that the size of a C enum was determined
by the number of enumerators (ie just large enough to fit), which
would mean that the compiler would need the full enum definition
before being able to determine how to pass that enum in a function
call. But the reference draft I have says:
| Each enumerated type shall be compatible with an integer type. The
| choice of type is implementation-defined,97) but shall be capable of
| representing the values of all the members of the enumeration.
I am still a little fuzzy on what "compatible" means in terms of
constraints for the enum type. But perhaps the old compiler's
warning is overzealous; and if that's the case, I am not sure of
the value of avoiding erroneous warnings from really old compilers.
--
Joel