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 4, 2003, Alexandre Oliva <aoliva@redhat.com> wrote:
>> Please test with this line
>> removed, if it has no regressions and it works for you then it is OK.
> Will do.
Ok, bootstrapped on i686-pc-linux-gnu, regression tested, no
regressions. I'm checking this patch in. It includes a testcase that
will let us know in case we unintentionally change behavior.
I think with this change all cb_line_change implementations have
parsing_args unused. Should we remove it?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* c-ppoutput.c (cb_line_change): Don't skip line changing while
parsing macro arguments in the top-level context.
Index: gcc/c-ppoutput.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-ppoutput.c,v
retrieving revision 1.7
diff -u -p -r1.7 c-ppoutput.c
--- gcc/c-ppoutput.c 13 Jul 2003 17:34:17 -0000 1.7
+++ gcc/c-ppoutput.c 4 Aug 2003 16:32:47 -0000
@@ -260,9 +260,10 @@ print_line (const struct line_map *map,
/* Called when a line of output is started. TOKEN is the first token
of the line, and at end of file will be CPP_EOF. */
static void
-cb_line_change (cpp_reader *pfile, const cpp_token *token, int parsing_args)
+cb_line_change (cpp_reader *pfile, const cpp_token *token,
+ int parsing_args ATTRIBUTE_UNUSED)
{
- if (token->type == CPP_EOF || parsing_args)
+ if (token->type == CPP_EOF)
return;
maybe_print_line (print.map, token->line);
Index: gcc/testsuite/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* gcc.dg/cpp/separate-1.c: New test.
Index: gcc/testsuite/gcc.dg/cpp/separate-1.c
===================================================================
RCS file: gcc/testsuite/gcc.dg/cpp/separate-1.c
diff -N gcc/testsuite/gcc.dg/cpp/separate-1.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/cpp/separate-1.c 4 Aug 2003 16:43:13 -0000
@@ -0,0 +1,12 @@
+/* Copyright 2003 Free Software Foundation. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps" } */
+
+/* Make sure we report errors in the right line, even if separate
+ preprocessing is used. */
+
+#define FOO()
+
+int FOO(
+ ), bar; /* { dg-error "(parse|syntax) error" "error on this line" } */
--
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