This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for bug 23113


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]