[testsuite] Another cpp -lang-asm failure

Zack Weinberg zack@wolery.cumb.org
Thu Jul 20 12:29:00 GMT 2000


On Thu, Jul 20, 2000 at 10:04:09AM -0700, Zack Weinberg wrote:
> On Thu, Jul 20, 2000 at 01:44:32PM +0200, Jakub Jelinek wrote:
> > Hi!
> > 
> > This fails with the current cpp, because the new line after nop is eaten
> > and thus prevents Linux kernel build on sparc64.
> 
> Argh.  Look-ahead side effects, again.  Expect patch shortly.

Okay, try this on for size.  I am a bit nervous about it - dropping
the newline appears to have been deliberate - but it doesn't break
anything in the test suite...

zw

===================================================================
Index: cpplex.c
--- cpplex.c	2000/07/20 17:57:36	1.81
+++ cpplex.c	2000/07/20 19:28:02
@@ -1881,10 +1881,8 @@ lex_line (pfile, list)
       cur_token++->type = CPP_EOF;
     }
 
-  /* Directives, known or not, always start a new line.  */
-  if (first_token == 0 || list->tokens[first_token].type == CPP_HASH)
-    first->flags |= BOL;
-  else
+  first->flags |= BOL;
+  if (first_token != 0)
     /* 6.10.3.10: Within the sequence of preprocessing tokens making
        up the invocation of a function-like macro, new line is
        considered a normal white-space character.  */


More information about the Gcc-patches mailing list