aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2002-10-09 09:56:09 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-10-09 09:56:09 +0000
commit5cc6732359d0d0b21ff0428635c19594c275163e (patch)
tree633e7b4d27241e94e09a9d75011a7ca0f24d6eca /gcc/cppmacro.c
parent6e0ac545dde5eb36629959226968fb7c51975a44 (diff)
downloadgcc-5cc6732359d0d0b21ff0428635c19594c275163e.zip
gcc-5cc6732359d0d0b21ff0428635c19594c275163e.tar.gz
gcc-5cc6732359d0d0b21ff0428635c19594c275163e.tar.bz2
cppmacro.c (paste_tokens): Only allow / to paste with =.
* cppmacro.c (paste_tokens): Only allow / to paste with =. testsuite: * gcc.dg/cpp/paste13.c: New test. From-SVN: r57978
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 113b20d..fe78993 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -442,8 +442,7 @@ paste_tokens (pfile, plhs, rhs)
It is simpler to insert a space here, rather than modifying the
lexer to ignore comments in some circumstances. Simply returning
false doesn't work, since we want to clear the PASTE_LEFT flag. */
- if (lhs->type == CPP_DIV
- && (rhs->type == CPP_MULT || rhs->type == CPP_DIV))
+ if (lhs->type == CPP_DIV && rhs->type != CPP_EQ)
*end++ = ' ';
end = cpp_spell_token (pfile, rhs, end);
*end = '\0';