Am Freitag, den 26.11.2021, 15:48 +0000 schrieb Jonathan Wakely: > On Fri, 26 Nov 2021 at 15:41, Martin Uecker <ma.uec...@gmail.com> wrote: > > Am Freitag, den 26.11.2021, 09:24 +0000 schrieb Jonathan Wakely: > > > On Fri, 26 Nov 2021 at 09:00, Martin Uecker via Gcc <gcc@gcc.gnu.org> > > > wrote: > > > > Am Freitag, den 26.11.2021, 09:29 +0100 schrieb Eric Botcazou: > > > > > > This is a silent and dangerous incorrect code generation issue. > > > > > > > > > > Let's avoid this kind of FUD, please, builtins are low-level devices > > > > > and > > > > > people must know what they are doing and be prepared for caveats. > > > > > > > > Sorry, I do not think this FUD. One needs to look at the assembly > > > > and know *very specific* details about the platform and atomics > > > > to understand that it does not work and silently (!) breaks on > > > > GCC (and not clang) in very rare cases. This with no indication > > > > about this in the documentation which clearly implies that > > > > this works for "all types". > > > > > > It does. Two objects of type T are still the same type whether or not > > > they are both aligned to sizeof(T). > > > > Yes, but only under special circumstances which are > > not automatically fulfilled for all types. > > Erm, two objects of type T are always the same type.
It works only under special circumstances... > My point is that the docs say "works for all types", not "works for > all objects of all types". > > You are claiming the docs are misleading, I'm saying you're misreading > them. They do not say "all objects of all types". It also does not expicitly say it works on all moon phases. Martin