This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13991] New: namespace-name clash with class-name compiles without warnings
- From: "enok at lysator dot liu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2004 07:51:00 -0000
- Subject: [Bug c++/13991] New: namespace-name clash with class-name compiles without warnings
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A namespace with the same name as a class name in the same scope
compiles without warnings, producing faulty code. The following compiles
and links without warning:
struct a {
static int i;
};
namespace a {
int i = 1;
}
int main() {
return a::i;
}
--
Summary: namespace-name clash with class-name compiles without
warnings
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: enok at lysator dot liu dot se
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13991