bug-gnulib
[Top][All Lists]
Advanced

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

Re: shadowing warning from test-printf-posix.h


From: Bruno Haible
Subject: Re: shadowing warning from test-printf-posix.h
Date: Sun, 13 Apr 2008 21:57:49 +0200
User-agent: KMail/1.5.4

Jim Meyering wrote:
> > * tests/test-frexpl.c (exp): #define to 'exponent' to avoid
> > shadowing the function.
> > * tests/test-frexp.c: Likewise.

I applied this on 2008-04-02, but it broke compilation on AIX 4 and AIX 5
with xlc, because that system defines exp already as a macro in <math.h>:
#define exp(__x)          __exp(__x)

This fixes it.

2008-04-13  Bruno Haible  <address@hidden>

        Fix AIX compilation failure introduced on 2008-04-02.
        * tests/test-frexp.c (exp): Undefine before redefining.
        * tests/test-frexpl.c (exp): Likewise.

*** tests/test-frexp.c.orig     2008-04-13 21:56:14.000000000 +0200
--- tests/test-frexp.c  2008-04-13 21:53:39.000000000 +0200
***************
*** 29,34 ****
--- 29,35 ----
  
  /* Avoid some warnings from "gcc -Wshadow".
     This file doesn't use the exp() function.  */
+ #undef exp
  #define exp exponent
  
  #define ASSERT(expr) \
*** tests/test-frexpl.c.orig    2008-04-13 21:56:14.000000000 +0200
--- tests/test-frexpl.c 2008-04-13 21:53:39.000000000 +0200
***************
*** 29,34 ****
--- 29,35 ----
  
  /* Avoid some warnings from "gcc -Wshadow".
     This file doesn't use the exp() function.  */
+ #undef exp
  #define exp exponent
  
  #define ASSERT(expr) \





reply via email to

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