Hans-Peter Nilsson wrote:
> There's background in
> <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36593>.  Neither
> Richi nor me could find the union-assignment "gcc extension" at
> a glance, probably because it's not an *extension* but an
> implementation-defined behavior, and actually duly documented as
> such.  However, to cross-reference that section together with
> the clarifying type-punning blurb in the -fstrict-aliasing
> documentation seems would be an improvement, and apparently
> there's enough confusion about casting, pointers and unions to
> call for an extra example, covering the offending code in the
> PR.
> 
> So far the RFA.  The RFC is whether (to reject this patch and
> call for another) to allow the cast-through-pointer-to-union in
> the example and the PR as a variant of the blessed
> implementation-defined type-punning using unions.  IMHO not, but
> the offending code is from a canonical strtod implementation
> imported into newlib, and enough people are confused already,

I thought cast-through-pointer-to-union didn't work and was already
disallowed; we've been around all this already.  This patch of yours
already documents uncontroversial behaviour.

I don't like the phrase "might not work".  It's better just to say "is not
allowed".

Andrew.

Reply via email to