This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for bug 23113
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Tom Truscott <trt at unx dot sas dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 5 Aug 2005 15:33:56 +0000 (UTC)
- Subject: Re: Patch for bug 23113
- References: <200508051453.KAA05143@login011.unx.sas.com>
On Fri, 5 Aug 2005, Tom Truscott wrote:
> The patch catches the missed important things,
> but I think it warns about too much.
> Here are common macro expansions for which I would prefer no warning:
The patch avoids warning for macro expansions found in GCC itself. In
general the problem is that the same code might not be a macro expansion,
in which case the warning is wanted. There is an escape provided in the
form of not warning for statement expressions, so macros can be defined to
avoid the warning. Although in such cases of heuristics documenting the
precise details of what is not warned for is probably inappropriate, it
may be necessary to update the documentation to mention this escape.
> Aside: testsuite/gcc.dg/Wunused-value-1.c contains code
> for which warnings are presumably unwanted.
> Should there be "dg-bogus" for those lines? Or is that unnecessary?
There is no need for dg-bogus unless you wish to XFAIL such a test that
there are no warnings on a given line, the "test for excess errors"
suffices otherwise.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)