[c++] Another question about demangler output

Gabriel Dos Reis gdr@integrable-solutions.net
Mon Dec 8 06:49:00 GMT 2003


Geoff Keating <geoffk@geoffk.org> writes:

| > 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.

At least, they don't get used one in place of the other.  I find that
a much lesser evil than treating two different things as same.

-- Gaby



More information about the Gcc mailing list