[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overflow protection in _AC_COMPUTE_INT_COMPILE

From: Akim Demaille
Subject: Re: Overflow protection in _AC_COMPUTE_INT_COMPILE
Date: 15 Nov 2000 18:49:25 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

Hi Kaveh,

We have a problem in CVS Autoconf: it uses the negative size array
trick to compute some compiler known values such as sizeof.  AFAIK you
are using a similar technique in GCC.

The problem we face is that the bundled cc under HP rejects the
computations of the array size.  Presumably while

        int foo[sizeof(int)]

would work, this doesn't

        int foo[4 == sizeof(int)]

(well, at least we know that the full formula is always rejected even
if it resolves to a valid size).

IIRC you are using the switch trick.  Did you face the same problem?
Are your macros *always* using this trick, or only when cross-compiling?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]