This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16829] New: default parameter can be not one of the last in template function
- From: "charles at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jul 2004 03:51:52 -0000
- Subject: [Bug c++/16829] New: default parameter can be not one of the last in template function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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