This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/6024: GCC fails to diagnose mismatch of enum types inprototype/function
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: <rearnsha at arm dot com>
- Cc: <gcc-gnats at gcc dot gnu dot org>, <gcc-bugs at gcc dot gnu dot org>
- Date: Thu, 21 Mar 2002 11:15:46 +0000 (GMT)
- Subject: Re: c/6024: GCC fails to diagnose mismatch of enum types inprototype/function
On 21 Mar 2002 rearnsha@arm.com wrote:
> Gcc fails to diagnose when an enum type in a prototype
> fails to match the enum type in a function declation.
> >How-To-Repeat:
> Compile the following code, GCC compiles it without error: it
> should generate a diagnostic.
The types are compatible, which means these declarations are OK. (Unless
you use -fshort-enums, in which case the type in the prototype disagrees
with the promoted type from the non-prototype definition.)
--
Joseph S. Myers
jsm28@cam.ac.uk