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: [distcc] gcc bootstraps with distcc


On Aug  5, 2003, Neil Booth <neil@daikokuya.co.uk> wrote:

> Alexandre Oliva wrote:-
>> On Aug  5, 2003, Alexandre Oliva <aoliva@redhat.com> wrote:
>> 
>> >> However, please modify the testcase.
>> 
>> > Will do.
>> 
>> Ok to install?

> Sure.

Before I do, consider this instead.  Surprisingly, no other changes
required in the testsuite, and now the preprocessor output looks the
way you say it should be.  Which one do you prefer?

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	* c-ppoutput.c (cb_line_change): Revert 2003-08-04's change.
	* c-lex.c (cb_line_change): Skip line changing whenever
	c-ppoutput.c would.

Index: gcc/c-ppoutput.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-ppoutput.c,v
retrieving revision 1.8
diff -u -p -r1.8 c-ppoutput.c
--- gcc/c-ppoutput.c 4 Aug 2003 16:49:38 -0000 1.8
+++ gcc/c-ppoutput.c 5 Aug 2003 23:08:52 -0000
@@ -261,9 +261,9 @@ print_line (const struct line_map *map, 
    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 ATTRIBUTE_UNUSED)
+		int parsing_args)
 {
-  if (token->type == CPP_EOF)
+  if (token->type == CPP_EOF || parsing_args)
     return;
 
   maybe_print_line (print.map, token->line);
Index: gcc/c-lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-lex.c,v
retrieving revision 1.211
diff -u -p -r1.211 c-lex.c
--- gcc/c-lex.c 5 Aug 2003 21:15:52 -0000 1.211
+++ gcc/c-lex.c 5 Aug 2003 23:08:52 -0000
@@ -197,8 +197,11 @@ cb_ident (cpp_reader *pfile ATTRIBUTE_UN
    lexed token on the line.  Used for diagnostic line numbers.  */
 static void
 cb_line_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const cpp_token *token,
-		int parsing_args ATTRIBUTE_UNUSED)
+		int parsing_args)
 {
+  if (token->type == CPP_EOF || parsing_args)
+    return;
+
   src_lineno = SOURCE_LINE (map, token->line);
 }
 
Index: gcc/testsuite/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* gcc.dg/cpp/separate-1.c: Adjust line of error.

Index: gcc/testsuite/gcc.dg/cpp/separate-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/cpp/separate-1.c,v
retrieving revision 1.1
diff -u -p -r1.1 separate-1.c
--- gcc/testsuite/gcc.dg/cpp/separate-1.c 4 Aug 2003 16:49:28 -0000 1.1
+++ gcc/testsuite/gcc.dg/cpp/separate-1.c 5 Aug 2003 23:09:00 -0000
@@ -8,5 +8,5 @@
 
 #define FOO()
 
-int FOO(
-	), bar; /* { dg-error "(parse|syntax) error" "error on this line" } */
+int FOO( /* { dg-error "(parse|syntax) error" "error on this line" } */
+	), bar;
-- 
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

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