[OpenWalnut-Dev] duplicate class names

Christian Heine heine at informatik.uni-leipzig.de
Thu Oct 7 11:16:30 CEST 2010


Hi,

according to the one definition rule of C++, the program is invalid 
in the presence of two different classes with the same name. The 
compiler/linker *must* check for it. Why they do not is mysterious.

Which class is it btw.?

Christian

On 10/06/10 19:37, Ralph Schurade wrote:
> Hello All,
>
> today i was hunting down a bug/crash that didn't make sense at all.
> In the end i found out it was because someone created a class (in common)
> with the same name as one that was already in use in the module in question.
> Now the compiler and linker obviously had no problem with that, not even
> a warning, but it crashed at runtime.
>
> So the question here is, how to avoid this? Can we tweak the stylechecker
> to look for something like that? Namespaces? Even though we don't like them.
>
> Opinions?


More information about the OpenWalnut-Dev mailing list