> Or dg-warning is too stupid to understand you. ;-) If you tell us what
> you want to match, we can tell you what you need to match it.
I have something as simple as this:
/* { dg-do compile } */
int foo() __attribute__((warn_unused_result));
void
bar()
{
foo(); /* { dg-warning "ignoring return value of" } */
}
And the log says something like this:
/source/gimple-tuples-branch/gcc/testsuite/gcc.dg/gimple/call3.c: In function 'bar':
cc1: warning: ignoring return value of 'foo', declared with attribute warn_unused_result
output is:
/source/gimple-tuples-branch/gcc/testsuite/gcc.dg/gimple/call3.c: In function 'bar':
cc1: warning: ignoring return value of 'foo', declared with attribute warn_unused_result
FAIL: gcc.dg/gimple/call3.c (test for warnings, line 8)
FAIL: gcc.dg/gimple/call3.c (test for excess errors)
Excess errors:
cc1: warning: ignoring return value of 'foo', declared with attribute warn_unused_result
---------------
As we can see, the warning is there. I have no idea why dg-warning can't
match it. I'm avoiding doing the obvious-- because no good can come of
debugging dejagnu: it's plain evil.