Enable -fextended-identifiers by default.

As proposed at <https://gcc.gnu.org/ml/gcc/2014-11/msg00014.html>,
this patch enables -fextended-identifiers by default for all standard
versions including this feature (all C++ versions, C99 and above for
C, but not C90 / C94 / gnu89 / preprocessing assembler).  It adds a
couple of tests for areas where I previously noted testsuite coverage
for extended identifiers was lacking, removes -fextended-identifiers
from existing tests, adds -g to various such tests to verify that
extended identifiers don't break debug info generation and removes the
test that was only there to verify that the feature was off by
default.

The current state of the feature may not correspond exactly to any
particular checklist from 2004/5 (see bug 9449) of what was wanted
before enabling the feature by default, but I don't think it's any
worse than plenty of other features supported by default before every
corner case is fully functional, and think problems can readily be
fixed incrementally.

The following aspects of extended identifiers could still do with more
work (and should be straightforward):

* C -aux-info (output should use UCNs).

* ObjC -gen-decls (output should use UCNs; associated diagnostics from
  the ObjC front end should use extended characters or UCNs as
  appropriate to the locale, via using %qE or identifier_to_locale).

* Use DW_AT_use_UTF8 in DWARF-3 debug info for compilation units built
  with extended identifiers enabled (or unconditionally).

* cpplib diagnostics (outputting characters or UCNs as appropriate
  depending on the locale, as done for identifiers in non-cpplib
  diagnostics).

* C++ test for UCN linking with C and extern "C".

* Check GDB support / file issues for support if needed.

* Actual UTF-8 in identifiers (?).  (Be careful about not affecting
  performance for the normal fast path of lexing identifiers, if
  possible.)

The following may be trickier:

* cpplib spelling preservation (required to diagnose macro
  redefinition with different spellings of the same identifier in the
  definition or argument names; different spellings of the name of the
  macro itself are OK, however; also required for correct handling of
  multiple stringizing in C++); correct output for -d (UCNs), DWARF
  debug info for macros (UCNs), PCH and PCH tests.  (Spelling
  preservation is the issue that needs fixing to remove references to
  corner cases in the documentation of -std=c99 and -std=c11 and in
  c99status.html.)  The idea would be to add a second pointer to
  cpp_identifier that stores the original spelling (whether for
  extended identifiers only, or for all identifiers); this does not
  enlarge cpp_token because the resulting larger cpp_identifier
  structure is no bigger than cpp_string.

