[Bug c/80638] -ansi suppresses -Wstringop-overflow for mempcpy

2017-05-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80638

--- Comment #3 from Andrew Pinski  ---
>Calls to known library functions that overflow should be diagnosed regardless 
>of -ansi.

No, because mempcpy is not included in the ISO standard.  Basically -ansi is
the same as doing -fstd=c11.

[Bug c/80638] -ansi suppresses -Wstringop-overflow for mempcpy

2017-05-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80638

--- Comment #2 from Andrew Pinski  ---
If you had used __builtin_mempcpy you would have got the warning.

[Bug c/80638] -ansi suppresses -Wstringop-overflow for mempcpy

2017-05-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80638

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski  ---
-ansi disables mempcpy as being a builtin.