aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog8
-rw-r--r--libcpp/include/cpplib.h4
-rw-r--r--libcpp/init.c10
3 files changed, 15 insertions, 7 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index a24f6ad..261b8a5 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-20 Joseph Myers <joseph@codesourcery.com>
+
+ * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
+ (CLK_STDC1X): Change to CLK_STDC11.
+ * init.c (lang_defaults): Update comments.
+ (cpp_init_builtins): Update language tests. Use 201112L for C11
+ __STDC_VERSION__.
+
2011-12-20 Andreas Schwab <schwab@linux-m68k.org>
* configure: Regenerate.
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 518fe94..bf59d01 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -165,8 +165,8 @@ enum cpp_ttype
#undef TK
/* C language kind, used when calling cpp_create_reader. */
-enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC1X,
- CLK_STDC89, CLK_STDC94, CLK_STDC99, CLK_STDC1X,
+enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11,
+ CLK_STDC89, CLK_STDC94, CLK_STDC99, CLK_STDC11,
CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11, CLK_ASM};
/* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
diff --git a/libcpp/init.c b/libcpp/init.c
index ff006b1..5fa82ca 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -87,11 +87,11 @@ static const struct lang_flags lang_defaults[] =
{ /* c99 c++ xnum xid std // digr ulit rlit user_literals */
/* GNUC89 */ { 0, 0, 1, 0, 0, 1, 1, 0, 0, 0 },
/* GNUC99 */ { 1, 0, 1, 0, 0, 1, 1, 1, 1, 0 },
- /* GNUC1X */ { 1, 0, 1, 0, 0, 1, 1, 1, 1, 0 },
+ /* GNUC11 */ { 1, 0, 1, 0, 0, 1, 1, 1, 1, 0 },
/* STDC89 */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
/* STDC94 */ { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0 },
/* STDC99 */ { 1, 0, 1, 0, 1, 1, 1, 0, 0, 0 },
- /* STDC1X */ { 1, 0, 1, 0, 1, 1, 1, 1, 0, 0 },
+ /* STDC11 */ { 1, 0, 1, 0, 1, 1, 1, 1, 0, 0 },
/* GNUCXX */ { 0, 1, 1, 0, 0, 1, 1, 0, 0, 0 },
/* CXX98 */ { 0, 1, 1, 0, 1, 1, 1, 0, 0, 0 },
/* GNUCXX11 */ { 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 },
@@ -474,9 +474,9 @@ cpp_init_builtins (cpp_reader *pfile, int hosted)
_cpp_define_builtin (pfile, "__ASSEMBLER__ 1");
else if (CPP_OPTION (pfile, lang) == CLK_STDC94)
_cpp_define_builtin (pfile, "__STDC_VERSION__ 199409L");
- else if (CPP_OPTION (pfile, lang) == CLK_STDC1X
- || CPP_OPTION (pfile, lang) == CLK_GNUC1X)
- _cpp_define_builtin (pfile, "__STDC_VERSION__ 201000L");
+ else if (CPP_OPTION (pfile, lang) == CLK_STDC11
+ || CPP_OPTION (pfile, lang) == CLK_GNUC11)
+ _cpp_define_builtin (pfile, "__STDC_VERSION__ 201112L");
else if (CPP_OPTION (pfile, c99))
_cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L");