https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125295

--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> > So maybe it should handle shift in the same way?
> 
> Yeah, I guess it should.  At least the issue is somewhat relevant for UBSAN,
> not so much in practice otherwise.

The internal function for shifts might solve some other issues dealing with
ubsan and shifts too.
Though IIRC the reason why it is done in the front-end is because C90 and C99
(and C++) have slightly different rules when it comes to undefined behavior
there.  But it should not be hard to add an 3rd argument which sets a bitmask
to the rules.

Reply via email to