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

--- Comment #8 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
I'm fine with making the front end smarter.  Note that if either side of 
the assignment is of floating-point type, you need to keep the existing 
logic; if you're adding to / subtracting from a pointer, you need to 
ensure the multiplication by the size of the pointer target type still 
occurs; and if the arithmetic operation might be sanitized, you probably 
need to keep the existing logic as well (but otherwise, if the 
__atomic_fetch_* operations never have undefined overflow, it should be 
safe to do the operation in the type of the LHS).

Reply via email to