[PATCH 3/5] simply handling of -Wformat-overflow/truncation options (PR 78703)

Martin Sebor msebor@gmail.com
Sun Jan 22 23:53:00 GMT 2017


The attached patch is the last of the refactoring/restructuring
series.  It consists of the following changes:

1) Introduce a single global variable, warn_level, that the pass
uses to test the level of the warning that applies to the function
currently being processed (i.e., either -Wformat-overflow or
-Wformat-truncation).

2) Slightly adjust the format_integer function in preparation for
the upcoming substantive changes.

3) Factor code responsible for issuing per-directive warnings out
of format_directive and into a function of its own, maybe_warn.
This also simplifies the upcoming extensive changes in this area
but more importantly, should make them easier to review by
grouping warnings in the same function.

4) Enhance information printed in debugging dumps.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-78703-3.diff
Type: text/x-patch
Size: 21324 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170122/d9cd2f22/attachment.bin>


More information about the Gcc-patches mailing list