From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29153 invoked by alias); 30 Jul 2004 03:51:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29117 invoked by uid 48); 30 Jul 2004 03:51:52 -0000 Date: Fri, 30 Jul 2004 03:51:00 -0000 From: "charles at kde dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040730035150.16829.charles@kde.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/16829] New: default parameter can be not one of the last in template function X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg03535.txt.bz2 List-Id: template 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