This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16501] New: Name of a nested union clashes with the name of a namespace
- From: "lsudhakar at ansoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2004 18:26:22 -0000
- Subject: [Bug c++/16501] New: Name of a nested union clashes with the name of a namespace
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Here is my .i file and there are compiler-errors about a name clash for 'id'.
# 1 "a.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "a.cpp"
# 1 "UtilityIds.h" 1
namespace id {
int leena;
};
# 2 "a.cpp" 2
# 1 "lmclients.h" 1
typedef struct hostid {
union {
int i;
int j;
} id;
};
# 3 "a.cpp" 2
int main()
{
id::leena = 10;
return 0;
}
Are there any compiler options to get rid of this compiler-error?
Thanks,
Leena
--
Summary: Name of a nested union clashes with the name of a
namespace
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lsudhakar at ansoft dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16501