[Bug c/92292] duplicate -Wformat warnings about incorrect printf format specifiers
ssbssa at yahoo dot de
gcc-bugzilla@gcc.gnu.org
Tue Dec 31 15:12:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92292
--- Comment #4 from Domani Hannes <ssbssa at yahoo dot de> ---
(In reply to joseph@codesourcery.com from comment #3)
> On Tue, 31 Dec 2019, ssbssa at yahoo dot de wrote:
>
> > But does it make sense to do a format check multiple times for one function?
>
> Yes. You could have a function with one format string for the message
> printed to the terminal and another for the message printed (with the same
> arguments) to a logfile, for example. Or multiple format strings from
> which the function chooses one to use based on some condition.
Interesting, I would never have thought of this possibility.
Is there also a scenario where it would make sense to have multiple format
attributes for the same format string?
More information about the Gcc-bugs
mailing list