[ubsan] Add libcall arguments

Marek Polacek polacek@redhat.com
Fri Jul 19 19:09:00 GMT 2013


On Fri, Jul 19, 2013 at 08:50:42PM +0200, Jakub Jelinek wrote:
> On Fri, Jul 19, 2013 at 08:45:30PM +0200, Marek Polacek wrote:
> > > >+uptr_type (void)
> > > >+{
> > > >+  return build_nonstandard_integer_type (POINTER_SIZE, 1);
> > > 
> > > Why not use uintptr_type_node?
> > 
> > I suppose I could.  I just followed suit what asan.c does.  I didn't
> > address this in this patch, but I can, if you want to.
> 
> uintptr_type_node is a C/C++/ObjC/ObjC++ FE tree.  So, if you use it just
> in c-family/c-ubsan.c, that is just fine, but you can't use it in ubsan.c.

In that case I prefer to keep uptr_type around.  Even though I like
uintptr_type_node more.

> > @@ -67,8 +68,8 @@ inline bool
> >  ubsan_typedesc_hasher::equal (const ubsan_typedesc *d1,
> >  			      const ubsan_typedesc *d2)
> >  {
> > -  /* ??? Here, the types should have identical __typekind,
> > -     _typeinfo and __typename.  Is this enough?  */
> > +  /* Here, the types should have identical __typekind,
> > +     _typeinfo and __typename.  */
> >    return d1->type == d2->type;
> >  }
> 
> Only one underscore for _typeinfo ?

I wonder where the _ disappeared.  Will fix.

	Marek



More information about the Gcc-patches mailing list