Commit 5cc67323 by Neil Booth Committed by Neil Booth

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
parent 6e0ac545
2002-10-09 Neil Booth <neil@daikokuya.co.uk>
* cppmacro.c (paste_tokens): Only allow / to paste with =.
2002-10-09 David Edelsohn <edelsohn@gnu.org> 2002-10-09 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.md (movdf splitter): Use gen_int_mode on * config/rs6000/rs6000.md (movdf splitter): Use gen_int_mode on
......
...@@ -442,8 +442,7 @@ paste_tokens (pfile, plhs, rhs) ...@@ -442,8 +442,7 @@ paste_tokens (pfile, plhs, rhs)
It is simpler to insert a space here, rather than modifying the It is simpler to insert a space here, rather than modifying the
lexer to ignore comments in some circumstances. Simply returning lexer to ignore comments in some circumstances. Simply returning
false doesn't work, since we want to clear the PASTE_LEFT flag. */ false doesn't work, since we want to clear the PASTE_LEFT flag. */
if (lhs->type == CPP_DIV if (lhs->type == CPP_DIV && rhs->type != CPP_EQ)
&& (rhs->type == CPP_MULT || rhs->type == CPP_DIV))
*end++ = ' '; *end++ = ' ';
end = cpp_spell_token (pfile, rhs, end); end = cpp_spell_token (pfile, rhs, end);
*end = '\0'; *end = '\0';
......
2002-10-09 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/cpp/paste13.c: New test.
2002-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2002-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/execute/20020720-1.x: Take out sparc XFAILs. For * gcc.c-torture/execute/20020720-1.x: Take out sparc XFAILs. For
......
/* Copyright (C) 2000 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
/* This used to be recognized as a comment when lexing after pasting
spellings. Neil Booth, 9 Oct 2002. */
#define a /##/=
a /* { dg-warning "valid preprocessing tok" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment