Paolo Bonzini <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> I wanted to ignore some new warnings in coreutils, >> but a "(void)" cast no longer does the job with the latest gcc >> and libc headers. > > Do you have a reduced testcase?
No, but I will add one. Modulo using a unique name for the .c file or doing it in its own subdir, I guess it'd be something like this: (but maybe using $CC instead of gcc) (gcc -v) > /dev/null 2>&1 || { echo '$0: this test requires gcc; skipping' 1>&2; exit 77; } cat <<\EOF > in.c #include "ignore-value.h" int f (void) __attribute__ ((__warn_unused_result__)); void g (void); void g (void) { ignore_value (f ()); } EOF exec gcc -Werror -c in.c