[Bug tree-optimization/105329] [12/13 Regression] Bogus restrict warning when assigning 1-char string literal to std::string since r12-3347-g8af8abfbbace49e6
mattias.ellert at physics dot uu.se
gcc-bugzilla@gcc.gnu.org
Fri May 6 03:59:52 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
--- Comment #18 from Mattias Ellert <mattias.ellert at physics dot uu.se> ---
If the additional symbols are undesirable, using the workaround proposed in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104336#c1 is an alternative. This
silences the warning without adding additional symbols.
This proposed change is similar to the change introduced a few lines further up
in the same file in the following commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=e14ea108faa6eba6a60a45ff0ca3099ce6ae45c2
This change was introduced to fix a similar false positive warning in GCC 11.
More information about the Gcc-bugs
mailing list