https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70717 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- You might get the warning with -D_FORTIFY_SOURCE=1 but I have not tried it myself.