Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Pádraig Brady
On 21/09/2023 21:43, Bruno Haible wrote: Pádraig Brady wrote: I was trying to use -Wpedantic to check for standards conformance, where some code compilable on gcc 13 by default, is no longer compilable on gcc <= 10. ?? Do you mean, you want to use gcc 13 with some specific options, in order

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Pádraig Brady
On 21/09/2023 22:31, Paul Eggert wrote: On 2023-09-21 13:21, Pádraig Brady wrote: I was trying to use -Wpedantic to check for standards conformance, where some code compilable on gcc 13 by default, is no longer compilable on gcc <= 10. Like Bruno, I've not had much luck with -Wpedantic for

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Paul Eggert
On 2023-09-21 13:21, Pádraig Brady wrote: I was trying to use -Wpedantic to check for standards conformance, where some code compilable on gcc 13 by default, is no longer compilable on gcc <= 10. Like Bruno, I've not had much luck with -Wpedantic for doing that. The GCC manual even has

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Bruno Haible
Pádraig Brady wrote: > I was trying to use -Wpedantic to check for standards conformance, > where some code compilable on gcc 13 by default, is no longer compilable on > gcc <= 10. ?? Do you mean, you want to use gcc 13 with some specific options, in order to test whether gcc 10 can compile the

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Pádraig Brady
On 02/09/2023 18:54, Bruno Haible wrote: Bjarni Ingi Gislason wrote: While compiling "groff" with gcc (Debian 13.2.0-2) 13.2.0) and "-std=gnu2x": ../lib/openat-die.c: In function 'openat_save_fail': ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expr

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-04 Thread Bruno Haible
Eric Blake wrote: > We could, however, add use of the __extension__ keyword anywhere we > use ({...}) in public macros That's a good suggestion, thanks. Implemented through the patch below. In fact, use of the __extension__ keyword not only silences the -Wpedantic warning. It also allows to use

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-04 Thread Eric Blake
On Sat, Sep 02, 2023 at 07:54:13PM +0200, Bruno Haible wrote: > The option "-std=gnu2x" is useful; however, the option "-Wpedantic" that you > have enabled is generally much less useful. > > This code in lib/error.h exists for the purpose of providing actually > useful warnings about the control

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-02 Thread Bruno Haible
Bjarni Ingi Gislason wrote: > While compiling "groff" with gcc (Debian 13.2.0-2) 13.2.0) and "-std=gnu2x": > > ../lib/openat-die.c: In function 'openat_save_fail': > ./lib/error.h:410:8: warning: ISO C forbids braced-groups within exp

./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-02 Thread Bjarni Ingi Gislason
While compiling "groff" with gcc (Debian 13.2.0-2) 13.2.0) and "-std=gnu2x": ../lib/openat-die.c: In function 'openat_save_fail': ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic] 410 | : ({ \ |^ ./lib/error.h:470:7