{ /* 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 },
{
initialized = 1;
+ _cpp_init_lexer ();
+
/* Set up the trigraph map. This doesn't need to do anything if
we were compiled with a compiler that supports C99 designated
initializers. */
/* Initialize a cpp_reader structure. */
cpp_reader *
-cpp_create_reader (enum c_lang lang, hash_table *table,
+cpp_create_reader (enum c_lang lang, cpp_hash_table *table,
struct line_maps *line_table)
{
cpp_reader *pfile;
CPP_OPTION (pfile, warn_dollars) = 1;
CPP_OPTION (pfile, warn_variadic_macros) = 1;
CPP_OPTION (pfile, warn_builtin_macro_redefined) = 1;
+ /* By default, track locations of tokens resulting from macro
+ expansion. The '2' means, track the locations with the highest
+ accuracy. Read the comments for struct
+ cpp_options::track_macro_expansion to learn about the other
+ values. */
+ CPP_OPTION (pfile, track_macro_expansion) = 2;
CPP_OPTION (pfile, warn_normalize) = normalized_C;
+ CPP_OPTION (pfile, warn_literal_suffix) = 1;
/* Default CPP arithmetic to something sensible for the host for the
benefit of dumb users like fix-header. */
_cpp_define_builtin (pfile, "__STDC__ 1");
if (CPP_OPTION (pfile, cplusplus))
- _cpp_define_builtin (pfile, "__cplusplus 199711L");
+ {
+ if (CPP_OPTION (pfile, lang) == CLK_CXX11
+ || CPP_OPTION (pfile, lang) == CLK_GNUCXX11)
+ _cpp_define_builtin (pfile, "__cplusplus 201103L");
+ else
+ _cpp_define_builtin (pfile, "__cplusplus 199711L");
+ }
else if (CPP_OPTION (pfile, lang) == CLK_ASM)
_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");