Of Standards and Inventions: A Cautionary Tale

Henry Spencer henry at utzoo.uucp
Thu Apr 14 02:32:35 AEST 1988


> 	#elif (1<<63) < 0
> 	#define int_size_in_bits	64
> 	...
> do the job, or may the preprocessor and compiler interpret int constants
> differently?

As I recall (my copy of the draft isn't handy), there is some room for
different interpretation of compile-time operations.  Furthermore, even
ignoring that, there is another problem:  the result of shifting beyond
the available number of bits is implementation-defined (or possibly
even undefined).
-- 
"Noalias must go.  This is           |  Henry Spencer @ U of Toronto Zoology
non-negotiable."  --DMR              | {allegra,ihnp4,decvax,utai}!utzoo!henry



More information about the Comp.lang.c mailing list