This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/81483] spurious -Wformat-overflow warning for limited types


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]