]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/c.m4 (AC_C_CONST): Don't used shadowed vars, to
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Aug 2006 20:09:51 +0000 (20:09 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Aug 2006 20:09:51 +0000 (20:09 +0000)
pacify insanely picky compilers.  Problem reported by Eric Blake.

ChangeLog
lib/autoconf/c.m4

index 615c40d92927eec00331aeecc34df6b79f58aef2..d4689386282de7b4b4bee5030ae5007fecb3b3d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * lib/autoconf/c.m4 (AC_C_CONST): Don't used shadowed vars, to
+       pacify insanely picky compilers.  Problem reported by Eric Blake.
+
        * doc/autoconf.texi (Posix Variants): INTERACTIVE Unix is no
        longer supported by Sun.
 
index 84047d15fcd2c13c1468fedb76a0bb2b957fc76f..4f65475cea7d4cdaa118326583fb36fbd858428d 100644 (file)
@@ -1437,10 +1437,10 @@ AC_DEFUN([AC_C_CONST],
 #ifndef __cplusplus
   /* Ultrix mips cc rejects this.  */
   typedef int charset[2];
-  const charset x;
+  const charset cs;
   /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *ccp;
-  char **p;
+  char const *const *pcpcc;
+  char **ppc;
   /* NEC SVR4.0.2 mips cc rejects this.  */
   struct point {int x, y;};
   static struct point const zero = {0,0};
@@ -1449,11 +1449,11 @@ AC_DEFUN([AC_C_CONST],
      an arm of an if-expression whose if-part is not a constant
      expression */
   const char *g = "string";
-  ccp = &g + (g ? g-g : 0);
+  pcpcc = &g + (g ? g-g : 0);
   /* HPUX 7.0 cc rejects these. */
-  ++ccp;
-  p = (char**) ccp;
-  ccp = (char const *const *) p;
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
   { /* SCO 3.2v4 cc rejects this.  */
     char *t;
     char const *s = 0 ? (char *) 0 : (char const *) 0;
@@ -1480,7 +1480,7 @@ AC_DEFUN([AC_C_CONST],
     const int foo = 10;
     if (!foo) return 0;
   }
-  return !x[0] && !zero.x;
+  return !cs[0] && !zero.x;
 #endif
 ]])],
                   [ac_cv_c_const=yes],