This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -traditional warning fix in pushdecl
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: -traditional warning fix in pushdecl
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 23 May 2000 13:47:46 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <200005192303.AAA23440@phal.cygnus.co.uk>you write:
> In the pushdecl -traditional code to determine if a warning for a external
> declaration with a non-global type is in place, when you changed the
> TYPE_PERMANENT test to use TYPE_CONTEXT instead, you forgot to inverse the
> sense of the test. This causes -traditional to warn about all kinds of
> innocent declarations, including all the built-in ones.
>
> FWIW, I've checked that the fixed TYPE_CONTEXT actually catches what it
> is supposed to catch. Most visible non-global types still have no
> TYPE_CONTEXT at the time pushdecl is called, since the actual context is
> only set in popdecl, just when they go out of scope. However, struct
> tags get a tentative context in pushtag. That's good enough for our
> purposes.
> We've never warned about using local typedefs as such because it's the
> type that they stand for that we look at, not the typedef itself.
>
> Fri May 19 23:42:03 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
>
> * c-decl.c (pushdecl): Remove bogus inversion in TYPE_CONTEXT test.
I believe Zack checked in an identical fix earlier today.
jeff