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: [C++ PATCH] Fix aliasing warnings for typeid (PR c++/32260)


Richard Guenther wrote:

>> So, is the patch ok with addition of the else gcc_assert (...)?
> 
> I cannot approve the patch, but I would if I could.  Leaving that to Jason.

I'm not Jason, but I'll chime in anyhow.

Jakub, this is an interesting problem; thanks for looking at it.

I suppose we could adopt a more radical change where we actually create
std::type_info in the front end, but pretend we can't see it when doing
symbol lookups until it is declared in the library.  That might actually
be cleaner, in that we would avoid the funny fake names and such.  Maybe
we could even avoid completing any typeinfo types until the end of the
translation unit, at which point we could define std::type_info only if
it wasn't already defined in the compilation.

Anyhow, your patch is OK, with Richard's requested change.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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