This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/9166: [2003-01-03] C front end's type scoping not right
- From: neil at gcc dot gnu dot org
- To: gcc-gnats at gcc dot gnu dot org
- Date: 4 Jan 2003 00:32:08 -0000
- Subject: c/9166: [2003-01-03] C front end's type scoping not right
- Reply-to: neil at gcc dot gnu dot org
>Number: 9166
>Category: c
>Synopsis: [2003-01-03] C front end's type scoping not right
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 03 16:36:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: neil@gcc.gnu.org
>Release: GCC 3.4 and earlier
>Organization:
>Environment:
>Description:
/* Compile the code snippet below with -pedantic. The code
is illegal because the function f is redeclared with an incompatible prototype, but GCC doesn't winge. */
struct bar {int x, y;};
void foo ()
{
extern void f( struct bar {double x, y;} );
}
void f (struct bar );
>How-To-Repeat:
>Fix:
I doubt it's easy with the current code. Best idea is to clean up the front-end's handling of scopes; it's too messy and obfuscated.
>Release-Note:
>Audit-Trail:
>Unformatted: