[Top][All Lists]

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

Re: Overflow protection in _AC_COMPUTE_INT_COMPILE

From: Pavel Roskin
Subject: Re: Overflow protection in _AC_COMPUTE_INT_COMPILE
Date: Wed, 15 Nov 2000 12:50:30 -0500 (EST)

Hello, Akim!

> Maybe I'm starting to understand what you mean.  Since this code is
> triggered only when cross-compiling, we don't care about it's failure
> on a compiler as stupid as the bundled cc, right?

Right. It was my (possibly wrong) assumption that _AC_COMPUTE_INT_COMPILE
is meant to be used only by cross-compilers.

> | I don't want to change the real code as a result of problems in the
> | testsuite caused by an arbitrary "cross_compiling=yes"
> It is not that much arbitrary: _AC_COMPUTE_INT_COMPILE was expected to
> work *everywhere*.  So we do have a problem.

It's true that some compilers can calculate some values at the compile
time, so that the result can either be extracted from the object file or
be determined based on the behaviour of the compiler (arrays with negative
indices, duplicate "case" etc).

However, I don't think that there is no standard that mandates what the
compiler should be able to calculate internally. But even if it exists,
the HP-UX compiler must be ignoring it.

I'm affraid that if we want to calculate a value we must run the compiled
code in the generic case.

Pavel Roskin

reply via email to

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