diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f19cfdb44e2566c8a157a7a980b1336883148d8c..4f55ac077c36b0117231f1792e316b734407b23a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
+
+	* c.opt (fextended-identifiers): New.
+	* c-opts.c (c_common_handle_option): Handle
+	-fextended-identifiers.
+	* doc/cpp.texi: Update documentation of extended identifiers.
+	* doc/cppopts.texi (-fextended-identifiers): Document.
+
 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
 
 	PR tree-optimization/23929
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index e3531193e6e9971bb9a1824ca2f3d3a19ca113e4..b0efaf4a61b11ff4e6739341028eb099fbbd0eb2 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -647,6 +647,10 @@ c_common_handle_option (size_t scode, const char *arg, int value)
       flag_enforce_eh_specs = value;
       break;
 
+    case OPT_fextended_identifiers:
+      cpp_opts->extended_identifiers = value;
+      break;
+
     case OPT_ffixed_form:
     case OPT_ffixed_line_length_:
       /* Fortran front end options ignored when preprocessing only.  */
diff --git a/gcc/c.opt b/gcc/c.opt
index d650f111168e9b805078f227abef86d682902c39..eb01d325ab2ce35560e7694c18fb76d4a346e263 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -495,6 +495,10 @@ fexec-charset=
 C ObjC C++ ObjC++ Joined RejectNegative
 -fexec-charset=<cset>	Convert all strings and character constants to character set <cset>
 
+fextended-identifiers
+C ObjC C++ ObjC++
+Permit universal character names (\\u and \\U) in identifiers
+
 finput-charset=
 C ObjC C++ ObjC++ Joined RejectNegative
 -finput-charset=<cset>	Specify the default character set for source files
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index f5f29a6397b26a09581ec2af0c8eb01a7198cd87..c019adbac6703b7822793cc64103685ff45568e4 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -281,11 +281,11 @@ the character in the source character set that they represent, then
 converted to the execution character set, just like unescaped
 characters.
 
+Unless the experimental @option{-fextended-identifiers} option is used,
 GCC does not permit the use of characters outside the ASCII range, nor
-@samp{\u} and @samp{\U} escapes, in identifiers.  We hope this will
-change eventually, but there are problems with the standard semantics
-of such ``extended identifiers'' which must be resolved through the
-ISO C and C++ committees first.
+@samp{\u} and @samp{\U} escapes, in identifiers.  Even with that
+option, characters outside the ASCII range can only be specified with
+the @samp{\u} and @samp{\U} escapes, not used directly in identifiers.
 
 @node Initial processing
 @section Initial processing
@@ -510,8 +510,10 @@ In the 1999 C standard, identifiers may contain letters which are not
 part of the ``basic source character set'', at the implementation's
 discretion (such as accented Latin letters, Greek letters, or Chinese
 ideograms).  This may be done with an extended character set, or the
-@samp{\u} and @samp{\U} escape sequences.  GCC does not presently
-implement either feature in the preprocessor or the compiler.
+@samp{\u} and @samp{\U} escape sequences.  The implementation of this
+feature in GCC is experimental; such characters are only accepted in
+the @samp{\u} and @samp{\U} forms and only if
+@option{-fextended-identifiers} is used.
 
 As an extension, GCC treats @samp{$} as a letter.  This is for
 compatibility with some systems, such as VMS, where @samp{$} is commonly
@@ -3791,7 +3793,9 @@ character set may be controlled by the user, with the
 The C and C++ standards allow identifiers to be composed of @samp{_}
 and the alphanumeric characters.  C++ and C99 also allow universal
 character names, and C99 further permits implementation-defined
-characters.
+characters.  GCC currently only permits universal character names if
+@option{-fextended-identifiers} is used, because the implementation of
+universal character names in identifiers is experimental.
 
 GCC allows the @samp{$} character in identifiers as an extension for
 most targets.  This is true regardless of the @option{std=} switch,
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi
index 2790e8c77345bbb070bea7d264ab5dd191c28a6a..adf77e1802a8da7a5843b969895e76370b2fe784 100644
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -511,6 +511,12 @@ Accept @samp{$} in identifiers.
   @xref{Identifier characters}.
 @end ifset
 
