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: note: in expansion of macro '__gl_error_call'
  470 |       __gl_error_call (error, status, __VA_ARGS__)
      |       ^~~~~~~~~~~~~~~
../lib/openat-die.c:37:3: note: in expansion of macro 'error'
   37 |   error (exit_failure, errnum,
      |   ^~~~~
../lib/openat-die.c: In function 'openat_restore_fail':
./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions 
[-Wpedantic]
  410 |      : ({ \
      |        ^
./lib/error.h:470:7: note: in expansion of macro '__gl_error_call'
  470 |       __gl_error_call (error, status, __VA_ARGS__)
      |       ^~~~~~~~~~~~~~~
../lib/openat-die.c:56:3: note: in expansion of macro 'error'
   56 |   error (exit_failure, errnum,
      |   ^~~~~

  The relevant code in lib/error.in.h is

/* If STATUS is a not a constant, the function call may or may not return;
   therefore -Wimplicit-fallthrough will produce a warning.  Use a compound
   statement in order to evaluate STATUS only once.
   If STATUS is a constant, we don't use a compound statement, because that
   would trigger a -Wimplicit-fallthrough warning even when STATUS is != 0,
   when not optimizing.  This causes STATUS to be evaluated twice, but
   that's OK since it does not have side effects.  */
# define __gl_error_call(function, status, ...) \
    (__builtin_constant_p (status) \
     ? __gl_error_call1 (function, status, __VA_ARGS__) \
     : ({ \
         int const __errstatus = status; \
         __gl_error_call1 (function, __errstatus, __VA_ARGS__); \
       }))
#else


Reply via email to