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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2017-01-24 00:00:00         |2019-3-22
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=80472

--- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Bug 80472 comment 4 is another case where GCC detects undefined behaviour
caused by user-provided values, but the warning is suppressed because it's
inside a template defined in a system header:

In file included from
/home/jwakely/gcc/9/include/c++/9.0.1/bits/stl_algobase.h:66,
                 from
/home/jwakely/gcc/9/include/c++/9.0.1/bits/forward_list.h:38,
                 from /home/jwakely/gcc/9/include/c++/9.0.1/forward_list:38,
                 from prev.cc:1:
/home/jwakely/gcc/9/include/c++/9.0.1/bits/stl_iterator_base_funcs.h:153:7:
warning: iteration 9223372036854775807 invokes undefined behavior
[-Waggressive-loop-optimizations]
  153 |       while (__n--)
      |       ^~~~~
/home/jwakely/gcc/9/include/c++/9.0.1/bits/stl_iterator_base_funcs.h:153:7:
note: within this loop

Reply via email to