This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [RFC] Using One Definition Rule for types during LTO devirtualizatoin?


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


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