--- Comment #4 from steven at gcc dot gnu dot org 2007-11-29 17:23 ---
Try compiling with -fno-strict-aliasing. This is only automatically enabled at
-O2 or higher. See the fine manual.
I'm not sure what you mean with "more efficient than memcpy". If you mean more
efficient as in pro
--- Comment #3 from rguenth at gcc dot gnu dot org 2007-11-29 17:21 ---
The recommended (and optimized) way to do this is:
union {
INT64 i;
double d;
} x;
x.d = arg;
return x.i;
you can also make your way work optimized by specifying -fno-strict-aliasing.
That it works without op
--- Comment #2 from dvt at isoft dot fr 2007-11-29 17:09 ---
(In reply to comment #1)
> You are violating C aliasing rules. Use memcpy (as you did) or a union to
> guard
> the type punning.
> *** This bug has been marked as a duplicate of 21920 ***
Are-you sure? Were is the rule that f
--- Comment #1 from rguenth at gcc dot gnu dot org 2007-11-29 16:54 ---
You are violating C aliasing rules. Use memcpy (as you did) or a union to
guard
the type punning.
*** This bug has been marked as a duplicate of 21920 ***
--
rguenth at gcc dot gnu dot org changed: