chars in conditional expression, 3b2 C compiler

Dean Long dlong at sdsu.UUCP
Fri Dec 26 09:23:06 AEST 1986


Try these two commands on a 3b2 running SYSV unix on the following program:

cc -c sub.c		# should work OK
cc -DCRASH -c sub.c	# /lib/ccom should core dump

Does anyone have any ideas?
----------------------------------------------------------------------

sub()
{
        char x;
        int i;

        i = ((x > 0) ? 1 : 0);
        i = ((x >= 1) ? 1 : 0);
#ifdef CRASH
        i = ((x >= 0) ? 1 : 0);
#endif
}
-- 
Dean Long
San Diego State Univ.
sdcsvax!sdsu!dlong



More information about the Comp.bugs.sys5 mailing list