bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ignore-value: new module


From: Jim Meyering
Subject: Re: [PATCH] ignore-value: new module
Date: Fri, 17 Oct 2008 10:39:56 +0200

Paolo Bonzini <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]