Time to standardize "true" and "false"

Tim Olson tim at cayman.amd.com
Fri Sep 29 04:18:50 AEST 1989


In article <8862 at etana.tut.fi> pl at etana.tut.fi (Lehtinen Pertti) writes:
| From article <12070 at cit-vax.Caltech.Edu>, by wen-king at cit-vax.Caltech.Edu (King Su):
| > 
| > #define bool(a) (!!(a))
| > 
| > Then just use bool(X) whenever you wanted to use (bool)X.
| > 
| 
| 	Then suddenly just behind the corner cames C-compiler from
| 	ACME-corporation and realizes '!!a' -> negation of negation is
| 	same as original -> we can optimize it away.
| 
| 	Nice, isn't it.  And too real too.

And wrong, too.  Do you know of a compiler that does this in the
general case?

	-- Tim Olson
	Advanced Micro Devices
	(tim at amd.com)



More information about the Comp.lang.c mailing list