Determining machine characteristics (was: IsUnsigned() function?)

Will Crowder will at kfw.COM
Sat Jul 28 02:26:11 AEST 1990


In article <3473 at goanna.cs.rmit.oz.au> ok at goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:

>It's clear that an arithmetic expression which appears in _code_ must be
>evaluated as if evaluated by the target machine, but need arithmetic
>expressions in #ifs be evaluated the same way?  Is it possible for
>	#if is_ones_complement()
>to succeed and
>	if (is_ones_complement())
>to fail?

Yes, it is quite possible for that to fail.  The C preprocessor knows 
nothing about the C language itself.  For instance, try using a cast
in a preprocessor #if.

Will



More information about the Comp.lang.c mailing list