https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94021

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |13.0

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 13:
  # RANGE [irange] int [0, 59] NONZERO 0x3f
  m_10 = _1 / 60;
  # RANGE [irange] int [0, 24] NONZERO 0x1f
  h_9 = _5 / 3600;

GCC 12:
  # RANGE [0, 59] NONZERO 63
  m_10 = _1 / 60;
  # RANGE [0, 596523] NONZERO 1048575
  h_9 = _5 / 3600;

And the warning is gone in GCC 13 too.

And produces:
/app/example.cpp:14: snprintfD.1756: objsize = 8, fmtstr = "%s%02i%02i"
  Directive 1 at offset 0: "%s"
    Result: 1, 1, 1, 1 (1, 1, 1, 1)
  Directive 2 at offset 2: "%02i"
    Result: 2, 2, 2, 2 (3, 3, 3, 3)
  Directive 3 at offset 6: "%02i"
    Result: 2, 2, 2, 2 (5, 5, 5, 5)
  Directive 4 at offset 10: "", length = 1
  Substituting 5 for return value.

Reply via email to