+@item -fextended-identifiers
+@opindex fextended-identifiers
+Accept universal character names in identifiers.  This option is
+experimental; in a future version of GCC, it will be enabled by
+default for C99 and C++.
+
 @item -fpreprocessed
 @opindex fpreprocessed
 Indicate to the preprocessor that the input file has already been
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 382e26f5b54c157b7fa7ab3ddcad979b2fd7bf5c..92e197728ac8c6fe9e8aff5cdff554d4bd008ec4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
+
+	* g++.dg/cpp/ucnid-1.C, g++.dg/cpp/normalize-1.C,
+	g++.dg/other/ucnid-1.C, gcc.dg/cpp/normalize-1.c,
+	gcc.dg/cpp/normalize-2.c, gcc.dg/cpp/normalize-3.c,
+	gcc.dg/cpp/normalize-4.c, gcc.dg/cpp/ucnid-1.c,
+	gcc.dg/cpp/ucnid-2.c, gcc.dg/cpp/ucnid-3.c, gcc.dg/cpp/ucnid-4.c,
+	gcc.dg/cpp/ucnid-5.c, gcc.dg/cpp/ucnid-7.c,gcc.dg/ucnid-1.c,
+	gcc.dg/ucnid-2.c, gcc.dg/ucnid-3.c, gcc.dg/ucnid-4.c,
+	gcc.dg/ucnid-5.c, gcc.dg/ucnid-6.c: Add -fextended-identifiers.
+	* gcc.dg/cpp/ucnid-8.c: New test.
+
 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
 
 	PR tree-optimization/23929
diff --git a/gcc/testsuite/g++.dg/cpp/normalize-1.C b/gcc/testsuite/g++.dg/cpp/normalize-1.C
index 8c49602d99ea752436b605c61b2495f8468d1ea4..536a3b45b98bb54deebe0c6d6f7b2b82eb87ded8 100644
--- a/gcc/testsuite/g++.dg/cpp/normalize-1.C
+++ b/gcc/testsuite/g++.dg/cpp/normalize-1.C
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-Wnormalized=id" } */
+/* { dg-options "-fextended-identifiers -Wnormalized=id" } */
 
 \u00AA
 \u00B7
diff --git a/gcc/testsuite/g++.dg/cpp/ucnid-1.C b/gcc/testsuite/g++.dg/cpp/ucnid-1.C
index ccbb1ea094fb83a65496f6dc3b8ac059043365d3..d15be4f8e03051bc384d8b94658fa8cf556cae7d 100644
--- a/gcc/testsuite/g++.dg/cpp/ucnid-1.C
+++ b/gcc/testsuite/g++.dg/cpp/ucnid-1.C
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-pedantic" } */
+/* { dg-options "-pedantic -fextended-identifiers" } */
 
 \u00AA /* { dg-error "not valid in an identifier" } */
 \u00AB /* { dg-error "not valid in an identifier" } */
diff --git a/gcc/testsuite/g++.dg/other/ucnid-1.C b/gcc/testsuite/g++.dg/other/ucnid-1.C
index faba7b87f11d2b0ff33654f07543e7c56cbd1ae2..ff5696bbc2bc67ccea7a65afe781ee365c3cde0f 100644
--- a/gcc/testsuite/g++.dg/other/ucnid-1.C
+++ b/gcc/testsuite/g++.dg/other/ucnid-1.C
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-options "-fextended-identifiers" } */
 /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
 #include <cstdlib>
 
diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-1.c b/gcc/testsuite/gcc.dg/cpp/normalize-1.c
index 768e1930e7a1689194746e8ba8f68c2b7af66c4a..b20f235ee98abef68b287e2198957efd6ee1becd 100644
--- a/gcc/testsuite/gcc.dg/cpp/normalize-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/normalize-1.c
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 
 \u00AA
 \u00B7
diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-2.c b/gcc/testsuite/gcc.dg/cpp/normalize-2.c
index 28ef2f18e4282ae9bbae3bc2feb90a70bfe4d30b..6f2f495643002327b3f57072a81573d80eb7f604 100644
--- a/gcc/testsuite/gcc.dg/cpp/normalize-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/normalize-2.c
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-std=c99 -Wnormalized=nfkc" } */
+/* { dg-options "-std=c99 -fextended-identifiers -Wnormalized=nfkc" } */
 
 \u00AA  /* { dg-warning "not in NFKC" } */
 \u00B7
diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-3.c b/gcc/testsuite/gcc.dg/cpp/normalize-3.c
index 040749208608f09b1f57dafea360229e70bf5e2f..a4f496fbb3a804b9a5c81373c6f7e22e484af872 100644
--- a/gcc/testsuite/gcc.dg/cpp/normalize-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/normalize-3.c
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-std=c99 -Wnormalized=id" } */
+/* { dg-options "-std=c99 -fextended-identifiers -Wnormalized=id" } */
 
 \u00AA
 \u00B7
diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-4.c b/gcc/testsuite/gcc.dg/cpp/normalize-4.c
index 1ee3ff545d5604082022c9f9162bd6b133b17b0b..0040c03aa29236329891e97d92a270f26a38cd4c 100644
--- a/gcc/testsuite/gcc.dg/cpp/normalize-4.c
+++ b/gcc/testsuite/gcc.dg/cpp/normalize-4.c
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-std=c99 -Wnormalized=none" } */
+/* { dg-options "-std=c99 -fextended-identifiers -Wnormalized=none" } */
 
 \u00AA
 \u00B7
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-1.c b/gcc/testsuite/gcc.dg/cpp/ucnid-1.c
index bc516cae92ebdb078fffed49995cface57a01f20..3fad08831a6194b181bad8672f1bba389bd5d31b 100644
--- a/gcc/testsuite/gcc.dg/cpp/ucnid-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-1.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 void abort (void);
 
 #define \u00C0 1
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-2.c b/gcc/testsuite/gcc.dg/cpp/ucnid-2.c
index 616680a969ee0d1066f641b0944215cd26553aaa..6719c783f561c1e42e87a2b95985fa0c7fba7051 100644
--- a/gcc/testsuite/gcc.dg/cpp/ucnid-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-2.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-3.c b/gcc/testsuite/gcc.dg/cpp/ucnid-3.c
index a910037c31627705f09508da093a9e5956e2dfb4..6389b7ebfee2908fd5e1e2d3a18d932cc31d272c 100644
--- a/gcc/testsuite/gcc.dg/cpp/ucnid-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 
 #define paste(x, y) x ## y
 
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-4.c b/gcc/testsuite/gcc.dg/cpp/ucnid-4.c
index e41a3f5907d92dd27c82a88c1b8f3ae8eda2fdf5..6a6699b942c8b325141c121125ad70ebffb135e2 100644
--- a/gcc/testsuite/gcc.dg/cpp/ucnid-4.c
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-4.c
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 
 \u00AA
 \u00AB /* { dg-error "not valid in an identifier" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-5.c b/gcc/testsuite/gcc.dg/cpp/ucnid-5.c
index 8fcaeac6f3179ba2153a94ce45b29ba3a4ad0f6f..cdccd3cdf6a15a97520744343e587d8ffb3f35b7 100644
--- a/gcc/testsuite/gcc.dg/cpp/ucnid-5.c
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-5.c
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-options "-std=c99 -pedantic" } */
+/* { dg-options "-std=c99 -pedantic -fextended-identifiers" } */
 
 \u00AA
 \u00AB /* { dg-error "not valid in an identifier" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-7.c b/gcc/testsuite/gcc.dg/cpp/ucnid-7.c
index 854c948341aaacf41a814b978515e156b81d276d..93404225de1e2a8cc3db21f2524b480875c14937 100644
--- a/gcc/testsuite/gcc.dg/cpp/ucnid-7.c
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-7.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 #define a b(
 #define b(x) q
 int a\U0000000z );
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-8.c b/gcc/testsuite/gcc.dg/cpp/ucnid-8.c
new file mode 100644
index 0000000000000000000000000000000000000000..1f0379a5bb51dfe47d720ceb98819cb94ba12a52
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-8.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99" } */
+/* Test that -std=c99 does not enable extended identifiers while the
+   feature is experimental; remove this test after audit of all
+   identifier uses in the compiler.  */
+#define a b(
+#define b(x) q
+int a\u00aa);
diff --git a/gcc/testsuite/gcc.dg/ucnid-1.c b/gcc/testsuite/gcc.dg/ucnid-1.c
index a8d49a3e16d05e7b6bdacaca51a3e9e6b52262d2..ed89cfdeec48df403617dd539fe6f7b38a2015aa 100644
--- a/gcc/testsuite/gcc.dg/ucnid-1.c
+++ b/gcc/testsuite/gcc.dg/ucnid-1.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 void abort (void);
 
 int main (void)
