https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96159
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Martin Uecker from comment #3) > "The four non-arithmetic functions (load, store, exchange, and > compare_exchange) all have a generic version as well. This generic version > works on any data type. This is true. They work on your type, but not for all values of that type, only ones that are appropriately aligned. > It uses the lock-free built-in function if the specific data type size makes > that possible; As it says, it only depends on the size, there is no check for alignment. What's missing is documentation about the requirement for the user to ensure the right alignment.
