Answer by user3666171 for Casting pointers to _Atomic pointers and _Atomic sizes
This method is not legal C11, but I managed to fool my compiler (Intel 2019) into casting between atomic and non-atomic "simple" types as follows.Firstly I had a look inside stdatomic.h on my system...
View ArticleAnswer by Florian Weimer for Casting pointers to _Atomic pointers and _Atomic...
_Atomic changes alignment in some corner cases on Clang, and GCC will likely be fixed in the future as well (PR 65146). In these cases, adding _Atomic through a cast does not work (which is fine from a...
View ArticleCasting pointers to _Atomic pointers and _Atomic sizes
By my reading of the standard,*(_Atomic TYPE*)&(TYPE){0} (in words, casting a pointer to a non-atomic to a pointer to a corresponding atomic and dereferencing) isn't supported.Do gcc and/or clang...
View Article
More Pages to Explore .....