On 12/06/12 16:01, Paul Eggert wrote: > You're not the only one. This problem is common enough > that we have a gnulib module that solves it. With > gnulib you can use the ignore-value module and write this: > > #include <ignore-value.h> > ... > ignore_value (system (fil_name));
# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) Years ago, I heard about a compiler optimization test wherein a sample program could be shown to not have any outputs. The compiler eliminated everything and the program exited immediately. In a similar vein, can GCC decide that the result of (x) is not really used and still complain? Also, as it turns out, this usage is actually injected into code that gets used by client programs. Consequently, I added the # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) construct into the injected code. "Yummy." Thank you! Regards, Bruce