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

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Dmitry G. Dyachenko from comment #3)

The null pointer detection was added in r265648 so that would be the change
responsible for the warning.  As Jeff noted, the root cause of false positives
here isn't the warning itself but a missing optimization.  We will be making
some design changes to the printf warning pass in GCC 10 that could affect the
false positive rate so they might also give us an opportunity to look into the
missed dom optimization. 

(In reply to Segher Boessenkool from comment #4)

I agree the underlining could stand to be improved here (tracking is separately
would increase the odds of it getting fixed).

A conversion specification is what follows the % character (i.e., just the 's'
in in something like "%3s", with the 's' being called a conversion specifier). 
A directive either includes the % character and whatever follows up to the end
of the conversion specification, or is a plain character.  For simplicity,
-Wformat-overflow refers to whole strings of one or more ordinary characters
that don't form a conversion specification as directives.

The use of plain here null comes -Wnonnull: null argument where non-null
required.  I don't see that as a problem but I also wouldn't have an issue with
changing both to "null pointer" (like -Wformat prints) just as long as it's
done consistently.

Reply via email to