https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90036
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
x.cpp:22:11: error: ā%sā directive argument is null [-Werror=format-overflow=]
22 | printf("%s = %s\n", &N1[0], &N2[0]); // warning
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Side issue... It's not clear what a "directive" or a "directive argument"
is here, without guessing. "%s" is called a "conversion specifier". "null"
is not a defined anything either, and the highlight should ideally be on the
argument, with maybe an extra info one for the conversion spec.
So maybe something like
x.cpp:22:11: error: argument to ā%sā is a null pointer
[-Werror=format-overflow=]
22 | printf("%s = %s\n", &N1[0], &N2[0]); // warning
| ^~ ^~~~~~