This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: autoconf for type sizes


Zack, looks good.  Some comments:

1.  (Optional) is the gcc_AC_C_CHAR_BIT test necessary?  Why not just
    default to 8 if it doesn't appear in limits.h?  I notice that
    gcc/glimits.h unconditionally sets it to 8 anyway, so its unlikely
    that we'll encounter a *host* which sets it to a different value.

2.  (Optional) while you're at it, why not use WORD_BIT/LONG_BIT (with
    defaults of 32 for both) and skip the sizeof test for int/long.

3.  (More serious) regarding:

 > #ifdef HAVE_LONG_LONG
 > #define HOST_BITS_PER_LONGLONG (CHAR_BIT * SIZEOF_LONG_LONG)
 > #endif

I think that this will fail when using a K&R stage1 bootstrap cc and
leave HOST_BITS_PER_LONGLONG undefined.  That it turn leaves
HOST_WIDEST_INT undefined, which renders cpp uncompilable.  You should
add a #else #define HOST_BITS_PER_LONGLONG 64 clause to handle older
compilers.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]