This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/81483] spurious -Wformat-overflow warning for limited types
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Dec 2017 05:39:21 +0000
- Subject: [Bug middle-end/81483] spurious -Wformat-overflow warning for limited types
- Auto-submitted: auto-generated
- References: <bug-81483-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81483
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |law at redhat dot com
Resolution|--- |FIXED
--- Comment #2 from Jeffrey A. Law <law at redhat dot com> ---
This was fixed by introducing the EVRP analysis module and using it within DOM
and will no longer give the false positive with gcc-8.
In VRP1 the key statement is:
_1 = (int) zone_2;
The key ranges:
_1: [0, +INF]
zone_2: VARYING
Not useful at all. A few passes run after VRP and make a variety of changes to
the IL. Then DOM fires up. THe key statement has changed slightly into:
_1 = (int) zone_11;
zone_11 is a new object (created by loop header copying). DOM derives a range
of [0, 254] for _1.
That tighter range survives through to the printf warning code and (of course)
with the tighter range the false positive warning is gone.