[c++] Another question about demangler output

Geoff Keating geoffk@geoffk.org
Mon Dec 8 04:28:00 GMT 2003


> From: Gabriel Dos Reis <gdr@integrable-solutions.net>
> Date: 08 Dec 2003 00:18:52 +0100

...
>  It is an ODR violation (even if no diagnostic is
> required).  If you mangle them differently, then you can catch that
> violation. 

Mangling really isn't a good way to detect ODR violations.  If you
mangle two things the same, then you can have two declarations that
don't match and are undetected; if you mangle two things differently,
then you can have two definitions that are undetected.  I think it's
best to choose manglings based on other criteria, like ease of
implementation or standardness.

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc mailing list