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

* [Bug c++/28513] [4.0/4.1/4.2 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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 ` pinskia at gcc dot gnu dot org
  2006-07-31 23:37 ` mmitchel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-29  5:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-07-29 05:24 -------
Confirmed, I was the one who recommended that Roger file this bug.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|powerpc-linux-gnu           |
   GCC host triplet|powerpc-linux-gnu           |
 GCC target triplet|powerpc-linux-gnu           |
           Keywords|                            |accepts-invalid
      Known to fail|                            |4.0.0 4.1.0 4.2.0
      Known to work|                            |3.2.3 3.3.3
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-29 05:24:31
               date|                            |
            Summary|QOI: Diagnostic missing     |[4.0/4.1/4.2 Regression]
                   |since 3.3.x when naming rule|QOI: Diagnostic missing
                   |is violated                 |since 3.3.x when naming rule
                   |                            |is violated
   Target Milestone|---                         |4.0.4


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


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

* [Bug c++/28513] [4.0/4.1/4.2 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-31 23:37 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/28513] [4.0/4.1/4.2 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-09-05 23:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jason at gcc dot gnu dot org  2006-09-05 23:14 -------
I guess this warning was never implemented in the new parser.


-- 


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


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

* [Bug c++/28513] [4.0/4.1/4.2/4.3 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (2 preceding siblings ...)
  2006-09-05 23:15 ` jason at gcc dot gnu dot org
@ 2007-02-03 18:10 ` gdr at gcc dot gnu dot org
  2007-02-03 18:35 ` gdr at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 18:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from gdr at gcc dot gnu dot org  2007-02-03 18:10 -------
Won't fix in GCC-4.0.x.  Adjustig milestone.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.4                       |4.1.3


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


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

* [Bug c++/28513] [4.0/4.1/4.2/4.3 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (3 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 18:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from gdr at gcc dot gnu dot org  2007-02-03 18:35 -------
Won't fix in GCC-4.0.x.  Adjustig milestone.


-- 


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


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

* [Bug c++/28513] [4.0/4.1/4.2/4.3 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (4 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-03 20:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.3                       |4.1.2


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


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

* [Bug c++/28513] [4.0/4.1/4.2/4.3 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (5 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:32 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug c++/28513] [4.0/4.1/4.2/4.3 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (6 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-12-17 15:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from manu at gcc dot gnu dot org  2007-12-17 15:02 -------
(In reply to comment #2)
> I guess this warning was never implemented in the new parser.
> 

It is a pedwarn in class.c (note_name_declared_in_class). The following invokes
it:

class foo {
public:
  typedef int bar;
};


class baz {
public:
  foo foo;
};


The difference is that in cp_parser_simple_type_specifier 'foo::bar' does not
invoke maybe_note_name_used_in_class, while just 'foo' does.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org


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


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

* [Bug c++/28513] [4.2/4.3/4.4 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (7 preceding siblings ...)
  2007-12-17 15:03 ` manu at gcc dot gnu dot org
@ 2008-07-04 21:27 ` jsm28 at gcc dot gnu dot org
  2008-11-03 10:45 ` manu at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 21:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2008-07-04 21:26 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3/4.4 Regression]|[4.2/4.3/4.4 Regression]
                   |QOI: Diagnostic missing     |QOI: Diagnostic missing
                   |since 3.3.x when naming rule|since 3.3.x when naming rule
                   |is violated                 |is violated
   Target Milestone|4.1.3                       |4.2.5


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


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

* [Bug c++/28513] [4.2/4.3/4.4 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (8 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-11-03 10:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from manu at gcc dot gnu dot org  2008-11-03 10:43 -------
Is this really accepts-invalid? 

As the original description says, a diagnostic is not even required by the
standard...


-- 


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


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

* [Bug c++/28513] [4.2/4.3/4.4 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (9 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-11-20 19:35 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-08-06 14:41:06         |2008-11-20 19:34:25
               date|                            |


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


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

* [Bug c++/28513] [4.2/4.3/4.4 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (10 preceding siblings ...)
  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
  13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-11-20 20:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jason at gcc dot gnu dot org  2008-11-20 20:24 -------
Subject: Bug 28513

Author: jason
Date: Thu Nov 20 20:23:32 2008
New Revision: 142056

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142056
Log:
        PR c++/28513
        * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.

Added:
    trunk/gcc/testsuite/g++.dg/lookup/name-clash7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28513] [4.2/4.3/4.4 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (11 preceding siblings ...)
  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
  13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-11-20 20:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jason at gcc dot gnu dot org  2008-11-20 20:27 -------
Fixed for 4.4.  Reopen if you'd like to see it fixed in 4.3 or 4.2.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|3.2.3 3.3.3                 |3.2.3 3.3.3 4.4.0
         Resolution|                            |FIXED


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


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

* [Bug c++/28513] [4.2/4.3/4.4 Regression] QOI: Diagnostic missing since 3.3.x when naming rule is violated
  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
                   ` (12 preceding siblings ...)
  2008-11-20 20:28 ` jason at gcc dot gnu dot org
@ 2009-04-29 15:21 ` pinskia at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-29 15:21 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.5                       |4.4.0


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).