On Mon, 21 Jan 2019, Richard Biener wrote: > I'm not sure whether it's permitted to use this in C++ or not (and whether > the C usage is now officially sanctioned other than via a non-normative > footnote) - but at least GCC will guarantee that it works.
My impression is that, via the "active member" wording, C++ standard says clearly this is UB. I assume on the GCC side the intention is to treat it like in C (for POD types only?..), but I don't want to go there in the "Vector Extensions" section. Hence my patch limits the suggestion to C. I think in C++ it's a bit less of an issue anyway, because people can use operator overloading to achieve a similar end result, with some extra legwork. Do you want me to change the text somehow? > Might be interesting to show how to do argument marshalling with the > same union. Sorry, I don't see what you mean here; can you give an example or elaborate? Thanks! Alexander