From: Paul Eggert Date: Sat, 11 May 2019 15:29:50 +0000 (-0700) Subject: fpucw: port to gcc -pedantic X-Git-Tag: v1.0~4956 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c7d0b4506574887be5835ae9ae892d365afbb98c;p=gnulib.git fpucw: port to gcc -pedantic * lib/fpucw.h (GET_FPUCW, SET_FPUCW): Use __extension__ if using ({ ... }). --- diff --git a/ChangeLog b/ChangeLog index fa615c1f72..e8934325e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2019-05-11 Paul Eggert + 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 caa51fe3bb..c3dfc9e6dc 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)); \ })