autoconf for type sizes

Joseph S. Myers jsm28@cam.ac.uk
Tue Mar 13 11:07:00 GMT 2001


On Tue, 13 Mar 2001, Zack Weinberg wrote:

> *shrug* I think it would involve less Makefile contortions if we
> don't generate it on the fly, particularly since we already have
> machinery to do float.h that way.

I can always write a generator program to work in this way.  We would need
to work out how to handle targets where the type sizes vary depending on
compiler options: do we create a special limits.h for each one, or do we
arrange for different limits.h files (ILP32, LP64, etc.) to be selected by
the compiler depending on -m options passed (as with multilibs - AFAIK the
compiler will DTRT with multilib include directories, once they've been
installed).

> Larger policy question: should we add -std= switches for the bigger
> standards that incorporate ISO C?  (POSIX.n, SVIDn, XPG, etc - look at
> glibc's <features.h>) I'd vote yes but only after we get a new driver.

Some targets already have undocumented -posix, -pthread, etc. options.  
These should be unified in some consistent scheme.  We need to define how
such options relate to other -std settings, __STRICT_ANSI__, -pedantic,
builtins, etc..  For example, would -std=posix96 imply -std=c89
(__STRICT_ANSI__ with a suitable value of _POSIX_C_SOURCE) but
-std=posix01 (or -std=austin for now) imply -std=c99 (__STRICT_ANSI__,
__STDC_VERSION__=199901L and appropriate feature test macro)?

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc-patches mailing list