From mboxrd@z Thu Jan 1 00:00:00 1970 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----BK9M79Z278HVGSVGXL84UFJ3WMENRV" From: Ryan Gonzalez Date: Mon, 15 Jun 2015 09:41:58 -0500 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>, Charles Forsyth Message-ID: Content-Transfer-Encoding: 7bit Subject: Re: [9fans] make passive aggressive gcc Topicbox-Message-UUID: 58a85cca-ead9-11e9-9d60-3106f5b1d025 ------BK9M79Z278HVGSVGXL84UFJ3WMENRV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ugh, I know. It caused Judy arrays to segfault a lot. >>From my personal experience, Clang does *not* have this problem. On June 15, 2015 3:21:56 AM CDT, Charles Forsyth wrote: >If you're using gcc 4.8.2 to compile ... anything, really ... but >certainly >Plan 9 or Inferno components, >and those use for loops with arrays, be sure to include the compilation >options >-fno-strict-aliasing\ >-fno-aggressive-loop-optimizations\ >and it will save you some time and effort. >It will save compilation time (not that you'll notice with that >sluggard) >because it won't >fuss even more with your program, and it will save effort, because you >won't have >to debug simple loops that have bounds changed, are removed completely, >or >otherwise wrecked. >You can find discussions of it elsewhere (which is how I found compiler >options to stop it). >I'd forgotten all about it until it surfaced again. --=20 Sent from my Android device with K-9 Mail. Please excuse my brevity. ------BK9M79Z278HVGSVGXL84UFJ3WMENRV Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ugh, I know. It caused Judy arrays to segfault a= lot.

>>From my personal experience, Clang does *not* have this problem.


On June 15, 2015 3:21:56 AM CDT, Charl= es Forsyth <charles.forsyth@gmail.com> wrote:
If you're using gcc 4.8.2 to compile ... anything, r= eally ... but certainly Plan 9 or Inferno components,
and those use f= or loops with arrays, be sure to include the compilation options
-fno-strict-ali= asing\
-fno= -aggressive-loop-optimizations\
and it will save you some= time and effort.
It will save compilation time (not that you&#= 39;ll notice with that sluggard) because it won't
fuss even= more with your program, and it will save effort, because you won't h= ave
to debug simple loops that have bounds changed, are removed= completely, or otherwise wrecked.
You can find discussions of = it elsewhere (which is how I found compiler options to stop it).
I'd forgotten all about it until it surfaced again.


--
Sent from my Android device with K-9 Mail. Please excuse my brevity. ------BK9M79Z278HVGSVGXL84UFJ3WMENRV--