From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23774 invoked by alias); 19 Jun 2007 11:27:26 -0000 Received: (qmail 23081 invoked by uid 48); 19 Jun 2007 11:27:15 -0000 Date: Tue, 19 Jun 2007 11:27:00 -0000 Message-ID: <20070619112715.23080.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/32397] wrong instruction order generated In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rask at sygehus dot dk" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg01567.txt.bz2 ------- Comment #3 from rask at sygehus dot dk 2007-06-19 11:27 ------- You can use memcpy (&int, &float, min (sizeof (int), sizeof (float))) and vice versa. I suppose you can also memcpy() into or out of a char array of the right size. If you were to use the GCC extension of using a union, it would look something like this: double x; cyg_uint32 hx, lx; Cyg_libm_ieee_double_shape_type tmp; tmp.value = x; hx = tmp.parts.msw lx = tmp.parts.lsw -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32397