On Mon, Mar 09, 2015 at 12:48:56PM +0100, Jakub Jelinek wrote:
> > --- gcc/cp/cp-ubsan.c
> > +++ gcc/cp/cp-ubsan.c
> > @@ -63,9 +63,7 @@ cp_ubsan_instrument_vptr_p (tree type)
> >    if (!flag_rtti || flag_sanitize_undefined_trap_on_error)
> >      return false;
> >  
> > -  if (current_function_decl
> > -      && lookup_attribute ("no_sanitize_undefined",
> > -                      DECL_ATTRIBUTES (current_function_decl)))
> > +  if (!do_ubsan_in_current_function ())
> >      return false;
> >  
> >    if (type)
> 
> This changes behavior.  Previously it would (intentionally) instrument
> current_function_decl == NULL case, now it doesn't.

I see.  A test/comment indicating that would have been helpful then.

I'll apply only the C part then.

Reply via email to