public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations
@ 2003-12-19 18:32 giovannibajo at libero dot it
  2003-12-19 18:36 ` [Bug c++/13451] " giovannibajo at libero dot it
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2003-12-19 18:32 UTC (permalink / raw)
  To: gcc-bugs

Consider this:

template <class T>
struct A
{
  struct B;
  struct A::B { };    // #1
  void A::foo(void);  // #2
};

>From the standard it's not clear whether #1 and #2 should be accepted or 
rejected. We used to accept both since 2.95, but on mainline we now get a hard 
error on #1:

test.cc:5: error: too few template-parameter-lists

Looks like the injected class name confuses the parser. I rate this a 
regression because:

1) It's an unwanted change of behaviour.
2) Even if we now want to reject #1 for some reason, we need to do that with a 
proper error message. 


Then, we could discuss what to do with these. EDG rejects both saying that 
member declarations can't be qualified. For not, I assume we want to preserve 
our historical behaviour, so this is reject-valid.

-- 
           Summary: [3.4 regression] Wrong error message with qualified
                    names for member declarations
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/13451] [3.4 regression] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
@ 2003-12-19 18:36 ` giovannibajo at libero dot it
  2003-12-21 18:03 ` [Bug c++/13451] " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2003-12-19 18:36 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/13451] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
  2003-12-19 18:36 ` [Bug c++/13451] " giovannibajo at libero dot it
@ 2003-12-21 18:03 ` pinskia at gcc dot gnu dot org
  2003-12-21 18:12 ` [Bug c++/13451] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-21 18:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-21 17:35 -------
>From Phil's regression hunter: Search converges between 2002-12-27-trunk (#177) and 
2002-12-28-trunk (#178).

Removing the template part I get this error instead:
input.cc:4: error: extra qualification ignored
(also : Search converges between 2003-08-12-trunk (#370) and 2003-08-13-trunk 
(#371).)
We cannot be saying that we have a compliant compiler without getting rid these dumb 
extensions so this is not a regression so removing the target milestone.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|rejects-valid               |accepts-invalid, diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2003-12-21 17:35:52
               date|                            |
            Summary|[3.4 regression] Wrong error|Wrong error message with
                   |message with qualified names|qualified names for member
                   |for member declarations     |declarations
   Target Milestone|3.4.0                       |---


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


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

* [Bug c++/13451] [3.4 Regression] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
  2003-12-19 18:36 ` [Bug c++/13451] " giovannibajo at libero dot it
  2003-12-21 18:03 ` [Bug c++/13451] " pinskia at gcc dot gnu dot org
@ 2003-12-21 18:12 ` pinskia at gcc dot gnu dot org
  2003-12-29 18:00 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-21 18:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-21 18:07 -------
Maybe I am wrong :(.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|accepts-invalid, diagnostic |rejects-valid
            Summary|Wrong error message with    |[3.4 Regression] Wrong error
                   |qualified names for member  |message with qualified names
                   |declarations                |for member declarations
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/13451] [3.4 Regression] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
                   ` (2 preceding siblings ...)
  2003-12-21 18:12 ` [Bug c++/13451] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2003-12-29 18:00 ` pinskia at gcc dot gnu dot org
  2004-01-05  6:29 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-29 18:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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


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

* [Bug c++/13451] [3.4 Regression] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
                   ` (3 preceding siblings ...)
  2003-12-29 18:00 ` pinskia at gcc dot gnu dot org
@ 2004-01-05  6:29 ` mmitchel at gcc dot gnu dot org
  2004-01-05  6:45 ` [Bug c++/13451] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-05  6:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-01-05 06:29 -------
This is a bad error message, but correct behavior.  We should reject both #1 and
#2, and the new parser is trying to do that.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |diagnostic


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


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

* [Bug c++/13451] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
                   ` (4 preceding siblings ...)
  2004-01-05  6:29 ` mmitchel at gcc dot gnu dot org
@ 2004-01-05  6:45 ` pinskia at gcc dot gnu dot org
  2004-01-05 19:54 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-05  6:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-05 06:45 -------
Since this is not a regression really as it was not rejected by 3.x at all, removing the target 
milestone and change sverity to normal so this is a bad error message.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
            Summary|[3.4 Regression] Wrong error|Wrong error message with
                   |message with qualified names|qualified names for member
                   |for member declarations     |declarations
   Target Milestone|3.4.0                       |---


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


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

* [Bug c++/13451] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
                   ` (5 preceding siblings ...)
  2004-01-05  6:45 ` [Bug c++/13451] " pinskia at gcc dot gnu dot org
@ 2004-01-05 19:54 ` cvs-commit at gcc dot gnu dot org
  2004-01-05 19:56 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-05 19:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-05 19:54 -------
Subject: Bug 13451

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-01-05 19:54:36

Modified files:
	gcc/cp         : ChangeLog parser.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: class2.C 

Log message:
	PR c++/13451
	* parser.c (cp_parser_class_head): Reorder logic to check for
	invalid qualification.
	
	PR c++/13451
	* g++.dg/template/class2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3854&r2=1.3855
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.145&r2=1.146
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3336&r2=1.3337
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/class2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/13451] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
                   ` (6 preceding siblings ...)
  2004-01-05 19:54 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-05 19:56 ` mmitchel at gcc dot gnu dot org
  2004-01-05 20:21 ` pinskia at gcc dot gnu dot org
  2004-01-05 21:09 ` gdr at integrable-solutions dot net
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-05 19:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-01-05 19:56 -------
Fixed in GCC 3.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/13451] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
                   ` (7 preceding siblings ...)
  2004-01-05 19:56 ` mmitchel at gcc dot gnu dot org
@ 2004-01-05 20:21 ` pinskia at gcc dot gnu dot org
  2004-01-05 21:09 ` gdr at integrable-solutions dot net
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-05 20:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/13451] Wrong error message with qualified names for member declarations
  2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
                   ` (8 preceding siblings ...)
  2004-01-05 20:21 ` pinskia at gcc dot gnu dot org
@ 2004-01-05 21:09 ` gdr at integrable-solutions dot net
  9 siblings, 0 replies; 11+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-05 21:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-01-05 21:09 -------
Subject: Re:  Wrong error message with qualified names for member declarations

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:


|            What    |Removed                     |Added
| ----------------------------------------------------------------------------
|    Target Milestone|---                         |3.4.0

Thanks.  Given that the clean and long term solution involves tweaking
the parser, I believe there is no possible fix for this bugs in 3.3.x.

-- Gaby


-- 


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


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

end of thread, other threads:[~2004-01-05 21:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-19 18:32 [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations giovannibajo at libero dot it
2003-12-19 18:36 ` [Bug c++/13451] " giovannibajo at libero dot it
2003-12-21 18:03 ` [Bug c++/13451] " pinskia at gcc dot gnu dot org
2003-12-21 18:12 ` [Bug c++/13451] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-12-29 18:00 ` pinskia at gcc dot gnu dot org
2004-01-05  6:29 ` mmitchel at gcc dot gnu dot org
2004-01-05  6:45 ` [Bug c++/13451] " pinskia at gcc dot gnu dot org
2004-01-05 19:54 ` cvs-commit at gcc dot gnu dot org
2004-01-05 19:56 ` mmitchel at gcc dot gnu dot org
2004-01-05 20:21 ` pinskia at gcc dot gnu dot org
2004-01-05 21:09 ` gdr at integrable-solutions dot net

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