public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28513]  New: QOI: Diagnostic missing since 3.3.x when naming rule is violated
@ 2006-07-27 16:45 rleigh at debian dot org
  2006-07-29  5:24 ` [Bug c++/28513] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: rleigh at debian dot org @ 2006-07-27 16:45 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

class foo {
public:
  typedef int bar;
};

class baz {
public:
  foo::bar foo;
};

With G++ 3.3.6, this errors out with this diagnostic:
$ g++-3.3 -pedantic -Wall -Wcast-align -Wwrite-strings -Wswitch-default
-Wcast-qual -Wunused-variable -Wredundant-decls -Wctor-dtor-privacy
-Wnon-virtual-dtor -Wreorder -Wold-style-cast -Woverloaded-virtual
-fstrict-aliasing -c foo.cc
foo.cc:8: error: declaration of `int baz::foo'
foo.cc:1: error: changes meaning of `foo' from `class foo'

With G++ 3.4, 4.0, 4.1 and 4.2 (current CVS), no diagnostic is issued.
A diagnostic is not strictly required by the standard (§3.3.6,
basic.scope.class), but would be very useful.

Regards,
Roger


-- 
           Summary: QOI: Diagnostic missing since 3.3.x when naming rule is
                    violated
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rleigh at debian dot org
 GCC build triplet: powerpc-linux-gnu
  GCC host triplet: powerpc-linux-gnu
GCC target triplet: powerpc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28513


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-04-29 15:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-27 16:45 [Bug c++/28513] New: QOI: Diagnostic missing since 3.3.x when naming rule is violated rleigh at debian dot org
2006-07-29  5:24 ` [Bug c++/28513] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-07-31 23:37 ` mmitchel at gcc dot gnu dot org
2006-09-05 23:15 ` jason at gcc dot gnu dot org
2007-02-03 18:10 ` [Bug c++/28513] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
2007-02-03 18:35 ` gdr at gcc dot gnu dot org
2007-02-03 20:42 ` pinskia at gcc dot gnu dot org
2007-02-14  9:32 ` mmitchel at gcc dot gnu dot org
2007-12-17 15:03 ` manu at gcc dot gnu dot org
2008-07-04 21:27 ` [Bug c++/28513] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-11-03 10:45 ` manu at gcc dot gnu dot org
2008-11-20 19:35 ` jason at gcc dot gnu dot org
2008-11-20 20:26 ` jason at gcc dot gnu dot org
2008-11-20 20:28 ` jason at gcc dot gnu dot org
2009-04-29 15:21 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).