public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9754: Error for legal template specialization
@ 2003-02-19 11:56 jkanze
0 siblings, 0 replies; 3+ messages in thread
From: jkanze @ 2003-02-19 11:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 9754
>Category: c++
>Synopsis: Error for legal template specialization
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 19 11:56:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: James Kanze
>Release: 3.2.2
>Organization:
>Environment:
054@~/tmp/gcc3 (337): uname -a
SunOS padev054 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
>Description:
g++ 3.2.2 refuses to compile the template specialization
in the attached source file.
Transcript of compilation:
----------------------------
g++3 -v -c specialization.cc
Reading specs from /home/team02/jakan/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/specs
Configured with: ../gcc-3.2.2/configure --prefix=/home/team02/jakan/gnu --program-suffix=3 --enable-threads=posix
Thread model: posix
gcc version 3.2.2
/home/team02/jakan/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=2 -D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc specialization.cc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase specialization.cc -version -o /var/tmp//ccOwZj0R.s
GNU CPP version 3.2.2 (cpplib) (sparc ELF)
GNU C++ version 3.2.2 (sparc-sun-solaris2.8)
compiled by GNU C version 3.2.2.
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/home/team02/jakan/gnu/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
/home/team02/jakan/gnu/include/c++/3.2.2
/home/team02/jakan/gnu/include/c++/3.2.2/sparc-sun-solaris2.8
/home/team02/jakan/gnu/include/c++/3.2.2/backward
/home/team02/jakan/gnu/include
/home/team02/jakan/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/include
/usr/include
End of search list.
specialization.cc:21: template-id `S<>' for `S<int>::S(int)' does not match any
template declaration
specialization.cc:21: syntax error before `{' token
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="specialization.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="specialization.cc"
CnRlbXBsYXRlPCB0eXBlbmFtZSBUID4Kc3RydWN0IFMKewogICAgUyggY2hhciApIDsKfSA7Cgp0
ZW1wbGF0ZTwgdHlwZW5hbWUgVCA+ClM8IFQgPjo6UyggY2hhciApCnsKfQoKdGVtcGxhdGU8Pgpz
dHJ1Y3QgUzwgaW50ID4KewogICAgUyggaW50ICkgOwp9IDsKCnRlbXBsYXRlPD4KUzwgaW50ID46
OlMoIGludCApCnsKfQo=
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/9754: Error for legal template specialization
@ 2003-02-21 15:27 lerdsuwa
0 siblings, 0 replies; 3+ messages in thread
From: lerdsuwa @ 2003-02-21 15:27 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jkanze, nobody
Synopsis: Error for legal template specialization
State-Changed-From-To: analyzed->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Feb 21 15:27:16 2003
State-Changed-Why:
Not a bug. The specialization
template <>
struct S<int>
{
S(int);
};
is no longer viewed as a template. So you have to write
S<int>::S(int)
{
}
without the 'template <>' prefix.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9754
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/9754: Error for legal template specialization
@ 2003-02-19 14:22 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-02-19 14:22 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jkanze, nobody
Synopsis: Error for legal template specialization
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Feb 19 14:22:09 2003
State-Changed-Why:
Confirmed. Affects all versions from 2.95 to present mainline.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9754
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-21 15:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-19 11:56 c++/9754: Error for legal template specialization jkanze
2003-02-19 14:22 bangerth
2003-02-21 15:27 lerdsuwa
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).