From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Sidwell To: "Kaveh R. Ghazi" Cc: dje AT watson.ibm.com, toon AT moene.indiv.nluug.nl, N8TM AT aol.com, craig AT jcb-sc.com, espie AT quatramaran.ens.fr, gcc AT gcc.gnu.org, mark AT codesourcery.com, nik AT tiuk.ti.com, richard.earnshaw AT arm.com Subject: Re: type based aliasing again Date: Wed, 15 Sep 1999 08:57:00 -0000 Message-id: <37DFC19E.F5B44C6A@acm.org> References: <199909151527.LAA25557@caip.rutgers.edu> X-SW-Source: 1999-09/msg00626.html "Kaveh R. Ghazi" wrote: > I have concerns about removing strict aliasing from -O2. > > Most users probably use -O2 simply because that's what most people > have learned do, e.g. because autoconf defaults to when -O2 you build > a package. So I think that strict aliasing will get much less usage > even when it is safe to use it. Good point, but what if we persuaded the autoconf maintainers to make the next autoconf release emit -O3? (And gcc then did -fstrict-aliasing at -O3, not at -O2). Non-maintained packages wouldn't upgrade autoconf and thus remain at -O2, whereas maintained packages would (presumably) upgrade autoconf and, if they broke the aliasing rules would then break. The maintainer would see things compiled at -O3, not -O2 and (hopefully) think 'Mmm, I wonder what -O3 means'. Similarly, users of autoconf would see the same difference in their own (unreleased) code. The trouble with this approach, is what about the next "ISO conformant optimization that breaks a bogus assumption people make"? The approach doesn't scale. I suppose we could amend the above to have autoconf emit `-O2 -strict-aliasing'. (That might be an even bigger clue!) nathan -- Dr Nathan Sidwell :: Computer Science Department :: Bristol University I have seen the death of PhotoShop -- it is called GIMP nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Sidwell To: "Kaveh R. Ghazi" Cc: dje@watson.ibm.com, toon@moene.indiv.nluug.nl, N8TM@aol.com, craig@jcb-sc.com, espie@quatramaran.ens.fr, gcc@gcc.gnu.org, mark@codesourcery.com, nik@tiuk.ti.com, richard.earnshaw@arm.com Subject: Re: type based aliasing again Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <37DFC19E.F5B44C6A@acm.org> References: <199909151527.LAA25557@caip.rutgers.edu> X-SW-Source: 1999-09n/msg00626.html Message-ID: <19990930180200.yqtQ9tzde4OhoUynlVjuXXORIDtc_nUQ1OhPZyq2a9o@z> "Kaveh R. Ghazi" wrote: > I have concerns about removing strict aliasing from -O2. > > Most users probably use -O2 simply because that's what most people > have learned do, e.g. because autoconf defaults to when -O2 you build > a package. So I think that strict aliasing will get much less usage > even when it is safe to use it. Good point, but what if we persuaded the autoconf maintainers to make the next autoconf release emit -O3? (And gcc then did -fstrict-aliasing at -O3, not at -O2). Non-maintained packages wouldn't upgrade autoconf and thus remain at -O2, whereas maintained packages would (presumably) upgrade autoconf and, if they broke the aliasing rules would then break. The maintainer would see things compiled at -O3, not -O2 and (hopefully) think 'Mmm, I wonder what -O3 means'. Similarly, users of autoconf would see the same difference in their own (unreleased) code. The trouble with this approach, is what about the next "ISO conformant optimization that breaks a bogus assumption people make"? The approach doesn't scale. I suppose we could amend the above to have autoconf emit `-O2 -strict-aliasing'. (That might be an even bigger clue!) nathan -- Dr Nathan Sidwell :: Computer Science Department :: Bristol University I have seen the death of PhotoShop -- it is called GIMP nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk