On 06/17/2013 06:05 AM, Jan Hubicka wrote:
It is my understanding that C++ standard enforces one definition rule for
types, too (to enable sane mangling?) and that we can basically match types
by their name and contextes (namespaces/outer classes)?

Yes. Also for template instantiations and inline functions (basically, decls with TREE_COMDAT set). That isn't very interesting for devirt, but we might want to handle it in decls_same_for_odr anyway.

Also, it would be really nice to warn about ODR violations: types/decls that are the same for ODR but are structurally different.

+    This is non-trivial for LTO where minnor differences in

"minor"

+   /* If types are not structuraly same, do not bother to contnue.

"structurally" "continue"

Jason

Reply via email to