--- Comment #4 from cdfrey at netdirect dot ca 2005-12-05 04:00 ---
Just adding a link to a comp.lang.c++.moderated discussion on this, for future
reference, when other folks run into this again.
Subject line: alias rules and optimization
http://groups.google.ca/group/comp.lang.c++.mode
--- Comment #3 from pinskia at gcc dot gnu dot org 2005-12-03 00:40 ---
(In reply to comment #2)
> A warning would be really nice.
The warning was filed as PR 14024 and fixed for 4.2.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25235
--- Comment #2 from cdfrey at netdirect dot ca 2005-12-03 00:32 ---
Thanks for the info!
I can understand the examples in the article at
http://mail-index.netbsd.org/tech-kern/2003/08/11/0001.html but with my example
source code in this bug report, I can't seem to follow the optimizatio
--- Comment #1 from pinskia at gcc dot gnu dot org 2005-12-02 23:32 ---
You are violating C++ aliasing rules:
uint64_t back = pa_bswap_64(conv);
double d2 = *((double*)&back);
*** This bug has been marked as a duplicate of 21920 ***
--
pinskia at gcc dot gnu dot org