chars in conditional expression, 3b2 C compiler

Kim Chr. Madsen kimcm at olamb.UUCP
Wed Dec 31 09:00:00 AEST 1986


In article <2489 at sdsu.UUCP>, dlong at sdsu.UUCP (Dean Long) writes:
> 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
> 
> [some code]....


Well, tried this one out without any problems on this 3b2 running UNIX
System V R2.1 are you running Release 3 or an older (pre 2.1 release)
system V.

The only thing that really bugs me is the fact that chars are unsigned
and therefore the following code will fail:

	while ((c=getc(stream)) != EOF) putchar(c);

And you will have to redefine EOF to 255 (0377 or 0xff) or cast it to a char!


						Kim Chr. Madsen



More information about the Comp.bugs.sys5 mailing list