diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 09:55:41 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 09:55:41 +0000 |
commit | 4e9d1e6d7bbd3860878685cc17feaeacce7d9560 (patch) | |
tree | f3c2d768c5a6794b56c42e66d18ba71761c0bb69 /libcpp/lex.c | |
parent | a18b01d60ebb8f95676bd8967f352bb8c6f0a63f (diff) | |
download | gcc-4e9d1e6d7bbd3860878685cc17feaeacce7d9560.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96475 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/lex.c')
-rw-r--r-- | libcpp/lex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcpp/lex.c b/libcpp/lex.c index 9bcb91c0472..289f7b35033 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; |