public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: giovannibajo@libero.it To: gcc-gnats@gcc.gnu.org Subject: c++/10585: Using typeof() for template parameters does not work (and ICEs on 3.3) Date: Thu, 01 May 2003 18:46:00 -0000 [thread overview] Message-ID: <20030501183841.14734.qmail@sources.redhat.com> (raw) >Number: 10585 >Category: c++ >Synopsis: Using typeof() for template parameters does not work (and ICEs on 3.3) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Thu May 01 18:46:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Giovanni Bajo >Release: 3.3 and 3.4 (CVS 20030430) >Organization: >Environment: i686-pc-cygwin >Description: This is basically c++/4526, but epurated. The following snippet does not compile on the active branch (3.3) and the mainline (3.4): ------------------------------------ struct X { typedef int type; }; X x; template <typename T> struct A { typedef typename T::type type; }; template <typename T> struct B { typename A<typeof(x)>::type y; }; template class B<int>; ------------------------------------ pr4526.cpp:9: error: no type named `type' in `struct A<__typeof (x)>' pr4526.cpp:9: error: ISO C++ forbids declaration of `y' with no type 3.3 CVS 20030421 even ICEs with this code snippet. Note also that this bug might be related to c++/8007. >How-To-Repeat: Compile the above snippet >Fix: No known fix. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-05-01 18:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-05-01 18:46 giovannibajo [this message] 2003-05-01 19:10 bangerth 2003-05-16 7:54 reichelt
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=20030501183841.14734.qmail@sources.redhat.com \ --to=giovannibajo@libero.it \ --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).