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] Fix trunk bootstrap on darwin following the commit for PR16302


Hello Manuel,

Is it really 0?  The patch tries to not warn for constants. I will
rather fix the warning. Could you produce a small testcase?
"gcc -E" shows that it really is "target_flags & 0".

Here's a small test case.

=== cut ===
extern int foo, bar;

#define ZERO (bar & 0)    // <- The warning shows
//#define ZERO (bar && 0) // <- It does not
//#define ZERO 0          // <- It does not

void test()
{
  if(ZERO && foo)
    return;
}
=== cut ===

Best regards,
Simon


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