public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "charles at kde dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/16829] New: default parameter can be not one of the last  in template function
Date: Fri, 30 Jul 2004 03:51:00 -0000	[thread overview]
Message-ID: <20040730035150.16829.charles@kde.org> (raw)

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


             reply	other threads:[~2004-07-30  3:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-30  3:51 charles at kde dot org [this message]
2004-07-30  4:04 ` [Bug c++/16829] " charles at kde dot org
2004-07-30  4:15 ` pinskia at gcc dot gnu dot org
2004-07-30 13:20 ` bangerth at dealii dot org
2005-01-25 16:32 ` pinskia at gcc dot gnu dot org
2005-01-25 17:05 ` Matthieu dot Moy at imag dot fr
2005-05-09 14:25 ` pinskia at gcc dot gnu dot org
2005-07-06  1:26 ` charles at kde dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040730035150.16829.charles@kde.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).