This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [distcc] gcc bootstraps with distcc
On Aug 5, 2003, Neil Booth <neil@daikokuya.co.uk> wrote:
> Please revert until you can establish that the testsuite case is
> not there for a good reason.
FWIW, the current behavior seems extremely counter-intuitive to me.
Consider, for example:
#include <stdio.h>
#define FOO(x) x
int main() {
printf ("%i\n", FOO(__LINE__ // <--- line 6
));
printf ("%i\n", FOO(
__LINE__ )); // <--- line 9
}
What should __LINE__ expand to i both cases?
We get 7 and 9, which indicates the expansion of the macro goes in
lines 7 and 9, but the preprocessed output we get before my patch
looks like this:
# 2 "/home/aoliva/x.c" 2
int main() {
printf ("%i\n", 7); // <--- line 6, __LINE__ 7 ?!?
printf ("%i\n", 9); // <--- line 8, __LINE__ 9 ?!?
}
This seems to imply that, in order for the output to make any sense,
it should actually be:
# 2 "/home/aoliva/x.c" 2
int main() {
printf ("%i\n",
7);
printf ("%i\n",
9);
}
which is, surprise, what we get after my patch. Except that the
leading blank didn't have to be there.
Comments?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer