[Bug tree-optimization/122824] [16 Regression] Array out-of-bounds warning when building with -O2+ with std::format

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 6 08:39:31 GMT 2026


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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note a simplier testcase for the warning:
```
#include <format>

int main() {
    auto a = std::format("{}", 42);
}
```

No need for the wrapper around format.


More information about the Gcc-bugs mailing list