[Bug tree-optimization/106044] Spurious warning: -Wrestrict for adding std::strings (__builtin_memcpy)

cuzdav at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 21 14:51:23 GMT 2022


--- Comment #2 from Chris Uzdavinis <cuzdav at gmail dot com> ---
Even marginally simpler:

#include <string>
auto f() {
    return "_" + std::string(" ");

Originally I marked it as tree-optimization since it's only with -O3, but it
could be an issue in the standard library itself. I didn't consider that

More information about the Gcc-bugs mailing list