[Bug c/98880] [10/11 Regression] assignment unexpectedly optimized away with -O

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 29 09:18:10 GMT 2021


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is invalid code.
In both C and C++ pointer subtraction is only defined if both pointers point
into the same object (including the end of it).


More information about the Gcc-bugs mailing list