public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected
@ 2004-10-26  9:53 reichelt at gcc dot gnu dot org
  2004-10-26 12:11 ` [Bug c++/18155] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-10-26  9:53 UTC (permalink / raw)
  To: gcc-bugs

The following invalid line of code is accepted since gcc 3.4.0:

=================================================
template<int> typedef struct A;
=================================================

Looks like the new parser caused this.

-- 
           Summary: [3.4/4.0 regression] typedef in template declaration not
                    rejected
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, monitored
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/18155] [3.4/4.0 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
@ 2004-10-26 12:11 ` pinskia at gcc dot gnu dot org
  2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-26 12:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-26 12:10 -------
Confirmed.
: Search converges between 2002-12-14-trunk (#159) and 2002-12-29-trunk (#160).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-26 12:10:59
               date|                            |
   Target Milestone|---                         |3.4.3


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


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

* [Bug c++/18155] [3.4/4.0 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
  2004-10-26 12:11 ` [Bug c++/18155] " pinskia at gcc dot gnu dot org
@ 2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
  2004-11-02 23:56 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01  0:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-01 00:45 -------
Postponed until GCC 3.4.4.

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


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


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

* [Bug c++/18155] [3.4/4.0 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
  2004-10-26 12:11 ` [Bug c++/18155] " pinskia at gcc dot gnu dot org
  2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
@ 2004-11-02 23:56 ` mmitchel at gcc dot gnu dot org
  2004-11-03  2:48 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-02 23:56 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/18155] [3.4/4.0 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-11-02 23:56 ` mmitchel at gcc dot gnu dot org
@ 2004-11-03  2:48 ` cvs-commit at gcc dot gnu dot org
  2004-11-03  2:56 ` [Bug c++/18155] [3.4 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-03  2:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-03 02:48 -------
Subject: Bug 18155

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-11-03 02:48:45

Modified files:
	gcc/cp         : ChangeLog parser.c typeck.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/parse: crash13.C 
Added files:
	gcc/testsuite/g++.dg/conversion: const3.C 
	gcc/testsuite/g++.dg/template: crash25.C typedef2.C 

Log message:
	PR c++/18124
	* parser.c (cp_parser_type_parameter): Robustify.
	
	PR c++/18155
	* parser.c (cp_parser_single_declaration): Disallow template
	typedefs.
	
	PR c++/18177
	* typeck.c (build_const_cast): Use error_operand_p.
	
	PR c++/18124
	* g++.dg/template/crash25.C: New test.
	
	PR c++/18155
	* g++.dg/template/typedef2.C: New test.
	* g++.dg/parse/crash13.C: Adjust error markers.
	
	PR c++/18177
	* g++.dg/conversion/const3.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4471&r2=1.4472
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.275&r2=1.276
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.591&r2=1.592
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4537&r2=1.4538
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/conversion/const3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash13.C.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash25.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typedef2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/18155] [3.4 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-11-03  2:48 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-03  2:56 ` mmitchel at gcc dot gnu dot org
  2005-05-19 17:24 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-03  2:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-03 02:56 -------
Fixed in GCC 4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/4.0 regression] typedef|[3.4 regression] typedef in
                   |in template declaration not |template declaration not
                   |rejected                    |rejected


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


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

* [Bug c++/18155] [3.4 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-11-03  2:56 ` [Bug c++/18155] [3.4 " mmitchel at gcc dot gnu dot org
@ 2005-05-19 17:24 ` mmitchel at gcc dot gnu dot org
  2005-07-28 10:26 ` giovannibajo at libero dot it
  2005-07-28 10:26 ` cvs-commit at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:24 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.4                       |3.4.5


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


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

* [Bug c++/18155] [3.4 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-05-19 17:24 ` mmitchel at gcc dot gnu dot org
@ 2005-07-28 10:26 ` giovannibajo at libero dot it
  2005-07-28 10:26 ` cvs-commit at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2005-07-28 10:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-07-28 10:25 -------
Fixed also for GCC 3.4.5.

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


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


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

* [Bug c++/18155] [3.4 regression] typedef in template declaration not rejected
  2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-07-28 10:26 ` giovannibajo at libero dot it
@ 2005-07-28 10:26 ` cvs-commit at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-28 10:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-28 10:23 -------
Subject: Bug 18155

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	giovannibajo@gcc.gnu.org	2005-07-28 10:22:23

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog call.c parser.c pt.c 
	gcc/testsuite/g++.dg/parse: crash11.C crash13.C 
Added files:
	gcc/testsuite/g++.dg/ext: packed8.C 
	gcc/testsuite/g++.dg/parse: error18.C 
	gcc/testsuite/g++.dg/template: crash25.C local5.C typedef2.C 

Log message:
	Backport:
	
	2004-09-16  Mark Mitchell  <mark@codesourcery.com>
	PR c++/16002
	* parser.c (cp_parser_simple_declaration): Commit to tentative
	parses after seeing a decl-specifier.
	(cp_parser_simple_declaration): Eliminate spurious message.
	(cp_parser_init_declarator): Adjust error message.
	
	2005-06-17  Geoffrey Keating  <geoffk@apple.com>
	PR c++/17413
	* pt.c (type_unification_real): Apply template type deduction even
	to procedure parameters that are not dependent on a template
	parameter.
	
	2004-11-02  Mark Mitchell  <mark@codesourcery.com>
	PR c++/18124
	* parser.c (cp_parser_type_parameter): Robustify.
	PR c++/18155
	* parser.c (cp_parser_single_declaration): Disallow template
	typedefs.
	(cp_parser_typedef_p): New function.
	
	2004-12-21  Mark Mitchell  <mark@codesourcery.com>
	PR c++/18378
	* call.c (convert_like_real): Do not permit the use of a copy
	constructor to copy a packed field.
	
	Backport:
	
	2004-09-16  Mark Mitchell  <mark@codesourcery.com>
	PR c++/16002
	* g++.dg/parse/error18.C: New test.
	* g++.dg/parse/crash11.C: Adjust error markers.
	
	2005-06-17  Geoffrey Keating  <geoffk@apple.com>
	PR c++/17413
	* g++.dg/template/local5.C: New.
	
	2004-11-02  Mark Mitchell  <mark@codesourcery.com>
	PR c++/18124
	* g++.dg/template/crash25.C: New test.
	PR c++/18155
	* g++.dg/template/typedef2.C: New test.
	* g++.dg/parse/crash13.C: Adjust error markers.
	
	2004-12-21  Mark Mitchell  <mark@codesourcery.com>
	PR c++/18378
	* g++.dg/ext/packed8.C: New test.

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.411&r2=1.3389.2.412
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.228&r2=1.3892.2.229
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.26&r2=1.452.2.27
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.57&r2=1.157.2.58
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.56&r2=1.816.2.57
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/packed8.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.42.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error18.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.12.3&r2=1.1.12.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash11.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2&r2=1.2.24.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash13.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.14.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash25.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.38.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/local5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.14.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typedef2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.38.1



-- 


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


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

end of thread, other threads:[~2005-07-28 10:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-26  9:53 [Bug c++/18155] New: [3.4/4.0 regression] typedef in template declaration not rejected reichelt at gcc dot gnu dot org
2004-10-26 12:11 ` [Bug c++/18155] " pinskia at gcc dot gnu dot org
2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
2004-11-02 23:56 ` mmitchel at gcc dot gnu dot org
2004-11-03  2:48 ` cvs-commit at gcc dot gnu dot org
2004-11-03  2:56 ` [Bug c++/18155] [3.4 " mmitchel at gcc dot gnu dot org
2005-05-19 17:24 ` mmitchel at gcc dot gnu dot org
2005-07-28 10:26 ` giovannibajo at libero dot it
2005-07-28 10:26 ` cvs-commit 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).