[Bug c/14319] incorrect optimization of union of structs with common initial sequences
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 27 19:24:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-02-27 19:24 -------
Leaving aside questions of what the standard actually (is supposed to) mean:
if the aliasing rules are changed as you propose, then
- adding a union somewhere to a code will change the code generated for
the function in your example, even if this union is not actually used
anywhere
- this takes away quite a number of opportunities for optimization, since
it is certainly not uncommon for code to use small structures that have,
say, an integer or pointer as first argument (think iterators and
accessors).
In my eyes, both are not exactly positive consequences. But that's a personal
opinion, not a language lawyer's statement.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14319
More information about the Gcc-bugs
mailing list