diff options
Diffstat (limited to 'libcpp/include')
-rw-r--r-- | libcpp/include/cpplib.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 0ab6635..f1b5eab 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -134,7 +134,8 @@ struct _cpp_file; TK(COMMENT, LITERAL) /* Only if output comments. */ \ /* SPELL_LITERAL happens to DTRT. */ \ TK(MACRO_ARG, NONE) /* Macro argument. */ \ - TK(PRAGMA, NONE) /* Only if deferring pragmas */ \ + TK(PRAGMA, NONE) /* Only for deferred pragmas. */ \ + TK(PRAGMA_EOL, NONE) /* End-of-line for deferred pragmas. */ \ TK(PADDING, NONE) /* Whitespace for -E. */ #define OP(e, s) CPP_ ## e, @@ -182,6 +183,7 @@ enum cpp_token_fld_kind { CPP_TOKEN_FLD_SOURCE, CPP_TOKEN_FLD_STR, CPP_TOKEN_FLD_ARG_NO, + CPP_TOKEN_FLD_PRAGMA, CPP_TOKEN_FLD_NONE }; @@ -211,6 +213,9 @@ struct cpp_token GTY(()) /* Argument no. for a CPP_MACRO_ARG. */ unsigned int GTY ((tag ("CPP_TOKEN_FLD_ARG_NO"))) arg_no; + + /* Caller-supplied identifier for a CPP_PRAGMA. */ + unsigned int GTY ((tag ("CPP_TOKEN_FLD_PRAGMA"))) pragma; } GTY ((desc ("cpp_token_val_index (&%1)"))) val; }; @@ -434,10 +439,6 @@ struct cpp_options /* Nonzero means __STDC__ should have the value 0 in system headers. */ unsigned char stdc_0_in_system_headers; - /* True means return pragmas as tokens rather than processing - them directly. */ - bool defer_pragmas; - /* True means error callback should be used for diagnostics. */ bool client_diagnostic; }; @@ -673,7 +674,8 @@ extern unsigned char *cpp_spell_token (cpp_reader *, const cpp_token *, unsigned char *, bool); extern void cpp_register_pragma (cpp_reader *, const char *, const char *, void (*) (cpp_reader *), bool); -extern void cpp_handle_deferred_pragma (cpp_reader *, const cpp_string *); +extern void cpp_register_deferred_pragma (cpp_reader *, const char *, + const char *, unsigned, bool, bool); extern int cpp_avoid_paste (cpp_reader *, const cpp_token *, const cpp_token *); extern const cpp_token *cpp_get_token (cpp_reader *); |