Attention to all cc hackers, here workaround for gcc 2.6.0
optimizer bug (old code works without -O and don't works with -O) old !(x & y) != !(a & b) changed to !!(x & y) != !!(a & b)
This commit is contained in:
@@ -337,8 +337,10 @@ makech(win, wy)
|
||||
}
|
||||
|
||||
/* Enter/exit standout mode as appropriate. */
|
||||
if (SO && !(nsp->attr & __STANDOUT) !=
|
||||
!(curscr->flags & __WSTANDOUT)) {
|
||||
/* don't use simple ! here due to gcc -O bug */
|
||||
if (SO && !!(nsp->attr & __STANDOUT) !=
|
||||
!!(curscr->flags & __WSTANDOUT)
|
||||
) {
|
||||
if (nsp->attr & __STANDOUT) {
|
||||
tputs(SO, 0, __cputchar);
|
||||
curscr->flags |= __WSTANDOUT;
|
||||
|
||||
Reference in New Issue
Block a user