public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: xternal@centibyte.org To: gcc-gnats@gcc.gnu.org Subject: c++/4429: certain member variables that shadow template parameters cause ice. Date: Sun, 30 Sep 2001 17:26:00 -0000 [thread overview] Message-ID: <20011001001347.28405.qmail@sourceware.cygnus.com> (raw) >Number: 4429 >Category: c++ >Synopsis: certain member variables that shadow template parameters cause ice. >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Sun Sep 30 17:26:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: xternal@centibyte.org >Release: gcc version 3.0.2 20010922 (Debian prerelease) >Organization: >Environment: )gured 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: Array member variables that are declared const and static and shadow a template parameter cause an ice. The template parameter must be a built in type, and the array member an array of classes. If the variable is not declared const or static, or it is a builtin type, or if the template parameter is not a builtin type, a normal syntax error message will result instead. I got the same results with g++ 3.0.2 and g++ 2.95.4. >How-To-Repeat: Run the followingn command on the following file: g++ bugtest.cc //bugtest.ccclass MyClass { }; template<char type> class TestTemplate { public: const static MyClass type[] = {MyClass(), MyClass()}; }; >Fix: Change one of the variable names. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2001-09-30 17:26 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-09-30 17:26 xternal [this message] 2002-06-07 7:52 lerdsuwa 2002-10-31 14:08 bangerth
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=20011001001347.28405.qmail@sourceware.cygnus.com \ --to=xternal@centibyte.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).