ju**********@yahoo.co.in writes:
Malcolm wrote: <ju**********@yahoo.co.in> wrote > How do we decide the value of INT_MIN and INT_MAX ? Does the
> compiler refers to this value to determine the size of int ?
>
The size of an int will be built into the compiler and be reflected in very
many places, such as the machine code it emits for basic operations.
INT_MIN and INT_MAX are written into limits.h, probably just before
shipping, so that the C programmer has access to the size of an integer. You
can't force a compiler to use a different size by editing these values. >
<snip>
You mean to say, that the file "limits.h" will be shipped as a part
of C compiler ?
Maybe.
The standard headers (which may or may not be implemented as files),
the implementation of the standard library functions, the compiler,
the linker, and whatever else is required to support them are all part
of "the implementation". How all these parts are assembled into a
conforming C implementation, and in particular how anything is
"shipped", is not specified by the standard. If the limits.h header
is provided separately from the compiler, that's just fine as long as
everything is consistent.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.