From c7d0b4506574887be5835ae9ae892d365afbb98c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 11 May 2019 08:29:50 -0700 Subject: [PATCH] fpucw: port to gcc -pedantic * 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 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)); \ }) -- 2.39.5