re PR c++/61038 (g++ -E is unusable with UDL strings)

gcc/testsuite/

2014-05-20  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR C++/61038
	* g++.dg/cpp0x/pr61038.C: New.

libcpp/

2014-05-20  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR C++/61038
	* macro.c (stringify_arg (cpp_reader *, macro_arg *)):
	Check for user-defined literal strings and user-defined literal chars
	to escape necessary characters.

From-SVN: r210666
This commit is contained in:
Edward Smith-Rowland 2014-05-21 00:35:29 +00:00 committed by Edward Smith-Rowland
parent 956dd0932c
commit 49039169f3
4 changed files with 55 additions and 0 deletions

View file

@ -494,6 +494,9 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg)
|| token->type == CPP_STRING16 || token->type == CPP_CHAR16
|| token->type == CPP_UTF8STRING);
escape_it = escape_it || cpp_userdef_string_p (token->type)
|| cpp_userdef_char_p (token->type);
/* Room for each char being written in octal, initial space and
final quote and NUL. */
len = cpp_token_len (token);