[Bug c++/109717] -Warray-bound error with gnu++20 and fmt library

2023-05-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109717 --- Comment #2 from Jonathan Wakely --- It's not actually broken, it's just paranoid, and the overflow detection triggers for dead code. The optimizer analyzes different paths through the code separately, and fails to detect that some of those

[Bug c++/109717] -Warray-bound error with gnu++20 and fmt library

2023-05-03 Thread psmith at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109717 --- Comment #1 from Paul Smith --- This same test case also causes spurious errors for -Wstringop-overflow :( If I use this compile line with the same source file, I get these errors: $ g++-13.1 -I/data/src/build/common/fmt/include