This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR preprocessor/6489
- From: Jakub Jelinek <jakub at redhat dot com>
- To: mark at codesourcery dot com, zack at codesourcery dot com, neil at daikokuya dot demon dot co dot uk
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Apr 2002 16:25:10 +0200
- Subject: [PATCH] Fix PR preprocessor/6489
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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