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


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:

   void * bar(void);
                                                                                
   void foo(void *p)
   {
      ((p = bar()) != 0);
      (p = bar(), p ? 1 : 0);
      (bar() ? 1 : 0);
   }

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?

Thanks much for considering this,
Tom Truscott


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