diff options
author | Geoffrey Keating <geoffk@apple.com> | 2005-03-15 09:55:41 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2005-03-15 09:55:41 +0000 |
commit | 6baba9bb58232ed672878f28845bdfd9d027c426 (patch) | |
tree | f3c2d768c5a6794b56c42e66d18ba71761c0bb69 /libcpp | |
parent | 85bfab3691772fe74e9bec7917a28d2d29b1d3c9 (diff) | |
download | gcc-6baba9bb58232ed672878f28845bdfd9d027c426.zip gcc-6baba9bb58232ed672878f28845bdfd9d027c426.tar.gz gcc-6baba9bb58232ed672878f28845bdfd9d027c426.tar.bz2 |
Index: libcpp/ChangeLog
2005-03-14 Geoffrey Keating <geoffk@apple.com>
* lex.c (forms_identifier_p): Disable UCNs in C89 mode.
Index: gcc/testsuite/ChangeLog
2005-03-14 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/cpp/ucnid-6.c: New.
From-SVN: r96475
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rw-r--r-- | libcpp/lex.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 9f4303c..043acee 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,5 +1,9 @@ 2005-03-14 Geoffrey Keating <geoffk@apple.com> + * lex.c (forms_identifier_p): Disable UCNs in C89 mode. + +2005-03-14 Geoffrey Keating <geoffk@apple.com> + * init.c (cpp_create_reader): Default warn_normalize to normalized_C. * charset.c: Update for new format of ucnid.h. (ucn_valid_in_identifier): Update for new format of ucnid.h. diff --git a/libcpp/lex.c b/libcpp/lex.c index 9bcb91c..289f7b3 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -476,7 +476,8 @@ forms_identifier_p (cpp_reader *pfile, int first, } /* Is this a syntactically valid UCN? */ - if (*buffer->cur == '\\' + if ((CPP_OPTION (pfile, cplusplus) || CPP_OPTION (pfile, c99)) + && *buffer->cur == '\\' && (buffer->cur[1] == 'u' || buffer->cur[1] == 'U')) { buffer->cur += 2; |