This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix aliasing warnings for typeid (PR c++/32260)
On 11/1/07, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Nov 01, 2007 at 02:59:55PM +0100, Richard Guenther wrote:
> > Or
> >
> > + if (! TYPE_ALIAS_SET_KNOWN_P (pseudo_type_info))
> > + {
> > + tree type_info_type = TYPE_MAIN_VARIANT (const_type_info_type_node);
> > + TYPE_ALIAS_SET (pseudo_type_info) = get_alias_set (type_info_type);
> > + }
> > else
> > gcc_assert (TYPE_ALIAS_SET (pseudo_type_info) == get_alias_set
> > (type_info_type));
> >
> > I think it's worth it for checking purposes.
>
> Yeah, adding such gcc_assert is a good idea.
> 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.
Thanks,
Richard.