public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition
@ 2004-06-23 17:00 bangerth at dealii dot org
  2004-06-23 17:19 ` [Bug c++/16162] " bangerth at dealii dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-06-23 17:00 UTC (permalink / raw)
  To: gcc-bugs

Here's a particularly bad regression on the 3.4 branch, since there does 
not seem to be a way to work around the problem. This code should be 
valid: 
-------------------- 
template <int N> struct O { 
    struct I { 
        template <typename T> struct II { 
            void f(); 
        }; 
    }; 
}; 
 
template <int N> 
template <typename T> 
void O<N>::I::II<T>::f () {} 
-------------------- 
 
However, 3.4 branch and mainline reject the code: 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc:15: error: non-template `II' used as template 
x.cc:15: error: (use `typename O<N>::I::template II' to indicate that it is a 
template) 
x.cc:15: error: expected init-declarator at end of input 
x.cc:15: error: expected `;' at end of input 
 
No fun :-(( 
 
W.

-- 
           Summary: [3.4/3.5 regression] Rejects valid member-template-
                    definition
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org,mmitchel at gcc dot gnu
                    dot org


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


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

* [Bug c++/16162] [3.4/3.5 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
@ 2004-06-23 17:19 ` bangerth at dealii dot org
  2004-06-25 10:26 ` reichelt at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-06-23 17:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.4
   Target Milestone|---                         |3.4.2


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


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

* [Bug c++/16162] [3.4/3.5 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
  2004-06-23 17:19 ` [Bug c++/16162] " bangerth at dealii dot org
@ 2004-06-25 10:26 ` reichelt at gcc dot gnu dot org
  2004-06-29 14:58 ` bangerth at dealii dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-06-25 10:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-06-25 09:46 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |monitored
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-25 09:46:15
               date|                            |


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


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

* [Bug c++/16162] [3.4/3.5 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
  2004-06-23 17:19 ` [Bug c++/16162] " bangerth at dealii dot org
  2004-06-25 10:26 ` reichelt at gcc dot gnu dot org
@ 2004-06-29 14:58 ` bangerth at dealii dot org
  2004-06-29 15:26 ` bangerth at dealii dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-06-29 14:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-06-29 14:57 -------
This may or may not be related to PR 16270 which has similar code but 
ICEs the compiler, instead of just rejecting the code. 
 
W. 

-- 


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


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

* [Bug c++/16162] [3.4/3.5 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
                   ` (2 preceding siblings ...)
  2004-06-29 14:58 ` bangerth at dealii dot org
@ 2004-06-29 15:26 ` bangerth at dealii dot org
  2004-08-29 18:45 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-06-29 15:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-06-29 15:26 -------
PR 16270 has been fixed, but the code in this PR is still rejected. In 
other words: they are not related. 
 
W. 

-- 


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


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

* [Bug c++/16162] [3.4/3.5 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
                   ` (3 preceding siblings ...)
  2004-06-29 15:26 ` bangerth at dealii dot org
@ 2004-08-29 18:45 ` mmitchel at gcc dot gnu dot org
  2004-09-14  5:45 ` [Bug c++/16162] [3.4/4.0 " cvs-commit 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-08-29 18:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-29 18:43 -------
Postponed until GCC 3.4.3.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.2                       |3.4.3


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


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

* [Bug c++/16162] [3.4/4.0 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
                   ` (4 preceding siblings ...)
  2004-08-29 18:45 ` mmitchel at gcc dot gnu dot org
@ 2004-09-14  5:45 ` cvs-commit at gcc dot gnu dot org
  2004-09-14  5:47 ` [Bug c++/16162] [3.4 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-14  5:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-14 05:44 -------
Subject: Bug 16162

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-09-14 05:44:44

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

Log message:
	PR c++/16162
	* parser.c (cp_parser_id_expression): Correct value for
	is_declarator.
	(cp_parser_nested_name_specifier_opt): Look through typenames as
	necessary.
	(cp_parser_template_name): Honor check_dependency_p.
	
	PR c++/16162
	* g++.dg/template/decl2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4282&r2=1.4283
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/decl2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4349&r2=1.4350
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.246&r2=1.247



-- 


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


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

* [Bug c++/16162] [3.4 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
                   ` (5 preceding siblings ...)
  2004-09-14  5:45 ` [Bug c++/16162] [3.4/4.0 " cvs-commit at gcc dot gnu dot org
@ 2004-09-14  5:47 ` mmitchel at gcc dot gnu dot org
  2004-09-14 12:34 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-09-14  5:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-09-14 05:47 -------
Fixed in GCC 4.0.  

I am still looking at applying this to 3.4.3, so I have not marked the PR as
fixed, yet.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.4.0 4.0                   |3.4.0
      Known to work|3.3.4                       |3.3.4 4.0.0
            Summary|[3.4/4.0 regression] Rejects|[3.4 regression] Rejects
                   |valid member-template-      |valid member-template-
                   |definition                  |definition


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


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

* [Bug c++/16162] [3.4 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
                   ` (6 preceding siblings ...)
  2004-09-14  5:47 ` [Bug c++/16162] [3.4 " mmitchel at gcc dot gnu dot org
@ 2004-09-14 12:34 ` bangerth at dealii dot org
  2004-09-14 16:13 ` cvs-commit at gcc dot gnu dot org
  2004-09-14 16:17 ` mmitchel at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-09-14 12:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-09-14 12:34 -------
Mark, since there is no workaround for this problem, I would strongly support a backport 
to the 3.4 branch! 
 
Thanks 
 W. 

-- 


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


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

* [Bug c++/16162] [3.4 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
                   ` (7 preceding siblings ...)
  2004-09-14 12:34 ` bangerth at dealii dot org
@ 2004-09-14 16:13 ` cvs-commit at gcc dot gnu dot org
  2004-09-14 16:17 ` mmitchel at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-14 16:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-14 16:13 -------
Subject: Bug 16162

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-09-14 16:13:27

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

Log message:
	PR c++/16162
	* parser.c (cp_parser_id_expression): Correct value for
	is_declarator.
	(cp_parser_nested_name_specifier_opt): Look through typenames as
	necessary.
	(cp_parser_template_name): Honor check_dependency_p.
	
	PR c++/16162
	* g++.dg/template/decl2.C: New test.
	* g++.dg/template/nested3.C: Expect inferior diagnostics.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.267&r2=1.3389.2.268
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.156&r2=1.3892.2.157
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.38&r2=1.157.2.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/decl2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nested3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2&r2=1.2.4.1



-- 


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


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

* [Bug c++/16162] [3.4 regression] Rejects valid member-template-definition
  2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
                   ` (8 preceding siblings ...)
  2004-09-14 16:13 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-14 16:17 ` mmitchel at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-09-14 16:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-09-14 16:17 -------
Fixed in GCC 3.4.3.

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


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


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

end of thread, other threads:[~2004-09-14 16:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-23 17:00 [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition bangerth at dealii dot org
2004-06-23 17:19 ` [Bug c++/16162] " bangerth at dealii dot org
2004-06-25 10:26 ` reichelt at gcc dot gnu dot org
2004-06-29 14:58 ` bangerth at dealii dot org
2004-06-29 15:26 ` bangerth at dealii dot org
2004-08-29 18:45 ` mmitchel at gcc dot gnu dot org
2004-09-14  5:45 ` [Bug c++/16162] [3.4/4.0 " cvs-commit at gcc dot gnu dot org
2004-09-14  5:47 ` [Bug c++/16162] [3.4 " mmitchel at gcc dot gnu dot org
2004-09-14 12:34 ` bangerth at dealii dot org
2004-09-14 16:13 ` cvs-commit at gcc dot gnu dot org
2004-09-14 16:17 ` mmitchel 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).