Sun C compiler bug

David Oskard dno at cvl.UUCP
Sat Jul 27 02:34:04 AEST 1985


[Eat my line!]

	On our Sun, the following C code gives an "illegal address"
error:
			if (*bp++) 
				...
where bp is     float  *bp =  SOMEARRAY[WHATEVER];

It has something to do with the evaluation of the conditional
expression (it works fine in regular expressions).  I haven't tried
to reproduce it with other variable types, but it may or may not be
type independent.  Has anybody out there fixed this bug?  Replies would
be greatly appreciated.  Please respond by mail.  I'll post the results.

Incidentally,  the bug can be avoided by doing

	if (*bp) { .... }  bp++;


					David Oskard
					seismo!rlgvax!cvl!dno
					dno at cvl.arpa

					University of Maryland
					Center For Automation Research



More information about the Comp.unix.wizards mailing list