First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 2862
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Kriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: wolfgang.bangerth@iwr.uni-heidelberg.de
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 2862 depends on: Show dependency tree
Show dependency graph
Bug 2862 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2001-05-18 01:16
gcc accepts the following syntax for explicit instantiations
of template functions with default args:
---------------------------------------
template <int dim> void f    (int=0) {};
template           void f<1> ();
---------------------------------------
This is most certainly not correct.
Regards
  Wolfgang

Release:
unknown

Environment:
gcc 2.95, gcc cvs of May 05

How-To-Repeat:
-----/gcc-bugs> cat a.cc
template <int dim> void f    (int=0) {};
template           void f<1> ();

-----/gcc-bugs> ~/Config/gcc-ss-sun/bin/gcc -W -Wall -ansi -c a.cc -o /dev/null
-----/gcc-bugs> ~/Config/gcc-ss-sun/bin/gcc -v                                 
Reading specs from /home/atlas2/wolf/Config/gcc-ss-sun/bin/../lib/gcc-lib/sparc-sun-solaris2.7/3.0/specs
Configured with: ../gcc/configure --prefix=/home/people/wolf/Config/gcc-ss-sun --with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 3.0 20010514 (prerelease)

------- Comment #1 From Nathan Sidwell 2001-05-27 09:40 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: confirmed

------- Comment #2 From Nathan Sidwell 2001-05-27 16:40 -------
From: nathan@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org,
  wolfgang.bangerth@iwr.uni-heidelberg.de
Cc:  
Subject: Re: c++/2862
Date: 27 May 2001 16:40:25 -0000

 Synopsis: gcc accepts invalid explicit instantiation syntax
 
 State-Changed-From-To: open->analyzed
 State-Changed-By: nathan
 State-Changed-When: Sun May 27 09:40:25 2001
 State-Changed-Why:
     confirmed
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2862&database=gcc

------- Comment #3 From Kriang Lerdsuwanakij 2002-06-14 09:06 -------
Responsible-Changed-From-To: unassigned->lerdsuwa
Responsible-Changed-Why: Patch in progress.

------- Comment #4 From Kriang Lerdsuwanakij 2002-07-17 07:28 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in the main trunk (future GCC 3.3).

------- Comment #5 From Kriang Lerdsuwanakij 2002-07-17 14:17 -------
From: lerdsuwa@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/2862
Date: 17 Jul 2002 14:17:21 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	lerdsuwa@gcc.gnu.org	2002-07-17 07:17:21
 
 Modified files:
 	gcc/cp         : ChangeLog pt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: instantiate2.C spec4.C 
 
 Log message:
 	PR c++/2862, c++/2863
 	* pt.c (determine_specialization): Compare the length of
 	TYPE_ARG_TYPES.  Tidy.
 	
 	* g++.dg/template/instantiate2.C: New test.
 	* g++.dg/template/spec4.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.2885&r2=1.2886
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.601&r2=1.602
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.1983&r2=1.1984
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/instantiate2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/spec4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

First Last Prev Next    No search results available      Search page      Enter new bug