2009/8/22 Dominik Vogt <[email protected]>: > On Sat, Aug 22, 2009 at 10:58:23AM -0500, fvwm-workers wrote: >> CVSROOT: /home/cvs/fvwm >> Module name: fvwm >> Changes by: tadam 09/08/22 10:58:23 >> >> Modified files: >> . : ChangeLog >> fvwm : geometry.c >> >> Log message: >> Fix gcc -O3 bug when resizing aspect-ratio windows. >> >> Due to how the calculations are done in >> geometry.c:__cs_handle_aspect_ratio(), the compiler optimizes the out >> completely -- make the local variables to that function volatile to stop an >> infinite loop in FVWM when resizing a window with aspect ratio, such as >> Mplayer. > > Which version of gcc is that? I had some trouble with gcc > optimization recently in another project. There's probably an > option to disable the offending optimization.
It's the following: [n6ta...@shuttle][~]% gcc-4.3 --version gcc-4.3 (Debian 4.3.4-1) 4.3.4 But it's also just with -O3 -- note that I had similar problems with -O3 with GCC-4.1.3 as well. Without -O3 (i.e., -O2) both versions mentioned work just fine with FVWM. What was you doing at work recently with this? I've had to mess around with -O a lot recently, and certainly -O3 with recent 4.1.X versions of GCC give very different results to the same piece of code each time -- and I've not yet looked under the hood to see what it's deciding to optimize out yet. Now, I have read that -O3 is not recommended with GCC 4,X, but there's conflicting opinions about this. (By all means discuss this off-list if appropriate, as it's not really FVWM-specific.) -- Thomas Adam
