[Bug c++/16829] New: default parameter can be not one of the last in template function
charles at kde dot org
gcc-bugzilla@gcc.gnu.org
Fri Jul 30 03:51:00 GMT 2004
template <class A>
void foo(A a=0, int b)
{ }
int main() { foo(0, 0); }
Behavior:
compiles (2 warnings on unused vars)
Expected behavior:
Make an error on the a=0 (which isn't the last parameter)
I also got it to ICE (SIGSEGV) on a block of code repeatedly, but try as I
might, cannot reproduce.
This has been reproduced on:
gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)
gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
gcc version 3.5.0 20040722 (experimental)
gcc version 3.2.2
--
Summary: default parameter can be not one of the last in
template function
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: charles at kde dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i386-pc-linux-gnu/3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16829
More information about the Gcc-bugs
mailing list