The following patch implements printing range info in diagnostics. It
is a very rough initial version but comments are appreciated. With
this patch for this code:
void bar(void)
{
_Complex float Gamma;
int *P;
P = (P-42) + Gamma*4;
}
we print:
test.c: In function ‘bar’:
test.c:11:14:11.9-14:11.14-21: error: invalid operands to binary +
(have ‘int *’ and ‘complex float’)
which is not as good as Clang prints because we do not track the
boundaries of expressions. On the other hand, the above follows GNU
coding conventions [*] while Clang doesn't.
[*] http://www.gnu.org/prep/standards/standards.html#Errors