In this test case: int fn () __attribute__ ((warn_unused_result)); int foo () { if (fn () < 0) return -1; (void) fn (); return 0; }
$ gcc -S -Wall ~/p.c /home/aph/p.c: In function 'foo': /home/aph/p.c:5: warning: ignoring return value of 'fn', declared with attribute warn_unused_result Is this correct? The result is not unused, but cast to void. Andrew.