This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] start c_gimple_diagnostics_recursively conversion
On 24/07/07, Aldy Hernandez <aldyh@redhat.com> wrote:
> 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.
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
[snip]
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.
DejaGNU may be evil but in this case it is telling you that you are
introducing a diagnostics regression. The output used to be (4.1.2)
test1.c: In function 'bar':
test1.c:6: warning: ignoring return value of 'foo', declared with
attribute warn_unused_result
I think that in your code:
+ warning (0, "%Hignoring return value of %qD, "
+ "declared with attribute warn_unused_result",
+ &GIMPLE_LOCUS (g), fdecl);
&GIMPLE_LOCUS(g) is not doing whatever it should do and that
EXPR_LOCUS (t) used to do.
So, please, don't change the testcase as I suggested above. The
testcase is correct.
Cheers,
Manuel.