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

uecker at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=119060

--- Comment #24 from uecker at gcc dot gnu.org ---

For C++ a builtin was added that acts as a barrier for std::observable. This
could potentially be emitted by the C frontend after each volatile access. 

https://gcc.gnu.org/cgit/gcc/commit/?id=9056b5faa87df59fb8eb2f92096a8e6e7d246757

I do not understand the test case though, as the addition is not volatile, so
it may have stronger semantics than what is needed here. 

(IIRC, in C the function without return would also not have UB as long as the
return value is not used.).

Reply via email to