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:
Andrey A. Chernov 1994-09-22 03:58:43 +00:00
parent 8354392e6b
commit fd437b2bb2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2973

View File

@ -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;