public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gdr at cs dot tamu dot edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/30734] name conflict between class and namespace name is not recognized Date: Thu, 08 Feb 2007 10:16:00 -0000 [thread overview] Message-ID: <20070208101624.13514.qmail@sourceware.org> (raw) In-Reply-To: <bug-30734-8377@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from gdr at cs dot tamu dot edu 2007-02-08 10:16 ------- Subject: Re: New: name conflict between class and namespace name is not recognized "ulrich dot lauther at siemens dot com" <gcc-bugzilla@gcc.gnu.org> writes: | 1 namespace Foo { | 2 }; | 3 | 4 class Foo { | 5 }; | 6 | 7 int main() { | 8 class Foo1 : public Foo { | 9 }; | 10 Foo1 my_Foo1; | 11 Foo my_foo; | 12 return 0; | 13 } | 14 | 15 | Foo.C: In function 'int main()': | Foo.C:11: error: expected primary-expression before 'my_foo' | Foo.C:11: error: expected `;' before 'my_foo' | | on line 8 and 10, "Foo" is understod asa class name, on line 11 as a namespace | Without line 11, no error message at all Line 4 is invalid; the front-end should have issued a diagnostic there. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30734
next prev parent reply other threads:[~2007-02-08 10:16 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-02-08 9:59 [Bug c++/30734] New: " ulrich dot lauther at siemens dot com 2007-02-08 10:16 ` Gabriel Dos Reis 2007-02-08 10:16 ` gdr at cs dot tamu dot edu [this message] 2007-02-08 10:46 ` [Bug c++/30734] " rguenth at gcc dot gnu dot org 2007-04-05 5:11 ` fang at csl dot cornell dot edu 2007-05-23 0:16 ` aaw at gcc dot gnu dot org 2007-05-23 0:19 ` aaw at gcc dot gnu dot org 2007-05-27 20:58 ` reichelt at gcc dot gnu dot org 2007-12-26 19:40 ` reichelt at gcc dot gnu dot org 2008-07-31 8:40 ` paolo dot carlini at oracle dot com
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=20070208101624.13514.qmail@sourceware.org \ --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).