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]

[PATCH] Fix PR preprocessor/6489


Hi!

The following patch fixes PR preprocessor/6489 (a regression from 2.95.x).
#include <filename>
would result in
#include expects "fname" or <fname>
error. I don't think it is necessary to add much more for '\r', on all stuff
I've tried but this one egcs 1.1.2 and gcc 2.95.4 handled '\r' characters
equally bad as tradcpp.
Ok to commit?
Mark, ok for branch?

2002-04-30  Jakub Jelinek  <jakub@redhat.com>

	PR preprocessor/6489
	* tradcpp.c (do_include): Skip any whitespace at end, not just
	non-vertical.

--- gcc/tradcpp.c.jj	Mon Feb  4 11:41:44 2002
+++ gcc/tradcpp.c	Tue Apr 30 16:11:26 2002
@@ -2325,7 +2325,7 @@ get_filename:
   SKIP_WHITE_SPACE (fbeg);
   /* Discard trailing whitespace so we can easily see
      if we have parsed all the significant chars we were given.  */
-  while (limit != fbeg && is_nvspace (limit[-1])) limit--;
+  while (limit != fbeg && is_space (limit[-1])) limit--;
 
   switch (*fbeg++) {
   case '\"':

	Jakub


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