Chris Vine writes: > On Sat, 08 Jun 2019 10:07:45 +0200 > Arne Babenhauserheide wrote: > [snip] >> Wow, I didn’t know that you could do that. >> >> However: "The details of that allocation are implementation-defined, and >> it's undefined behavior to read from the member of the union that wasn't >> most recently written." https://en.cppreference.com/w/cpp/language/union >> >> Can you guarantee that this works? > > This is C and not C++ and the provision to which you refer does not > apply. > > Reading from a member of a union other than the one last written to is > implementation defined in C89/90, and defined in C99 (with Technical > Corrigendum 3) and above Thank you for the correction and explanation! Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken