[Bug tree-optimization/104336] bogus -Wrestrict for std::string assignment with

amacleod at redhat dot com gcc-bugzilla@gcc.gnu.org
Mon Apr 25 20:26:24 GMT 2022


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

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> ---
Huh.  This looks earily familiar to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329 as well.

That PR documents why the code sequence isn't handled well by the optimizers in
this release...  we improve analysis on the length calculation, but not on the
pointer side... so we leave dead code that the warning system complains about.  

Presumably this would also fix that?


More information about the Gcc-bugs mailing list