https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110333
--- Comment #2 from Paul Eggert <eggert at cs dot ucla.edu> ---
(In reply to Jakub Jelinek from comment #1)

> it is I think a portability warning.

OK, but the 4095-byte portability concern applies to printf, too, and yet
printf doesn't get the warning because of the fix for bug#88993. sprintf should
be no different from printf in this respect.

It sounds like the the exceeds-4095 business should be a separate warning that
can be enabled/disabled independently. As the 4095-byte warning is hardly ever
useful in practice, it shouldn't be implied by the more-useful
-Wformat-overflow=2 option.

As things stand, many GNU apps are disabling -Wformat-overflow=2 because of
this kind of false positive, and unfortunately this throws out the baby with
the bathwater.

Reply via email to