diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-01-16 07:11:29 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-01-16 07:11:29 -0500 |
commit | f803dcf83d8e514ded5e36223e88f038bcf6b8e2 (patch) | |
tree | 5caf51743527dfc51e6deb0f78890cf382a07076 | |
parent | e6d8c385f3fa6020dfc3df31ddb2ed0f54221a87 (diff) | |
download | gcc-f803dcf83d8e514ded5e36223e88f038bcf6b8e2.zip gcc-f803dcf83d8e514ded5e36223e88f038bcf6b8e2.tar.gz gcc-f803dcf83d8e514ded5e36223e88f038bcf6b8e2.tar.bz2 |
(rescan): Fix typo that caused tokens to be glued together improperly.
From-SVN: r8763
-rw-r--r-- | gcc/cccp.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -1,5 +1,5 @@ /* C Compatible Compiler Preprocessor (CCCP) - Copyright (C) 1986, 87, 89, 92, 93, 1994 Free Software Foundation, Inc. + Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. Written by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -3290,15 +3290,16 @@ startagain: /* Prevent accidental token-pasting with a character before the macro call. */ - if (!traditional && obp != op->buf - && (obp[-1] == '-' || obp[1] == '+' || obp[1] == '&' - || obp[-1] == '|' || obp[1] == '<' || obp[1] == '>')) { - /* If we are expanding a macro arg, make a newline marker - to separate the tokens. If we are making real output, - a plain space will do. */ - if (output_marks) - *obp++ = '\n'; - *obp++ = ' '; + if (!traditional && obp != op->buf) { + switch (obp[-1]) { + case '&': case '+': case '-': case '<': case '>': case '|': + /* If we are expanding a macro arg, make a newline marker + to separate the tokens. If we are making real output, + a plain space will do. */ + if (output_marks) + *obp++ = '\n'; + *obp++ = ' '; + } } /* Expand the macro, reading arguments as needed, |