]> Savannah Git Hosting - gnulib.git/commitdiff
fpucw: port to gcc -pedantic
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 May 2019 15:29:50 +0000 (08:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 May 2019 15:32:11 +0000 (08:32 -0700)
* lib/fpucw.h (GET_FPUCW, SET_FPUCW):
Use __extension__ if using ({ ... }).

ChangeLog
lib/fpucw.h

index fa615c1f72cd6a0625c4b1ac3db5b0c34382aa99..e8934325e1e815f8ec8717926eb7374263440c92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2019-05-11  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index caa51fe3bbbb8df7434a0a88cc5132f138cec121..c3dfc9e6dc79b075f380cfd55dba6f908187d955 100644 (file)
@@ -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));  \
          })