diff --git a/gcc/testsuite/gcc.dg/ucnid-2.c b/gcc/testsuite/gcc.dg/ucnid-2.c
index 3b9973b438393e25c760375971d76567e605f8c8..c7dd35bc7ff94565a116500a8bb30ba66fb5f3c2 100644
--- a/gcc/testsuite/gcc.dg/ucnid-2.c
+++ b/gcc/testsuite/gcc.dg/ucnid-2.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 void abort (void);
 
 static int \u00C0 = 1;
diff --git a/gcc/testsuite/gcc.dg/ucnid-3.c b/gcc/testsuite/gcc.dg/ucnid-3.c
index b68ffd405d882a7f1ef5614a4cd649d18828ed90..79f1be88752004cacf2e3c692da14f21f4ebfce4 100644
--- a/gcc/testsuite/gcc.dg/ucnid-3.c
+++ b/gcc/testsuite/gcc.dg/ucnid-3.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 void abort (void);
 
 int \u00C0 = 1;
diff --git a/gcc/testsuite/gcc.dg/ucnid-4.c b/gcc/testsuite/gcc.dg/ucnid-4.c
index 158b862e5b84c87275fd259c85c99fc3844e6668..f9bf68eb6f6664726db51f9d7b820418aac4fd1a 100644
--- a/gcc/testsuite/gcc.dg/ucnid-4.c
+++ b/gcc/testsuite/gcc.dg/ucnid-4.c
@@ -1,6 +1,6 @@
 /* { dg-do run */
 /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
-/* { dg-options "-std=c99" } */
+/* { dg-options "-std=c99 -fextended-identifiers" } */
 void abort (void);
 
 int \u00C0(void) { return 1; }
diff --git a/gcc/testsuite/gcc.dg/ucnid-5.c b/gcc/testsuite/gcc.dg/ucnid-5.c
index a77d51465be59a96514640a325f8484c5e435cfb..8cd86060dfe1fdebeef1803518c164d96f623082 100644
--- a/gcc/testsuite/gcc.dg/ucnid-5.c
+++ b/gcc/testsuite/gcc.dg/ucnid-5.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
-/* { dg-options "-std=c99 -fdollars-in-identifiers" } */
+/* { dg-options "-std=c99 -fdollars-in-identifiers -fextended-identifiers" } */
 void abort (void);
 
 int a$b(void) { return 1; }
diff --git a/gcc/testsuite/gcc.dg/ucnid-6.c b/gcc/testsuite/gcc.dg/ucnid-6.c
index 7d2063ba00700295fae8dfcd5e90f0fd7295ad24..37433a1ebf219e5987ea5b03e96bf65daf341643 100644
--- a/gcc/testsuite/gcc.dg/ucnid-6.c
+++ b/gcc/testsuite/gcc.dg/ucnid-6.c
@@ -1,6 +1,6 @@
 /* { dg-do run */
 /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
-/* { dg-options "-std=c99 -save-temps" } */
+/* { dg-options "-std=c99 -fextended-identifiers -save-temps" } */
 void abort (void);
 
 int \u00C0(void) { return 1; }
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 1b62fcce3e2da875b7d59e14a262aca7e8eacfd1..faf6b93070adaf8190c62e2a46c6f5f7ffeb1365 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,11 @@
+2005-09-20  Joseph S. Myers  <joseph@codesourcery.com>
+
+	* include/cpplib.h (struct cpp_options): Add extended_identifiers.
+	* init.c (struct lang_flags, lang_defaults): Add
+	extended_identifiers.
+	(cpp_set_lang): Use it.
+	* lex.c (forms_identifier_p): Check extended_identifiers.
+
 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
 
 	PR preprocessor/20348
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index ef42d0443a600754f20b87537bd100fa78126b75..c84f62433766eb7301ecf2e2d4b6c1cbd4214449 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -345,6 +345,9 @@ struct cpp_options
   /* Zero means dollar signs are punctuation.  */
   unsigned char dollars_in_ident;
 
+  /* Nonzero means UCNs are accepted in identifiers.  */
+  unsigned char extended_identifiers;
+
   /* True if we should warn about dollars in identifiers or numbers
      for this translation unit.  */
   unsigned char warn_dollars;
