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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|lto                         |

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced much further (still has includes):
```
#include <limits>
#include <algorithm>
void f(const char*);
typedef char CharT;
void read(unsigned u)
{
        CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {};
        CharT* e = buf;
        do
        {
            *e++ = static_cast<CharT>(CharT(u % 10) + CharT{'0'});
            u /= 10;
        } while (u > 0);
        e[0] = 0;
        std::reverse(buf, e);
        f(buf);
}
```
Just compile with `-std=c++20 -O3 -march=skylake` is enough to get the warning.

Reply via email to