bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 2/2] fpucw: port to gcc -pedantic


From: Paul Eggert
Subject: [PATCH 2/2] fpucw: port to gcc -pedantic
Date: Sat, 11 May 2019 08:32:31 -0700

* lib/fpucw.h (GET_FPUCW, SET_FPUCW):
Use __extension__ if using ({ ... }).
---
 ChangeLog   | 4 ++++
 lib/fpucw.h | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fa615c1f7..e8934325e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2019-05-11  Paul Eggert  <address@hidden>
 
+       fpucw: port to gcc -pedantic
+       * lib/fpucw.h (GET_FPUCW, SET_FPUCW):
+       Use __extension__ if using ({ ... }).
+
        crypto/af_alg: port to strict C compilers
        * lib/af_alg.c: Include af_alg.h regardless, so that the
        compilation unit is nonempty.
diff --git a/lib/fpucw.h b/lib/fpucw.h
index caa51fe3b..c3dfc9e6d 100644
--- a/lib/fpucw.h
+++ b/lib/fpucw.h
@@ -70,12 +70,12 @@ typedef unsigned short fpucw_t; /* glibc calls this 
fpu_control_t */
 # define FPU_PC_DOUBLE 0x200    /* glibc calls this _FPU_DOUBLE */
 # define FPU_PC_EXTENDED 0x300  /* glibc calls this _FPU_EXTENDED */
 
-# define GET_FPUCW() \
+# define GET_FPUCW() __extension__ \
   ({ fpucw_t _cw;                                               \
      __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw));         \
      _cw;                                                       \
    })
-# define SET_FPUCW(word) \
+# define SET_FPUCW(word) __extension__ \
   (void)({ fpucw_t _ncw = (word);                               \
            __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw));  \
          })
-- 
2.21.0




reply via email to

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