public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/18674] New: G++ accepts bad elaborated type specifiers Date: Thu, 25 Nov 2004 14:18:00 -0000 [thread overview] Message-ID: <20041125141837.18674.valentin@lrde.epita.fr> (raw) elaborated-type-speficier: class-key ::? nested-name-specifier? identifier class-key ::? nested-name-specifier? template? template-id enum ::? nested-name-specifier? identifier typename ::? nested-name-specifier? identifier typename ::? nested-name-specifier? template? template-id According to the paragraph 7.1.5.3.3 of the standard, the three first rules need to refer to class, union, or enum depending on the first keyword. But gcc accepts it to be used whenever you want. Environment: System: Linux nostromo 2.4.27-1-686 #1 Fri Sep 3 06:28:00 UTC 2004 i686 GNU/Linux Architecture: i686 host: i486-pc-linux-gnu build: i486-pc-linux-gnu target: i486-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,objc,ada --prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --enable-nls --enable-threads=posix --without-included-gettext --disable-werror --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk i486-linux-gnu How-To-Repeat: The command line used was: g++-snapshot -std=c++98 -pedantic -W -Wall -c e.cc The following source file is invalid but gcc do not say anything: template <typename I> static void g() { enum I::t a; (void) a; } struct B { typedef int t; }; void h() { g<B>(); } -- Summary: G++ accepts bad elaborated type specifiers Product: gcc Version: 0.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: valentin at lrde dot epita dot fr CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i486-pc-linux-gnu GCC host triplet: i486-pc-linux-gnu GCC target triplet: i486-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18674
next reply other threads:[~2004-11-25 14:18 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-25 14:18 gcc-bugzilla at gcc dot gnu dot org [this message] 2004-11-25 14:22 ` [Bug c++/18674] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org 2004-11-27 2:46 ` pinskia at gcc dot gnu dot org 2004-11-27 17:47 ` mmitchel at gcc dot gnu dot org 2004-11-29 20:11 ` cvs-commit at gcc dot gnu dot org 2004-11-29 20:23 ` [Bug c++/18674] [3.4 " mmitchel at gcc dot gnu 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=20041125141837.18674.valentin@lrde.epita.fr \ --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: 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).