From: Gabriel Dos Reis <gdr@cs.tamu.edu>
To: "Mattias Engdegård" <mattias@virtutech.se>
Cc: gcc-help@gcc.gnu.org
Subject: Re: How to type-pun and why
Date: Mon, 12 Jun 2006 15:18:00 -0000 [thread overview]
Message-ID: <873beaflmi.fsf@soliton.cs.tamu.edu> (raw)
In-Reply-To: <e6jvfg$kmq$1@sea.gmane.org>
Mattias Engdegård <mattias@virtutech.se> writes:
| Using a union intermediate instead,
|
| union { double d; uint64_t x; } u;
| u.d = something;
| uint64_t x = u.x;
|
| works as expected, but I would like to know why - if it is a matter of luck
| with the current implementation it might cease working when the compiler
| changes or becomes more aggressive in the future.
that union trick is invalid as well, from the standard point of view.
However, GCC makes a guarantee that it will be supported.
next prev parent reply other threads:[~2006-06-12 15:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-12 15:05 Mattias Engdegård
2006-06-12 15:18 ` Gabriel Dos Reis [this message]
2006-06-12 15:24 ` Perry Smith
2006-06-12 16:01 ` Gabriel Dos Reis
2006-06-12 15:23 ` Andrew Haley
2006-06-12 18:04 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873beaflmi.fsf@soliton.cs.tamu.edu \
--to=gdr@cs.tamu.edu \
--cc=gcc-help@gcc.gnu.org \
--cc=mattias@virtutech.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).