* C++ translation of extended characters (including $@` and various
  control characters) to UCNs in phase 1 (note diagnostics thus
  needed, but not for C++11, for control characters in strings /
  character constants as those UCNs invalid); a likely implementation
  approach is to do translation when identifiers / strings / character
  constants are lexed, together with errors for stray $@` / control
  characters in program as not being valid UCNs in identifiers ($ only
  if not accepted in identifiers); note that this translation should
  not take place inside raw string literals.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libcpp:
	PR preprocessor/9449
	* init.c (lang_defaults): Enable extended identifiers for C++ and
	C99-based standards.

gcc:
	PR preprocessor/9449
	* doc/cpp.texi (Character sets, Tokenization)
	(Implementation-defined behavior): Don't refer to UCNs in
	identifiers requiring -fextended-identifiers.
	* doc/cppopts.texi (-fextended-identifiers): Document as enabled
	by default for C99 and later and C++.
	* doc/invoke.texi (-std=c99, -std=c11): Don't refer to extended
	identifiers needing -fextended-identifiers.

gcc/testsuite:
	PR preprocessor/9449
	* lib/target-supports.exp (check_effective_target_ucn_nocache):
	Don't use -fextended-identifiers.
	* c-c++-common/cpp/normalize-3.c, c-c++-common/cpp/ucnid-2011-1.c,
	g++.dg/cpp/ucn-1.C, g++.dg/cpp/ucnid-1.C, g++.dg/other/ucnid-1.C,
	gcc.dg/cpp/normalize-1.c, gcc.dg/cpp/normalize-2.c,
	gcc.dg/cpp/normalize-4.c: Don't use -fextended-identifiers.
	* gcc.dg/cpp/ucnid-1.c: Don't use -fextended-identifiers.  Use
	-g3.
	* gcc.dg/cpp/ucnid-10.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/cpp/ucnid-9.c,
	gcc.dg/cpp/warn-normalized-1.c, gcc.dg/cpp/warn-normalized-2.c,
	gcc.dg/cpp/warn-normalized-3.c: Don't use -fextended-identifiers.
	* 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: Don't use
	-fextended-identifiers.  Use -g.
	* gcc.dg/ucnid-7.c, gcc.dg/ucnid-8.c: Don't use
	-fextended-identifiers.
	* gcc.dg/ucnid-9.c: Don't use -fextended-identifiers.  Use -g.
	* gcc.dg/ucnid-10.c: Don't use -fextended-identifiers.
	* gcc.dg/ucnid-11.c, gcc.dg/ucnid-12.c: Don't use
	-fextended-identifiers.  Use -g.
	* gcc.dg/ucnid-13.c: Don't use -fextended-identifiers.
	* gcc.dg/cpp/ucnid-8.c: Remove test.
	* gcc.dg/cpp/ucnid-10.c, gcc.dg/ucnid-14.c: New tests.

From-SVN: r217144
This commit is contained in:
Joseph Myers 2014-11-05 16:19:10 +00:00 committed by Joseph Myers
parent b92883d6ba
commit 701cade1a2
42 changed files with 136 additions and 77 deletions

View File

@ -1,3 +1,14 @@
2014-11-05 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/9449
* doc/cpp.texi (Character sets, Tokenization)
(Implementation-defined behavior): Don't refer to UCNs in
identifiers requiring -fextended-identifiers.
* doc/cppopts.texi (-fextended-identifiers): Document as enabled
by default for C99 and later and C++.
* doc/invoke.texi (-std=c99, -std=c11): Don't refer to extended
identifiers needing -fextended-identifiers.
2014-11-05 Ilya Tocar <ilya.tocar@intel.com>
* config/i386/i386.c (expand_vec_perm_pshufb): Try vpermq/vpermd

View File

@ -275,11 +275,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. 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.
In identifiers, characters outside the ASCII range can only be
specified with the @samp{\u} and @samp{\U} escapes, not used
directly. If strict ISO C90 conformance is specified with an option
such as @option{-std=c90}, or @option{-fno-extended-identifiers} is
used, then those escapes are not permitted in identifiers.
@node Initial processing
@section Initial processing
@ -504,10 +504,8 @@ 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. 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.
@samp{\u} and @samp{\U} escape sequences. GCC only accepts such
characters in the @samp{\u} and @samp{\U} forms.
As an extension, GCC treats @samp{$} as a letter. This is for
compatibility with some systems, such as VMS, where @samp{$} is commonly
@ -4100,9 +4098,7 @@ be controlled using the @option{-fexec-charset} and
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. GCC currently only permits universal character names if
@option{-fextended-identifiers} is used, because the implementation of
universal character names in identifiers is experimental.
characters.
GCC allows the @samp{$} character in identifiers as an extension for
most targets. This is true regardless of the @option{std=} switch,

View File

@ -560,8 +560,7 @@ Accept @samp{$} in identifiers.
@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++.
enabled by default for C99 (and later C standard versions) and C++.
@item -fno-canonical-system-headers
@opindex fno-canonical-system-headers

View File

@ -1674,8 +1674,7 @@ ISO C90 as modified in amendment 1.
@itemx iso9899:1999
@itemx iso9899:199x
ISO C99. This standard is substantially completely supported, modulo
bugs, extended identifiers (supported except for corner cases when
@option{-fextended-identifiers} is used) and floating-point issues
bugs, corner cases of extended identifiers and floating-point issues
(mainly but not entirely relating to optional C99 features from
Annexes F and G). See
@w{@uref{http://gcc.gnu.org/c99status.html}} for more information. The
@ -1685,9 +1684,8 @@ names @samp{c9x} and @samp{iso9899:199x} are deprecated.
@itemx c1x
@itemx iso9899:2011
ISO C11, the 2011 revision of the ISO C standard. This standard is
substantially completely supported, modulo bugs, extended identifiers
(supported except for corner cases when
@option{-fextended-identifiers} is used), floating-point issues
substantially completely supported, modulo bugs, corner cases of
extended identifiers, floating-point issues
(mainly but not entirely relating to optional C11 features from
Annexes F and G) and the optional Annexes K (Bounds-checking
interfaces) and L (Analyzability). The name @samp{c1x} is deprecated.

View File

@ -1,3 +1,32 @@
2014-11-05 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/9449
* lib/target-supports.exp (check_effective_target_ucn_nocache):
Don't use -fextended-identifiers.
* c-c++-common/cpp/normalize-3.c, c-c++-common/cpp/ucnid-2011-1.c,
g++.dg/cpp/ucn-1.C, g++.dg/cpp/ucnid-1.C, g++.dg/other/ucnid-1.C,
gcc.dg/cpp/normalize-1.c, gcc.dg/cpp/normalize-2.c,
gcc.dg/cpp/normalize-4.c: Don't use -fextended-identifiers.
* gcc.dg/cpp/ucnid-1.c: Don't use -fextended-identifiers. Use
-g3.
* gcc.dg/cpp/ucnid-10.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/cpp/ucnid-9.c,
gcc.dg/cpp/warn-normalized-1.c, gcc.dg/cpp/warn-normalized-2.c,
gcc.dg/cpp/warn-normalized-3.c: Don't use -fextended-identifiers.
* 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: Don't use
-fextended-identifiers. Use -g.
* gcc.dg/ucnid-7.c, gcc.dg/ucnid-8.c: Don't use
-fextended-identifiers.
* gcc.dg/ucnid-9.c: Don't use -fextended-identifiers. Use -g.
* gcc.dg/ucnid-10.c: Don't use -fextended-identifiers.
* gcc.dg/ucnid-11.c, gcc.dg/ucnid-12.c: Don't use
-fextended-identifiers. Use -g.
* gcc.dg/ucnid-13.c: Don't use -fextended-identifiers.
* gcc.dg/cpp/ucnid-8.c: Remove test.
* gcc.dg/cpp/ucnid-10.c, gcc.dg/ucnid-14.c: New tests.
2014-11-05 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp:

View File

@ -1,6 +1,6 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c99 -fextended-identifiers -Wnormalized=id" { target c } } */
/* { dg-options "-fextended-identifiers -Wnormalized=id" { target c++ } } */
/* { dg-options "-std=c99 -Wnormalized=id" { target c } } */
/* { dg-options "-Wnormalized=id" { target c++ } } */
\u00AA
\u00B7

View File

@ -1,6 +1,6 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c11 -pedantic -fextended-identifiers" { target c } } */
/* { dg-options "-std=c++11 -pedantic -fextended-identifiers" { target c++ } } */
/* { dg-options "-std=c11 -pedantic" { target c } } */
/* { dg-options "-std=c++11 -pedantic" { target c++ } } */
\u00A8

View File

@ -1,6 +1,6 @@
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
// { dg-do compile { target c++11 } }
// { dg-options "-fextended-identifiers" }
// { dg-options "" }
int main()
{

View File

@ -1,5 +1,5 @@
/* { dg-do preprocess } */
/* { dg-options "-std=gnu++98 -pedantic -fextended-identifiers" } */
/* { dg-options "-std=gnu++98 -pedantic" } */
\u00AA /* { dg-error "not valid in an identifier" } */
\u00AB /* { dg-error "not valid in an identifier" } */

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-fextended-identifiers" } */
/* { dg-options "" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
#include <cstdlib>

View File

@ -1,5 +1,5 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99" } */
\u00AA
\u00B7

View File

@ -1,5 +1,5 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c99 -fextended-identifiers -Wnormalized=nfkc" } */
/* { dg-options "-std=c99 -Wnormalized=nfkc" } */
\u00AA /* { dg-warning "not in NFKC" } */
\u00B7

View File

@ -1,5 +1,5 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c99 -fextended-identifiers -Wnormalized=none" } */
/* { dg-options "-std=c99 -Wnormalized=none" } */
\u00AA
\u00B7

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99 -g3" } */
void abort (void);
#define \u00C0 1

View File

@ -0,0 +1,8 @@
/* Test UCNs are allowed in preprocessing numbers. */
/* { dg-do compile } */
/* { dg-options "-std=c99" } */
#define a(x) b(x)
#define b(x) 0
#define p )
int c = a(0\u00c0.p);

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99" } */
#include <stdlib.h>
#include <string.h>

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99" } */
#define paste(x, y) x ## y

View File

@ -1,5 +1,5 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99" } */
\u00AA
\u00AB /* { dg-error "not valid in an identifier" } */

View File

@ -1,5 +1,5 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c99 -pedantic -fextended-identifiers" } */
/* { dg-options "-std=c99 -pedantic" } */
\u00AA
\u00AB /* { dg-error "not valid in an identifier" } */

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99" } */
#define a b(
#define b(x) q
int a\U0000000z );

View File

@ -1,8 +0,0 @@
/* { 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);

View File

@ -1,5 +1,5 @@
/* { dg-do preprocess } */
/* { dg-options "-std=c99 -pedantic -fextended-identifiers" } */
/* { dg-options "-std=c99 -pedantic" } */
\u2160
\u2182

View File

@ -1,4 +1,4 @@
// { dg-do preprocess }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -fextended-identifiers -Wnormalized=nfc" }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Wnormalized=nfc" }
\u0F43 // { dg-warning "`.U00000f43' is not in NFC .-Wnormalized=." }

View File

@ -1,4 +1,4 @@
// { dg-do preprocess }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -fextended-identifiers -Wnormalized=nfkc" }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Wnormalized=nfkc" }
\u00AA // { dg-warning "`.U000000aa' is not in NFKC .-Wnormalized=." }

View File

@ -1,4 +1,4 @@
// { dg-do preprocess }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -fextended-identifiers -Werror=normalized=" }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=normalized=" }
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
\u0F43 // { dg-error "`.U00000f43' is not in NFC .-Werror=normalized=." }

View File

@ -1,5 +1,5 @@
/* { dg-do run } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99 -g" } */
void abort (void);
int main (void)

View File

@ -1,7 +1,7 @@
/* Verify diagnostics for extended identifiers refer to UCNs (in the C
locale). Test #pragma pack diagnostics. */
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -fextended-identifiers" } */
/* { dg-options "-std=gnu99" } */
/* { dg-require-ascii-locale "" } */
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */

View File

@ -2,6 +2,6 @@
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
/* { dg-skip-if "-fdata-sections not supported" { { hppa*-*-hpux* } && { ! lp64 } } { "*" } { "" } } */
/* { dg-options "-std=c99 -fextended-identifiers -fdata-sections" } */
/* { dg-options "-std=c99 -fdata-sections -g" } */
#include "ucnid-3.c"

View File

@ -2,6 +2,6 @@
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
/* { dg-skip-if "-ffunction-sections not supported" { { hppa*-*-hpux* } && { ! lp64 } } { "*" } { "" } } */
/* { dg-options "-std=c99 -fextended-identifiers -ffunction-sections" } */
/* { dg-options "-std=c99 -ffunction-sections -g" } */
#include "ucnid-4.c"

View File

@ -1,7 +1,7 @@
/* Verify diagnostics for extended identifiers refer to UCNs (in the C
locale). Miscellaneous diagnostics. */
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -fextended-identifiers -Wpacked" } */
/* { dg-options "-std=gnu99 -Wpacked" } */
/* { dg-require-ascii-locale "" } */
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */

View File

@ -0,0 +1,23 @@
/* Test miscellaneous uses of UCNs in identifiers compile and run OK,
with debug info enabled. */
/* { dg-do run } */
/* { dg-options "-std=c99 -g" } */
extern void abort (void);
extern void exit (int);
int
main (void)
{
struct \u00C0 { int \u00C1; } x;
struct \u00C0 *y = &x;
y->\u00C1 = 1;
if (x.\U000000C1 != 1)
abort ();
goto \u00ff;
\u00ff: ;
enum e { \u00C2 = 4 };
if (\u00C2 != 4)
abort ();
exit (0);
}

View File

@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99 -g" } */
void abort (void);
static int \u00C0 = 1;

View File

@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99 -g" } */
void abort (void);
int \u00C0 = 1;

View File

@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99 -g" } */
void abort (void);
int \u00C0(void) { return 1; }

View File

@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-skip-if "No dollar in identfiers" { "avr-*-*" } { "*" } { "" } } */
/* { dg-options "-std=c99 -fdollars-in-identifiers -fextended-identifiers" } */
/* { dg-options "-std=c99 -fdollars-in-identifiers -g" } */
void abort (void);
int a$b(void) { return 1; }

View File

@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
/* { dg-options "-std=c99 -fextended-identifiers -save-temps" } */
/* { dg-options "-std=c99 -save-temps -g" } */
void abort (void);
int \u00C0(void) { return 1; }

View File

@ -1,7 +1,7 @@
/* Verify diagnostics for extended identifiers refer to UCNs (in the C
locale). */
/* { dg-do compile } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-options "-std=c99" } */
/* { dg-require-ascii-locale "" } */
/* { dg-skip-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */

View File

@ -1,7 +1,7 @@
/* Verify diagnostics for extended identifiers refer to UCNs (in the C
locale). Further tests of C front-end diagnostics. */
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -fextended-identifiers -Wvla" } */
/* { dg-options "-std=gnu99 -Wvla" } */
/* { dg-require-ascii-locale "" } */
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */

View File

@ -3,7 +3,7 @@
/* { dg-do run } */
/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */
/* { dg-options "-std=c99 -fextended-identifiers -fexec-charset=ISO-8859-1" } */
/* { dg-options "-std=c99 -fexec-charset=ISO-8859-1 -g" } */
/* { dg-require-iconv "ISO-8859-1" } */
extern int strcmp (const char *, const char *);

View File

@ -2020,8 +2020,9 @@ proc check_effective_target_ucn_nocache { } {
# -std=c99 is only valid for C
if [check_effective_target_c] {
set ucnopts "-std=c99"
} else {
set ucnopts ""
}
append ucnopts " -fextended-identifiers"
verbose "check_effective_target_ucn_nocache: compiling source" 2
set ret [check_no_compiler_messages_nocache ucn object {
int \u00C0;

View File

@ -1,3 +1,9 @@
2014-11-05 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/9449
* init.c (lang_defaults): Enable extended identifiers for C++ and
C99-based standards.
2014-10-22 Alan Modra <amodra@gmail.com>
* symtab.c (ht_create): Use obstack_specify_allocation in place of

View File

@ -95,25 +95,21 @@ struct lang_flags
static const struct lang_flags lang_defaults[] =
{ /* c99 c++ xnum xid c11 std digr ulit rlit udlit bincst digsep trig */
/* GNUC89 */ { 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
/* GNUC99 */ { 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
/* GNUC11 */ { 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0 },
/* GNUC99 */ { 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
/* GNUC11 */ { 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0 },
/* STDC89 */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 },
/* STDC94 */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 },
/* STDC99 */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 },
/* STDC11 */ { 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1 },
/* GNUCXX */ { 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
/* CXX98 */ { 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 },
/* GNUCXX11 */ { 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0 },
/* CXX11 */ { 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1 },
/* GNUCXX14 */ { 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0 },
/* CXX14 */ { 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
/* GNUCXX1Z */ { 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0 },
/* CXX1Z */ { 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 },
/* STDC99 */ { 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1 },
/* STDC11 */ { 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1 },
/* GNUCXX */ { 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
/* CXX98 */ { 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1 },
/* GNUCXX11 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0 },
/* CXX11 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1 },
/* GNUCXX14 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0 },
/* CXX14 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
/* GNUCXX1Z */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0 },
/* CXX1Z */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 },
/* ASM */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
/* xid should be 1 for GNUC99, STDC99, GNUCXX, CXX98, GNUCXX11, CXX11,
GNUCXX14, and CXX14 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. */