public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14428] New: incompatible template declarations accepted
@ 2004-03-04  9:36 heinlein at informatik dot uni-ulm dot de
  2004-03-04 13:47 ` [Bug c++/14428] " bangerth at dealii dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: heinlein at informatik dot uni-ulm dot de @ 2004-03-04  9:36 UTC (permalink / raw)
  To: gcc-bugs

I don't think that the following code is correct.
GCC accepts it, however.

template <int i> struct X;
template <int* p> struct X;

-- 
           Summary: incompatible template declarations accepted
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: heinlein at informatik dot uni-ulm dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
@ 2004-03-04 13:47 ` bangerth at dealii dot org
  2004-03-24 16:10 ` lerdsuwa at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2004-03-04 13:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-03-04 13:47 -------
Confirmed. No compiler (including mainline) detects this. It may 
be that a compiler is only require to issue an error upon use of this 
type, but gcc doesn't even say anything about this code: 
---------- 
template <int i> struct X; 
template <int* p> struct X; 
 
X<1> *x; 
---------- 
 
W. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |2.95.3 3.2.3 3.3.3 3.4.0
                   |                            |3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-04 13:47:25
               date|                            |


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
  2004-03-04 13:47 ` [Bug c++/14428] " bangerth at dealii dot org
@ 2004-03-24 16:10 ` lerdsuwa at gcc dot gnu dot org
  2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-03-24 16:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-03-24 16:10 -------
Something wrong with logic in coerce_template_template_parms or its caller. 
Will take care of it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lerdsuwa at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
  2004-03-04 13:47 ` [Bug c++/14428] " bangerth at dealii dot org
  2004-03-24 16:10 ` lerdsuwa at gcc dot gnu dot org
@ 2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
  2004-06-25 23:18 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-03-26 10:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-03-26 10:11 -------
Oops, my earlier comment was actually for PR14429.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|lerdsuwa at gcc dot gnu dot |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
                   ` (2 preceding siblings ...)
  2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
@ 2004-06-25 23:18 ` pinskia at gcc dot gnu dot org
  2004-08-16 17:11 ` lerdsuwa at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-25 23:18 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
   Last reconfirmed|2004-03-04 13:47:25         |2004-06-25 23:16:38
               date|                            |


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
                   ` (3 preceding siblings ...)
  2004-06-25 23:18 ` pinskia at gcc dot gnu dot org
@ 2004-08-16 17:11 ` lerdsuwa at gcc dot gnu dot org
  2004-08-22 15:23 ` lerdsuwa at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-08-16 17:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lerdsuwa at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
                   ` (4 preceding siblings ...)
  2004-08-16 17:11 ` lerdsuwa at gcc dot gnu dot org
@ 2004-08-22 15:23 ` lerdsuwa at gcc dot gnu dot org
  2004-08-25 14:56 ` cvs-commit at gcc dot gnu dot org
  2004-08-25 14:59 ` lerdsuwa at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-08-22 15:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-08-22 15:23 -------
Patch in progress.

-- 


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
                   ` (5 preceding siblings ...)
  2004-08-22 15:23 ` lerdsuwa at gcc dot gnu dot org
@ 2004-08-25 14:56 ` cvs-commit at gcc dot gnu dot org
  2004-08-25 14:59 ` lerdsuwa at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-25 14:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-25 14:56 -------
Subject: Bug 14428

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	lerdsuwa@gcc.gnu.org	2004-08-25 14:56:10

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

Log message:
	PR c++/14428
	* pt.c (redeclare_class_template): Check the type of non-type and
	template template parameter.
	
	* g++.dg/template/redecl2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4304&r2=1.4305
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.914&r2=1.915
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4188&r2=1.4189
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/redecl2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/14428] incompatible template declarations accepted
  2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
                   ` (6 preceding siblings ...)
  2004-08-25 14:56 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-25 14:59 ` lerdsuwa at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-08-25 14:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-08-25 14:59 -------
Fixed in the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.5.0


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


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

end of thread, other threads:[~2004-08-25 14:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04  9:36 [Bug c++/14428] New: incompatible template declarations accepted heinlein at informatik dot uni-ulm dot de
2004-03-04 13:47 ` [Bug c++/14428] " bangerth at dealii dot org
2004-03-24 16:10 ` lerdsuwa at gcc dot gnu dot org
2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
2004-06-25 23:18 ` pinskia at gcc dot gnu dot org
2004-08-16 17:11 ` lerdsuwa at gcc dot gnu dot org
2004-08-22 15:23 ` lerdsuwa at gcc dot gnu dot org
2004-08-25 14:56 ` cvs-commit at gcc dot gnu dot org
2004-08-25 14:59 ` lerdsuwa 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).