On Wed, May 28, 2003 at 05:20:15PM +0100, Dr Andrew C Aitchison wrote:
> On Wed, 28 May 2003, Dr Andrew C Aitchison wrote:
> 
> > On Wed, 28 May 2003, Thomas Dickey wrote:
> > 
> > > On Wed, May 28, 2003 at 07:16:08AM -0600, Marc Aurele La France wrote:
> > > > On Wed, 28 May 2003, Dr Andrew C Aitchison wrote:
> > > > 
> > > > > Patch 3.62 to xc/programs/xterm/screen.c breaks xterm resizing.
> > > > > The call to SET_TTYSIZE no longer happens when TRACE isn't enabled.
> > > > > Fix is to revert to version 3.61
> > > > 
> > > > OK.  I'll fix it.
> > > 
> > > presumably not by simply rolling back the change...
> > 
> > Why not ?
> > 
> > Old, working code:
> > -    code = SET_TTYSIZE(screen->respond, ts);
> > -    TRACE(("return %d from SET_TTYSIZE %dx%d\n", code, rows, cols));
> > 
> > New, broken code:
> > +    TRACE(("return %d from SET_TTYSIZE %dx%d\n",
> > +         SET_TTYSIZE(screen->respond, ts), rows, cols));
> > 
> > in the broken version since TRACE(...) is a null macro, cpp removes 
> > the call to SET_TTYSIZE.
> 
> I take some ofthat back.
> The version without code is definitely wrong.
> The version with code is working, but is susceptible to optimization.

My guess is that the compiler optimizer is broken, and discarding the
assignment.  Apparently Marc is guessing the same thing, since he added a
        (void)code;

after the TRACE statement (this is "good" for gcc, at the expense of increasing
the noise level in other compilers).  However, if that's the case, a lot more
than xterm would be broken, so it would be useful to be able to test this.

It's ok to discard
        int x = 1;
if x is never used, but not
        int x = foo();

-- 
Thomas E. Dickey <[EMAIL PROTECTED]>
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to