[Bug c/85310] optimization ignoring strlen() results
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 10 03:17:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85310
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
If they want to optimize based on the size of the array then disable the
builtin (and don't use The __builtin_ specific function).
Basically this code is undefined and can do anything. If anything maybe
strnlen should be used instead...
More information about the Gcc-bugs
mailing list