public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: giovannibajo@libero.it To: gcc-gnats@gcc.gnu.org Subject: c++/10530: [3.4 regression] Cannot access non-dependent type within nested template Date: Mon, 28 Apr 2003 23:36:00 -0000 [thread overview] Message-ID: <20030428233200.4083.qmail@sources.redhat.com> (raw) >Number: 10530 >Category: c++ >Synopsis: [3.4 regression] Cannot access non-dependent type within nested template >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Apr 28 23:36:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Giovanni Bajo >Release: 3.4 i686-pc-cygwin >Organization: >Environment: Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.4/specs Configured with: ../gcc/configure --program-suffix=-3.4 --enable-languages=c,c++ Thread model: single gcc version 3.4 20030413 (experimental) >Description: GCC 3.4 does not compile the following legal snippet: --------------------------------- template <typename T> struct Foo { template <typename Q> struct Inner { typedef int type; }; }; struct Bar { template <typename A> void func(void) { typedef typename Foo<int> ::Inner<int> ::type type; } }; int main() { Bar b; b.func<int>(); } --------------------------------- newbug.cpp: In member function `void Bar::func()': newbug.cpp:19: error: no type named `type' in `struct Foo<int>::Inner<int>' newbug.cpp:19: error: ISO C++ forbids declaration of `type' with no type I also tried adding the nested template keyword (which is unneeded because the postfix-expression is clearly non-dependent) but it does not help. Previous GCCs compile the above correctly. >How-To-Repeat: Compile the snippet >Fix: No known workaround >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-04-28 23:36 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-28 23:36 giovannibajo [this message] 2003-04-29 0:19 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=20030428233200.4083.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).