This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Committed] New g++ warning for inner-style forward class declarations


Simon Baldwin <simonb@google.com> writes:

> Committed as revision 126219.
>
> Attached is a patch to add a new warning to g++ for inner-style forward
> class declarations that the compiler has ignored.  For example:
>
>  struct Foo::Bar;  // Error, class Foo is not complete
>  struct Foo { struct Bar {}; };
>  struct Foo::Bar;  // No error, but pointless since Foo is complete
>
> This patch adds a warning for the second use of 'struct Foo::Bar;' for
> contexts where it is not an error, only an irrelevance.  This matches a
> similar message emitted by the EDG parser (in Comeau C++, for example).
>
> The patch includes a new test, to verify that the warning is emitted by
> g++ when required, and also that g++ finds no false positives.
>
> Regression tested with bootstrap and with the full g++ testsuite.

Who approved this commit?  From your email it's not clear whether
anybody approved it - and since this is not a followup to a previous
email, it's difficult to check myself,

Andreas
-- 
 Andreas Jaeger, Director Platform / openSUSE, aj@suse.de
  SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
   Maxfeldstr. 5, 90409 Nürnberg, Germany
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]