Hello Stepan, * Stepan Kasal wrote on Mon, Sep 04, 2006 at 06:30:19PM CEST: > On Sun, Sep 03, 2006 at 10:00:08AM +0200, Ralf Wildenhues wrote: > > * Stepan Kasal wrote on Sat, Sep 02, 2006 at 02:41:48PM CEST: > > > On Sat, Sep 02, 2006 at 12:09:49PM +0200, Ralf Wildenhues wrote: > > > > > > > But that public version would have to include the cast to long int, > > > > for the HP compiler, which would be at least a bit ugly. > > > > > > Ralf, could you please give me a reference to the problem? > > > > See the comment in the implementation of AC_CHECK_SIZEOF. > > Well, it only says that `sizeof(foo) >= 0' has problems.
Yes, but I noticed the issue with AC_CHECK_ALIGNOF as well. http://lists.gnu.org/archive/html/autoconf-patches/2006-03/msg00006.html Also, see the more verbose description in autoconf.info(Specific Compiler Characteristics). And more indication that this bug (or these bugs; it's not clear to me there was just one) is of different nature: http://lists.gnu.org/archive/html/autoconf-patches/2002-02/msg00001.html http://lists.gnu.org/archive/html/autoconf-patches/2001-10/msg00087.html Unfortunately (well, not really ;-), it seems the compiler I have access to has recently been upgraded and does not have this bug any more. (FWIW, I haven't tried HP testdrive compilers.) > I do not see what workaround is needed for `sizeof (ptrdiff_t) <= > sizeof (int)', if any. Perhaps > (long int) sizeof (ptrdiff_t) <= (long int) sizeof (int) ? > I do not think that we want > (long int) (sizeof (ptrdiff_t) <= sizeof (int)) Actually, why not? (This is an honest question!) > Anyway, I would suggest to modify ptrdiff_max.m4 to use > AC_LANG_BOOL_COMPILE_IFELSE([sizeof (ptrdiff_t) <= sizeof (int)]) > and wait for a bug report. I'd definitely object this suggestion. Cheers, Ralf
