aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-12-20 20:44:13 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2011-12-20 20:44:13 +0000
commit48b0b19630a19eaab06efd305387b930f94fc5d3 (patch)
tree79d9fc73e458081edfd36bdc00b3cb1ba3d1c859 /libcpp
parentd8fa39bfc87c62cdd4970027dedbd982cc2049e1 (diff)
downloadgcc-48b0b19630a19eaab06efd305387b930f94fc5d3.zip
gcc-48b0b19630a19eaab06efd305387b930f94fc5d3.tar.gz
gcc-48b0b19630a19eaab06efd305387b930f94fc5d3.tar.bz2
gcc:
* c-decl.c (diagnose_mismatched_decls, grokdeclarator, grokfield) (finish_struct): Refer to C11 in comments. Use flag_isoc11. * c-parser.c (c_parser_static_assert_declaration) (c_parser_static_assert_declaration_no_semi, c_parser_declspecs) (c_parser_alignas_specifier, c_parser_alignof_expression): Refer to C11 in comments. Use flag_isoc11. * c-typeck.c (comptypes_check_different_types): Refer to C11 in comment. * doc/cpp.texi (Overview): Refer to -std=c11 instead of -std=c1x. * doc/cppopts.texi (-std=c11, -std=gnu11): Document in preference to -std=c1x and -std=gnu1x. * doc/extend.texi (Inline, Alternate Keywords, Other Builtins) (__builtin_complex, Unnamed Fields): Refer to -std=c11 and C11 instead of -std=c1x and C1X. * doc/invoke.texi (-std=c11, -std=iso9899:2011): Document in preference to -std=c1x. (-std=gnu11): Document in preference to -std=gnu1x. * doc/standards.texi: Document C11 instead of C1X. Document C11 as actual standard. Document headers required from freestanding C11 implementations. * ginclude/float.h, ginclude/stddef.h: Test __STDC_VERSION__ >= 201112L for C11. Update comments to refer to C11. gcc/c-family: * c-common.c (flag_isoc99): Update comment to refer to C11. (flag_isoc1x): Change to flag_isoc11. * c-common.h (flag_isoc99): Update comment to refer to C11. (flag_isoc1x): Change to flag_isoc11. * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to C11. * c-opts.c (set_std_c1x): Change to set_std_c11. (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11. Call set_std_c11. (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11. (set_std_c1): Use CLK_STDC11 and CLK_GNUC11. * c.opt (std=c1x): Change to std=c11. Document as non-draft standard. (std=c1x, std=iso9899:2011): Add as aliases of std=c11. (std=gnu1x): Change to std=gnu11. Refer to non-draft standard. (std=gnu1x): Make alias of std=gnu11. gcc/testsuite: * gcc.dg/c11-version-1.c, gcc.dg/c11-version-2.c, gcc.dg/c94-version-1.c, gcc.dg/c99-version-1.c, gcc.dg/gnu11-version-1.c: New tests. libcpp: * 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__. From-SVN: r182551
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");