64 bit architectures and C/C++

shap shap at shasta.Stanford.EDU
Tue May 7 04:03:46 AEST 1991


In article <5535 at goanna.cs.rmit.oz.au> ok at goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
>
>sizeof (char) is fixed at 1.  However, it should be quite easy to set up
>a compiler so that the user can specify (whether in an environment variable
>or in the command line) what sizes to use for short, int, long, and (if you
>want to imitate GCC) long long.  Something like
>	setenv CINTSIZES="16,32,32,64"	# short,int,long,long long.
>The system header files would have to use the default types (call them
>__int, __short, and so on) so that only one set of system libraries would
>be needed, and this means that using CINTSIZES to set the sizes to something
>other than the defaults would make the compiler non-conforming.

In practice (having tried it once for other reasons), this doesn't work
as well as you might like.  The problem comes from the fact that the
vendor doesn't control the independent software vendors.  For their
part, the ISV's want portability, so it's real hard to convince them of
the merits of converting their header files.


It also becomes an ongoing support and update nightmare.

Jonathan



More information about the Comp.lang.c mailing list