From: Ian Lance Taylor Date: Wed, 2 Sep 2009 17:35:30 +0000 (+0000) Subject: macro.c (stringify_arg): Escape CPP_WCHAR tokens. X-Git-Tag: releases/gcc-4.5.0~3723 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd2ab214c53f39a2fb68d3b394103db62af78c50;p=thirdparty%2Fgcc.git macro.c (stringify_arg): Escape CPP_WCHAR tokens. libcpp/: * macro.c (stringify_arg): Escape CPP_WCHAR tokens. gcc/testsuite/: * gcc.dg/20090902-1.c: New test. From-SVN: r151343 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f8f0cd6bd9c..67c54c3efb66 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-09-02 Ian Lance Taylor + + * gcc.dg/20090902-1.c: New test. + 2009-09-02 Jakub Jelinek * gcc.dg/builtin-object-size-9.c: New test. diff --git a/gcc/testsuite/gcc.dg/20090902-1.c b/gcc/testsuite/gcc.dg/20090902-1.c new file mode 100644 index 000000000000..6120ee907048 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20090902-1.c @@ -0,0 +1,3 @@ +/* { dg-do compile } */ +#define STRING(x) #x +char buf[] = STRING(L'\x123'); diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index f76fa181ddea..1b020ac0ab85 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2009-09-02 Ian Lance Taylor + + * macro.c (stringify_arg): Escape CPP_WCHAR tokens. + 2009-08-24 Ralf Wildenhues * configure.ac (AC_PREREQ): Bump to 2.64. diff --git a/libcpp/macro.c b/libcpp/macro.c index e051fbc7757b..f31805955c69 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -377,7 +377,7 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg) } escape_it = (token->type == CPP_STRING || token->type == CPP_CHAR - || token->type == CPP_WSTRING || token->type == CPP_STRING + || token->type == CPP_WSTRING || token->type == CPP_WCHAR || token->type == CPP_STRING32 || token->type == CPP_CHAR32 || token->type == CPP_STRING16 || token->type == CPP_CHAR16);