diff options
author | ache <ache@FreeBSD.org> | 1994-09-22 03:58:43 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-09-22 03:58:43 +0000 |
commit | a96fe421a5e4ec8d169f89929f7fc19f475e758e (patch) | |
tree | ba15aeddef9f357daebbfc7efd6fa5cca90ec0e5 /lib/libcurses/refresh.c | |
parent | 445e6edeb6f4e00eddd018dc1c38dd5e2cf2a331 (diff) | |
download | FreeBSD-src-a96fe421a5e4ec8d169f89929f7fc19f475e758e.zip FreeBSD-src-a96fe421a5e4ec8d169f89929f7fc19f475e758e.tar.gz |
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)
Diffstat (limited to 'lib/libcurses/refresh.c')
-rw-r--r-- | lib/libcurses/refresh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c index d8860b4..b6d432b 100644 --- a/lib/libcurses/refresh.c +++ b/lib/libcurses/refresh.c @@ -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; |