diff options
author | Ian Lance Taylor <iant@google.com> | 2009-09-02 17:35:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-09-02 17:35:30 +0000 |
commit | fd2ab214c53f39a2fb68d3b394103db62af78c50 (patch) | |
tree | 582d9e320bdd5fa506744b2a48b6f499f314d056 | |
parent | dd3824a300726c9b5f8f83d58ee714f59dc90a16 (diff) | |
download | gcc-fd2ab214c53f39a2fb68d3b394103db62af78c50.zip gcc-fd2ab214c53f39a2fb68d3b394103db62af78c50.tar.gz gcc-fd2ab214c53f39a2fb68d3b394103db62af78c50.tar.bz2 |
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
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20090902-1.c | 3 | ||||
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rw-r--r-- | libcpp/macro.c | 2 |
4 files changed, 12 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f8f0cd..67c54c3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-09-02 Ian Lance Taylor <iant@google.com> + + * gcc.dg/20090902-1.c: New test. + 2009-09-02 Jakub Jelinek <jakub@redhat.com> * 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 0000000..6120ee9 --- /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 f76fa18..1b020ac 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2009-09-02 Ian Lance Taylor <iant@google.com> + + * macro.c (stringify_arg): Escape CPP_WCHAR tokens. + 2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * configure.ac (AC_PREREQ): Bump to 2.64. diff --git a/libcpp/macro.c b/libcpp/macro.c index e051fbc..f318059 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); |