Showing the changes to gcc/libcpp/include/cpplib.h (1 of 40760 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Definitions for CPP library. | 1 | /* Definitions for CPP library. |
| 2 | Copyright (C) 1995-2015 Free Software Foundation, Inc. | 2 | Copyright (C) 1995-2016 Free Software Foundation, Inc. |
| 3 | Written by Per Bothner, 1994-95. | 3 | Written by Per Bothner, 1994-95. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify it | 5 | This program is free software; you can redistribute it and/or modify it |
| @@ -119,6 +119,7 @@ struct _cpp_file; · 113 unmodified lines | |||
| 119 | TK(WCHAR, LITERAL) /* L'char' */ \ | 119 | TK(WCHAR, LITERAL) /* L'char' */ \ |
| 120 | TK(CHAR16, LITERAL) /* u'char' */ \ | 120 | TK(CHAR16, LITERAL) /* u'char' */ \ |
| 121 | TK(CHAR32, LITERAL) /* U'char' */ \ | 121 | TK(CHAR32, LITERAL) /* U'char' */ \ |
| 122 | TK(UTF8CHAR, LITERAL) /* u8'char' */ \ | ||
| 122 | TK(OTHER, LITERAL) /* stray punctuation */ \ | 123 | TK(OTHER, LITERAL) /* stray punctuation */ \ |
| 123 | \ | 124 | \ |
| 124 | TK(STRING, LITERAL) /* "string" */ \ | 125 | TK(STRING, LITERAL) /* "string" */ \ |
| @@ -133,6 +134,7 @@ struct _cpp_file; · 8 unmodified lines | |||
| 133 | TK(WCHAR_USERDEF, LITERAL) /* L'char'_suffix - C++-0x */ \ | 134 | TK(WCHAR_USERDEF, LITERAL) /* L'char'_suffix - C++-0x */ \ |
| 134 | TK(CHAR16_USERDEF, LITERAL) /* u'char'_suffix - C++-0x */ \ | 135 | TK(CHAR16_USERDEF, LITERAL) /* u'char'_suffix - C++-0x */ \ |
| 135 | TK(CHAR32_USERDEF, LITERAL) /* U'char'_suffix - C++-0x */ \ | 136 | TK(CHAR32_USERDEF, LITERAL) /* U'char'_suffix - C++-0x */ \ |
| 137 | TK(UTF8CHAR_USERDEF, LITERAL) /* u8'char'_suffix - C++-0x */ \ | ||
| 136 | TK(STRING_USERDEF, LITERAL) /* "string"_suffix - C++-0x */ \ | 138 | TK(STRING_USERDEF, LITERAL) /* "string"_suffix - C++-0x */ \ |
| 137 | TK(WSTRING_USERDEF, LITERAL) /* L"string"_suffix - C++-0x */ \ | 139 | TK(WSTRING_USERDEF, LITERAL) /* L"string"_suffix - C++-0x */ \ |
| 138 | TK(STRING16_USERDEF, LITERAL) /* u"string"_suffix - C++-0x */ \ | 140 | TK(STRING16_USERDEF, LITERAL) /* u"string"_suffix - C++-0x */ \ |
| @@ -235,7 +237,8 @@ struct GTY(()) cpp_identifier { · 96 unmodified lines | |||
| 235 | /* A preprocessing token. This has been carefully packed and should | 237 | /* A preprocessing token. This has been carefully packed and should |
| 236 | occupy 16 bytes on 32-bit hosts and 24 bytes on 64-bit hosts. */ | 238 | occupy 16 bytes on 32-bit hosts and 24 bytes on 64-bit hosts. */ |
| 237 | struct GTY(()) cpp_token { | 239 | struct GTY(()) cpp_token { |
| 238 | source_location src_loc; /* Location of first char of token. */ | 240 | source_location src_loc; /* Location of first char of token, |
| 241 | together with range of full token. */ | ||
| 239 | ENUM_BITFIELD(cpp_ttype) type : CHAR_BIT; /* token type */ | 242 | ENUM_BITFIELD(cpp_ttype) type : CHAR_BIT; /* token type */ |
| 240 | unsigned short flags; /* flags - see above */ | 243 | unsigned short flags; /* flags - see above */ |
| 241 | 244 | ||
| @@ -339,6 +342,9 @@ struct cpp_options · 97 unmodified lines | |||
| 339 | /* Nonzero means process u/U prefix literals (UTF-16/32). */ | 342 | /* Nonzero means process u/U prefix literals (UTF-16/32). */ |
| 340 | unsigned char uliterals; | 343 | unsigned char uliterals; |
| 341 | 344 | ||
| 345 | /* Nonzero means process u8 prefixed character literals (UTF-8). */ | ||
| 346 | unsigned char utf8_char_literals; | ||
| 347 | |||
| 342 | /* Nonzero means process r/R raw strings. If this is set, uliterals | 348 | /* Nonzero means process r/R raw strings. If this is set, uliterals |
| 343 | must be set as well. */ | 349 | must be set as well. */ |
| 344 | unsigned char rliterals; | 350 | unsigned char rliterals; |
| @@ -484,6 +490,9 @@ struct cpp_options · 139 unmodified lines | |||
| 484 | /* True if warn about differences between C90 and C99. */ | 490 | /* True if warn about differences between C90 and C99. */ |
| 485 | signed char cpp_warn_c90_c99_compat; | 491 | signed char cpp_warn_c90_c99_compat; |
| 486 | 492 | ||
| 493 | /* True if warn about differences between C++98 and C++11. */ | ||
| 494 | bool cpp_warn_cxx11_compat; | ||
| 495 | |||
| 487 | /* Dependency generation. */ | 496 | /* Dependency generation. */ |
| 488 | struct | 497 | struct |
| 489 | { | 498 | { |
| @@ -546,7 +555,7 @@ struct cpp_callbacks · 56 unmodified lines | |||
| 546 | The line_map is for the new file. It is NULL if there is no new file. | 555 | The line_map is for the new file. It is NULL if there is no new file. |
| 547 | (In C this happens when done with <built-in>+<command line> and also | 556 | (In C this happens when done with <built-in>+<command line> and also |
| 548 | when done with a main file.) This can be used for resource cleanup. */ | 557 | when done with a main file.) This can be used for resource cleanup. */ |
| 549 | void (*file_change) (cpp_reader *, const struct line_map *); | 558 | void (*file_change) (cpp_reader *, const line_map_ordinary *); |
| 550 | 559 | ||
| 551 | void (*dir_change) (cpp_reader *, const char *); | 560 | void (*dir_change) (cpp_reader *, const char *); |
| 552 | void (*include) (cpp_reader *, source_location, const unsigned char *, | 561 | void (*include) (cpp_reader *, source_location, const unsigned char *, |
| @@ -565,9 +574,9 @@ struct cpp_callbacks · 12 unmodified lines | |||
| 565 | 574 | ||
| 566 | /* Called to emit a diagnostic. This callback receives the | 575 | /* Called to emit a diagnostic. This callback receives the |
| 567 | translated message. */ | 576 | translated message. */ |
| 568 | bool (*error) (cpp_reader *, int, int, source_location, unsigned int, | 577 | bool (*error) (cpp_reader *, int, int, rich_location *, |
| 569 | const char *, va_list *) | 578 | const char *, va_list *) |
| 570 | ATTRIBUTE_FPTR_PRINTF(6,0); | 579 | ATTRIBUTE_FPTR_PRINTF(5,0); |
| 571 | 580 | ||
| 572 | /* Callbacks for when a macro is expanded, or tested (whether | 581 | /* Callbacks for when a macro is expanded, or tested (whether |
| 573 | defined or not at the time) in #ifdef, #ifndef or "defined". */ | 582 | defined or not at the time) in #ifdef, #ifndef or "defined". */ |
| @@ -804,6 +813,7 @@ extern int cpp_avoid_paste (cpp_reader *, const cpp_token *, · 230 unmodified lines | |||
| 804 | extern const cpp_token *cpp_get_token (cpp_reader *); | 813 | extern const cpp_token *cpp_get_token (cpp_reader *); |
| 805 | extern const cpp_token *cpp_get_token_with_location (cpp_reader *, | 814 | extern const cpp_token *cpp_get_token_with_location (cpp_reader *, |
| 806 | source_location *); | 815 | source_location *); |
| 816 | extern bool cpp_fun_like_macro_p (cpp_hashnode *); | ||
| 807 | extern const unsigned char *cpp_macro_definition (cpp_reader *, | 817 | extern const unsigned char *cpp_macro_definition (cpp_reader *, |
| 808 | cpp_hashnode *); | 818 | cpp_hashnode *); |
| 809 | extern void _cpp_backup_tokens (cpp_reader *, unsigned int); | 819 | extern void _cpp_backup_tokens (cpp_reader *, unsigned int); |
| @@ -960,7 +970,8 @@ enum { · 150 unmodified lines | |||
| 960 | CPP_W_LITERAL_SUFFIX, | 970 | CPP_W_LITERAL_SUFFIX, |
| 961 | CPP_W_DATE_TIME, | 971 | CPP_W_DATE_TIME, |
| 962 | CPP_W_PEDANTIC, | 972 | CPP_W_PEDANTIC, |
| 963 | CPP_W_C90_C99_COMPAT | 973 | CPP_W_C90_C99_COMPAT, |
| 974 | CPP_W_CXX11_COMPAT | ||
| 964 | }; | 975 | }; |
| 965 | 976 | ||
| 966 | /* Output a diagnostic of some kind. */ | 977 | /* Output a diagnostic of some kind. */ |
| @@ -976,6 +987,9 @@ extern bool cpp_warning_syshdr (cpp_reader *, int, const char *msgid, ...) · 9 unmodified lines | |||
| 976 | /* Output a diagnostic with "MSGID: " preceding the | 987 | /* Output a diagnostic with "MSGID: " preceding the |
| 977 | error string of errno. No location is printed. */ | 988 | error string of errno. No location is printed. */ |
| 978 | extern bool cpp_errno (cpp_reader *, int, const char *msgid); | 989 | extern bool cpp_errno (cpp_reader *, int, const char *msgid); |
| 990 | /* Similarly, but with "FILENAME: " instead of "MSGID: ", where | ||
| 991 | the filename is not localized. */ | ||
| 992 | extern bool cpp_errno_filename (cpp_reader *, int, const char *filename); | ||
| 979 | 993 | ||
| 980 | /* Same as cpp_error, except additionally specifies a position as a | 994 | /* Same as cpp_error, except additionally specifies a position as a |
| 981 | (translation unit) physical line and physical column. If the line is | 995 | (translation unit) physical line and physical column. If the line is |