[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CHECK_SIZEOF
From: |
Ralf Wildenhues |
Subject: |
Re: AC_CHECK_SIZEOF |
Date: |
Thu, 12 Apr 2007 21:39:44 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* Paul Eggert wrote on Thu, Apr 12, 2007 at 02:12:21AM CEST:
>
> I can, for C (except for AC_CHECK_ALIGNOF). I can't see how to do it
> for C++, but perhaps a C++ wizard can figure that out later. I
> installed this:
>
> 2007-04-11 Paul Eggert <address@hidden>
>
> * doc/autoconf.texi (Generic Types): Document the restrictions
> on types imposed by AC_CHECK_TYPE, AC_CHECK_TYPES.
> (Generic Compiler Characteristics): AC_CHECK_SIZEOF now works
> with objects too. Document the restrictions on its use.
> Document the restrictions on AC_CHECK_ALIGNOF's type argument.
> * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW):
> For C, just try sizeof (TYPE) and sizeof ((TYPE)); if the former
> works but the latter doesn't, then it's a valid type.
> This lets people use function types and so forth.
> For C++ there doesn't seem to be a simple solution, so leave it alone.
> (AC_CHECK_SIZEOF): Allow argument to be a variable.
> (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): Don't bother to invoke
> AC_CHECK_TYPE; that wasn't documented or necessary.
This regresses wrt. AC_CHECK_SIZEOF(struct { ... }) for C++.
maintainer-check exposes this failure.
Would you prefer the testsuite to be adjusted (skip the `AC_CHECK_SIZEOF
struct' tests if CC is a C++ compiler) and thus match your doc change,
or rather have AC_CHECK_SIZEOF be specifically different for C++ like
AC_CHECK_TYPE is now? At least in the former case I think NEWS should
mention this functionality regression.
Also, allowing objects for AC_CHECK_TYPE* should have a test, no?
Cheers,
Ralf