On 22 April 2015 at 10:59, Marek Polacek <pola...@redhat.com> wrote:
> So the bug really must be solved first :(.  I see I proposed a solution in the
> PR, I wonder whether that works...

It will work for

extern int xxx;
#define XXX !xxx
int test (void)
{
  if (XXX && xxx)
    return 4;
  else
    return 0;
}

because the location of '!' is virtual. However, it won't work for:

extern int xxx;
#define XXX xxx
int test (void)
{
  if (!XXX && xxx)
    return 4;
  else
    return 0;
}

So, I think your proposal is an improvement, however, it does not
fully fix the problem. For that, we need to have locations for the
operands of expressions (PR43486), so we can check if they are also
come from macro expansion.

Cheers,

Manuel.

Reply via email to