diff options
author | Zack Weinberg <zack@rabi.phys.columbia.edu> | 1998-10-05 00:03:35 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-04 18:03:35 -0600 |
commit | 4284b774e6f846f1fe69479a6246a3bcfd6c3641 (patch) | |
tree | ecf896fb68075d34a37e9c8e909a951f0e330d9a /gcc/cpplib.c | |
parent | 861556b4d97e7b323621cb19ada8bbfefff26977 (diff) | |
download | gcc-4284b774e6f846f1fe69479a6246a3bcfd6c3641.zip gcc-4284b774e6f846f1fe69479a6246a3bcfd6c3641.tar.gz gcc-4284b774e6f846f1fe69479a6246a3bcfd6c3641.tar.bz2 |
cpplib.c (macroexpand): Correct off-by-one error in handling of escapes.
* cpplib.c (macroexpand): Correct off-by-one error in handling
of escapes.
From-SVN: r22827
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index b37a779..874a175 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -2888,8 +2888,8 @@ macroexpand (pfile, hp) /* If whitespace is preceded by an odd number of `@' signs, the last `@' was a whitespace marker; drop it too. */ - while (p2 != p1 && p2[-1] == '@') p2--; - if ((l1 - 1 - p2) & 1) + while (p2 != p1 && p2[0] == '@') p2--; + if ((l1 - p2) & 1) l1--; break; } @@ -2899,8 +2899,8 @@ macroexpand (pfile, hp) /* If a `-' is preceded by an odd number of `@' signs then it and the last `@' are a no-reexpansion marker. */ - while (p2 != p1 && p2[-1] == '@') p2--; - if ((l1 - 1 - p2) & 1) + while (p2 != p1 && p2[0] == '@') p2--; + if ((l1 - p2) & 1) l1 -= 2; else break; |