From mboxrd@z Thu Jan 1 00:00:00 1970 From: wolfgang.bangerth@iwr.uni-heidelberg.de To: gcc-gnats@gcc.gnu.org Subject: c++/2863: gcc accepts invalid explicit specialization syntax Date: Fri, 18 May 2001 01:46:00 -0000 Message-id: <20010518084243.22971.qmail@sourceware.cygnus.com> X-SW-Source: 2001-05/msg00439.html List-Id: >Number: 2863 >Category: c++ >Synopsis: gcc accepts invalid explicit specialization syntax >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Fri May 18 01:46:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Wolfgang Bangerth >Release: unknown-1.0 >Organization: >Environment: gcc 2.95, gcc cvs of May 05 >Description: As a follow-up to the last report, talking about explicit instantiations: gcc also allows explicit specializations with wrong arguments. This is somewhat more critical, as the compiler thereby looses the ability to warn you about the then necessarily unused arguments. Regards Wolfgang >How-To-Repeat: -----/gcc-bugs> cat a.cc struct X { template void f(int=0); }; template <> void X::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) >Fix: >Release-Note: >Audit-Trail: >Unformatted: