public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ulrich dot lauther at siemens dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/30734]  New: name conflict between class and namespace name is not recognized
Date: Thu, 08 Feb 2007 09:59:00 -0000	[thread overview]
Message-ID: <bug-30734-8377@http.gcc.gnu.org/bugzilla/> (raw)

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


-- 
           Summary: name conflict between class and namespace name is not
                    recognized
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ulrich dot lauther at siemens dot com
 GCC build triplet: 686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: 686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30734


             reply	other threads:[~2007-02-08  9:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08  9:59 ulrich dot lauther at siemens dot com [this message]
2007-02-08 10:16 ` Gabriel Dos Reis
2007-02-08 10:16 ` [Bug c++/30734] " gdr at cs dot tamu dot edu
2007-02-08 10:46 ` 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=bug-30734-8377@http.gcc.gnu.org/bugzilla/ \
    --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: link
Be 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).