c/6024: GCC fails to diagnose mismatch of enum types in prototype/function
Joseph S. Myers
jsm28@cam.ac.uk
Thu Mar 21 06:39:00 GMT 2002
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
More information about the Gcc-bugs
mailing list