summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 09:55:41 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 09:55:41 +0000
commit4e9d1e6d7bbd3860878685cc17feaeacce7d9560 (patch)
treef3c2d768c5a6794b56c42e66d18ba71761c0bb69 /libcpp
parenta18b01d60ebb8f95676bd8967f352bb8c6f0a63f (diff)
downloadgcc-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')
-rw-r--r--libcpp/ChangeLog4
-rw-r--r--libcpp/lex.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 9f4303c221c..043aceed71a 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 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;