Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Bugs in perl 3.0 pl 8 -- return statement Message-ID: <7080@jpl-devvax.JPL.NASA.GOV> Date: 15 Feb 90 18:22:06 GMT References: <4080004@hpausla.aso.hp.com> <4080005@hpausla.aso.hp.com> <418@proexam.UUCP> <7000@jpl-devvax.JPL.NASA.GOV> <7068@jpl-devvax.JPL.NASA.GOV> <5716@videovax.tv.tek.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 34 In article <5716@videovax.tv.tek.com> bart@videovax.tv.tek.com (Bart Massey) writes: : Heck, I'll say it. Try running GCC-1.36 -O over the following C code, : and be surprised that, at least on the VAX and 68k, the structure member : ends up in a register. Note that, at least as of 1.36, this is a very : fragile optimization, but it's bound to get nothing but better. : : ----- : struct foo { int a, b; }; : : main() : { : struct foo bar; : : for( bar.b = 0; bar.b < 10; bar.b++ ) : nothing( bar.b ); /* force an external reference */ : } : ----- : : And the brand-new DecStation 3100 (PMAX) Ultrix compiler does global : register optimizations, or so I am told. : : Aren't compilers wonderful? Gack. Ok, I'll spread a few more judicious volatiles here and there on my globals and structure elements. Blech. All this gobblygook just to make life a little easier for a few compiler writers. setjmp()/longjmp() are NOT in the same class as asynchronous interrupts. "volatile" must go. This is non-negotiable. :-) :-) :-) Just another puerile hacker, Larry