This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16501] New: Name of a nested union clashes with the name of a namespace


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]