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]

Re: wrong reference in a virtual table


Igor Levko <hornet@reksoft.ru> writes:

> egcs-1.0.3 release doesn't support namespace !!!

The latest snapshots of egcs do support namespaces, so you may expect
this to work under egcs 1.1

> This classes with the same name are defined in different .cc files
> hence the compiler has to issue an error or generate correct code,
> doesn't it ?

No, the C++ FDIS states that a diagnostic is not required for
violations of the ODR in separate translation units.  In
[basic.def.ord]/5, it says that behavior is undefined in this case.

> IMHO this is important for the libraries or codegenerators.

These should really use unnamed namespaces.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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