http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46449
--- Comment #2 from charles.gorand.dev at gmail dot com 2010-11-12 11:12:36 UTC --- (In reply to comment #1) > this is not valid C++, A warning or an error message should be generated so ? > you can't have two globally-visible classes with the > same name in one program, you need to rename them or put them in separate > namespaces. The classes with same name are fully declared in separate CPP. So the classes are not "globally-visible" isn't it ? If not I'm sorry, I thought that the class declared in a CPP was hidden. (like if I declared a function or a variable static in the C/CPP file) If I do the same with an int, I get this error message from linker : /tmp/ccMJMUW0.o:(.bss+0x0): multiple definition of `myInt' /tmp/ccsiFpPe.o:(.bss+0x0): first defined here