c/6024: GCC fails to diagnose mismatch of enum types in prototype/function

rearnsha@arm.com rearnsha@arm.com
Thu Mar 21 03:06:00 GMT 2002


>Number:         6024
>Category:       c
>Synopsis:       GCC fails to diagnose mismatch of enum types in prototype/function
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 21 03:06:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        unknown-1.0
>Organization:
>Environment:
All gcc targets
>Description:
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.

enum e1 {a, b};
enum e2 {c, d};

void f(enum e1);

void f(x)
  enum e2 x;
{
  return;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list