bug-gnulib
[Top][All Lists]
Advanced

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

Re: signed.m4 again


From: Ralf Wildenhues
Subject: Re: signed.m4 again
Date: Tue, 17 Oct 2006 21:13:35 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Paul,

Apologies for the delay.

* Paul Eggert wrote on Thu, Oct 12, 2006 at 10:28:27PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> 
> > -   [AC_TRY_COMPILE(, [signed char x; return !x;],
> > +   [AC_TRY_COMPILE(, [signed char x; return !sizeof x;],
> 
> Wouldn't this be a bit better, in the sense of catching
> more compilers that are a bit dodgy?
> 
>    [AC_TRY_COMPILE(, [signed char x = -127, y = 127; return ! (x < y);],

Yes, thank you.  OK to apply, Bruno?

Cheers,
Ralf

        * m4/signed.m4 (bh_C_SIGNED): Avoid uninitialized variable
        warning.

Index: m4/signed.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/signed.m4,v
retrieving revision 1.5
diff -u -r1.5 signed.m4
--- m4/signed.m4        22 Sep 2006 20:10:26 -0000      1.5
+++ m4/signed.m4        17 Oct 2006 19:12:36 -0000
@@ -1,4 +1,4 @@
-# signed.m4 serial 2
+# signed.m4 serial 3
 dnl Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,7 @@
 AC_DEFUN([bh_C_SIGNED],
 [
   AC_CACHE_CHECK([for signed], bh_cv_c_signed,
-   [AC_TRY_COMPILE(, [signed char x; return !x;],
+   [AC_TRY_COMPILE(, [signed char x = -127, y = 127; return ! (x < y);],
       bh_cv_c_signed=yes, bh_cv_c_signed=no)])
   if test $bh_cv_c_signed = no; then
     AC_DEFINE(signed, ,




reply via email to

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