public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Claudius Link <Claudius.Link@mathematik.uni-freiburg.de> To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org Subject: c++/6446: ICE specialising template constructor Date: Thu, 25 Apr 2002 02:26:00 -0000 [thread overview] Message-ID: <20020425092332.0F48A16DDB4@zaphod.link-priv.de> (raw) >Number: 6446 >Category: c++ >Synopsis: Template specialisation causes internal error >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Thu Apr 25 02:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Claudius Link >Release: 3.0.4 (Debian testing/unstable) >Organization: University Freiburg, Institute for Applied Mathematics >Environment: System: Linux zaphod 2.4.18 #1 SMP Tue Apr 16 19:32:36 CEST 2002 i686 unknown Architecture: i686 host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux >Description: First of all, I am not sure if the code is really leagal. But a least I get an ICE for sure. If you create a templcate class without specifying a (default) constructor but you provide later a specialised (default) constructor. I get an ICE. The same applies for GNU C++ version 2.95.4 20011002 (Debian prerelease) (i386-linux) compiled by GNU C version 2.95.4 20011002 (Debian prerelease). >How-To-Repeat: # 1 "tempspec.cc" template<class T> struct Foo { }; Foo<int>::Foo() { } void bar() { Foo<int> f; } >Fix: Pretty easy. Just add the "prototype" of the constructor in the unspecialised template declaration. >Release-Note: >Audit-Trail: >Unformatted:
reply other threads:[~2002-04-25 9:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020425092332.0F48A16DDB4@zaphod.link-priv.de \ --to=claudius.link@mathematik.uni-freiburg.de \ --cc=debian-gcc@lists.debian.org \ --cc=gcc-gnats@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: linkBe 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).