diff --git a/libcpp/init.c b/libcpp/init.c
index 515e2549adc36e27aaeb44ee2df784303d5e34a6..8d564c933f461b2b1d57bfd4a4a332952f3a1d09 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -72,21 +72,26 @@ struct lang_flags
   char c99;
   char cplusplus;
   char extended_numbers;
+  char extended_identifiers;
   char std;
   char cplusplus_comments;
   char digraphs;
 };
 
 static const struct lang_flags lang_defaults[] =
-{ /*              c99 c++ xnum std  //   digr  */
-  /* GNUC89 */  { 0,  0,  1,   0,   1,   1     },
-  /* GNUC99 */  { 1,  0,  1,   0,   1,   1     },
-  /* STDC89 */  { 0,  0,  0,   1,   0,   0     },
-  /* STDC94 */  { 0,  0,  0,   1,   0,   1     },
-  /* STDC99 */  { 1,  0,  1,   1,   1,   1     },
-  /* GNUCXX */  { 0,  1,  1,   0,   1,   1     },
-  /* CXX98  */  { 0,  1,  1,   1,   1,   1     },
-  /* ASM    */  { 0,  0,  1,   0,   1,   0     }
+{ /*              c99 c++ xnum xid std  //   digr  */
+  /* GNUC89 */  { 0,  0,  1,   0,  0,   1,   1     },
+  /* GNUC99 */  { 1,  0,  1,   0,  0,   1,   1     },
+  /* STDC89 */  { 0,  0,  0,   0,  1,   0,   0     },
+  /* STDC94 */  { 0,  0,  0,   0,  1,   0,   1     },
+  /* STDC99 */  { 1,  0,  1,   0,  1,   1,   1     },
+  /* GNUCXX */  { 0,  1,  1,   0,  0,   1,   1     },
+  /* CXX98  */  { 0,  1,  1,   0,  1,   1,   1     },
+  /* ASM    */  { 0,  0,  1,   0,  0,   1,   0     }
+  /* xid should be 1 for GNUC99, STDC99, GNUCXX and CXX98 when no
+     longer experimental (when all uses of identifiers in the compiler
+     have been audited for correct handling of extended
+     identifiers).  */
 };
 
 /* Sets internal flags correctly for a given language.  */
@@ -97,13 +102,14 @@ cpp_set_lang (cpp_reader *pfile, enum c_lang lang)
 
   CPP_OPTION (pfile, lang) = lang;
 
-  CPP_OPTION (pfile, c99)		 = l->c99;
-  CPP_OPTION (pfile, cplusplus)		 = l->cplusplus;
-  CPP_OPTION (pfile, extended_numbers)	 = l->extended_numbers;
-  CPP_OPTION (pfile, std)		 = l->std;
-  CPP_OPTION (pfile, trigraphs)		 = l->std;
-  CPP_OPTION (pfile, cplusplus_comments) = l->cplusplus_comments;
-  CPP_OPTION (pfile, digraphs)		 = l->digraphs;
+  CPP_OPTION (pfile, c99)			 = l->c99;
+  CPP_OPTION (pfile, cplusplus)			 = l->cplusplus;
+  CPP_OPTION (pfile, extended_numbers)		 = l->extended_numbers;
+  CPP_OPTION (pfile, extended_identifiers)	 = l->extended_identifiers;
+  CPP_OPTION (pfile, std)			 = l->std;
+  CPP_OPTION (pfile, trigraphs)			 = l->std;
+  CPP_OPTION (pfile, cplusplus_comments)	 = l->cplusplus_comments;
+  CPP_OPTION (pfile, digraphs)			 = l->digraphs;
 }
 
 /* Initialize library global state.  */
diff --git a/libcpp/lex.c b/libcpp/lex.c
index ee38a55a6c64b40ea7c7d856a70bb4b0aefbf776..03131618eb550f7e7468df535bd1bee90cffc977 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -476,7 +476,7 @@ forms_identifier_p (cpp_reader *pfile, int first,
     }
 
   /* Is this a syntactically valid UCN?  */
-  if ((CPP_OPTION (pfile, cplusplus) || CPP_OPTION (pfile, c99))
+  if (CPP_OPTION (pfile, extended_identifiers)
       && *buffer->cur == '\\'
       && (buffer->cur[1] == 'u' || buffer->cur[1] == 'U'))
     {