diff options
| author | mrg <mrg@NetBSD.org> | 2021-04-11 00:02:09 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2021-04-11 00:02:09 +0000 |
| commit | 2f0555361acce879a06baa0355b1540d987e91c0 (patch) | |
| tree | 1e26452d7db53184a19d90d6d21bb2e7c1364b18 /external/gpl3/gcc/dist/libcpp/include/cpplib.h | |
| parent | 4769109fba441ff3431b5fca256674d48a13aa25 (diff) | |
initial merge of GCC 10.3.0.
these three files are not yet finished merging:
gcc/config/rs6000/rs6000.c
libsanitizer/lsan/lsan_allocator.h
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
our current GCC 9 sanitizers are newer than GCC 10's still, so that
may take a little to untease, so it's probable that more than
these 2 will need more changes.
rs6000.c has some changes related to ABI and supported functionality
that need to be merged forward.
Diffstat (limited to 'external/gpl3/gcc/dist/libcpp/include/cpplib.h')
| -rw-r--r-- | external/gpl3/gcc/dist/libcpp/include/cpplib.h | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/external/gpl3/gcc/dist/libcpp/include/cpplib.h b/external/gpl3/gcc/dist/libcpp/include/cpplib.h index 41e11099d9a..8c3c4059316 100644 --- a/external/gpl3/gcc/dist/libcpp/include/cpplib.h +++ b/external/gpl3/gcc/dist/libcpp/include/cpplib.h @@ -1,5 +1,5 @@ /* Definitions for CPP library. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 Free Software Foundation, Inc. Written by Per Bothner, 1994-95. This program is free software; you can redistribute it and/or modify it @@ -78,6 +78,7 @@ struct _cpp_file; OP(NOT_EQ, "!=") \ OP(GREATER_EQ, ">=") \ OP(LESS_EQ, "<=") \ + OP(SPACESHIP, "<=>") \ \ /* These two are unary + / - in preprocessor expressions. */ \ OP(PLUS_EQ, "+=") /* math */ \ @@ -480,9 +481,15 @@ struct cpp_options /* Nonzero for C++ 2014 Standard digit separators. */ unsigned char digit_separators; + /* Nonzero for C2X decimal floating-point constants. */ + unsigned char dfp_constants; + /* Nonzero for C++2a __VA_OPT__ feature. */ unsigned char va_opt; + /* Nonzero for the '::' token. */ + unsigned char scope; + /* Holds the name of the target (execution) character set. */ const char *narrow_charset; @@ -505,6 +512,9 @@ struct cpp_options /* True if warn about differences between C90 and C99. */ signed char cpp_warn_c90_c99_compat; + /* True if warn about differences between C11 and C2X. */ + signed char cpp_warn_c11_c2x_compat; + /* True if warn about differences between C++98 and C++11. */ bool cpp_warn_cxx11_compat; @@ -550,6 +560,9 @@ struct cpp_options /* True enables canonicalization of system header file paths. */ bool canonical_system_headers; + + /* The maximum depth of the nested #include. */ + unsigned int max_include_depth; }; /* Diagnostic levels. To get a diagnostic without associating a @@ -601,6 +614,7 @@ enum cpp_warning_reason { CPP_W_DATE_TIME, CPP_W_PEDANTIC, CPP_W_C90_C99_COMPAT, + CPP_W_C11_C2X_COMPAT, CPP_W_CXX11_COMPAT, CPP_W_EXPANSION_TO_DEFINED }; @@ -663,6 +677,9 @@ struct cpp_callbacks /* Callback to identify whether an attribute exists. */ int (*has_attribute) (cpp_reader *); + /* Callback to determine whether a built-in function is recognized. */ + int (*has_builtin) (cpp_reader *); + /* Callback that can change a user lazy into normal macro. */ void (*user_lazy_macro) (cpp_reader *, cpp_macro *, unsigned); @@ -842,7 +859,10 @@ enum cpp_builtin_type BT_PRAGMA, /* `_Pragma' operator */ BT_TIMESTAMP, /* `__TIMESTAMP__' */ BT_COUNTER, /* `__COUNTER__' */ - BT_HAS_ATTRIBUTE /* `__has_attribute__(x)' */ + BT_HAS_ATTRIBUTE, /* `__has_attribute(x)' */ + BT_HAS_BUILTIN, /* `__has_builtin(x)' */ + BT_HAS_INCLUDE, /* `__has_include(x)' */ + BT_HAS_INCLUDE_NEXT /* `__has_include_next(x)' */ }; #define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE)) @@ -894,7 +914,6 @@ class cpp_string_location_reader { private: location_t m_loc; int m_offset_per_column; - line_maps *m_line_table; }; /* A class for storing the source ranges of all of the characters within @@ -932,11 +951,11 @@ class cpp_substring_ranges that cpplib will share; this technique is used by the C front ends. */ extern cpp_reader *cpp_create_reader (enum c_lang, struct ht *, - struct line_maps *); + class line_maps *); /* Reset the cpp_reader's line_map. This is only used after reading a PCH file. */ -extern void cpp_set_line_map (cpp_reader *, struct line_maps *); +extern void cpp_set_line_map (cpp_reader *, class line_maps *); /* Call this to change the selected language standard (e.g. because of command line options). */ @@ -956,7 +975,7 @@ extern void add_cpp_remap_path (const char *); extern cpp_options *cpp_get_options (cpp_reader *); extern cpp_callbacks *cpp_get_callbacks (cpp_reader *); extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *); -extern struct deps *cpp_get_deps (cpp_reader *); +extern class mkdeps *cpp_get_deps (cpp_reader *); /* This function reads the file, but does not start preprocessing. It returns the name of the original file; this is the same as the @@ -1305,4 +1324,15 @@ extern bool cpp_userdef_char_p extern const char * cpp_get_userdef_suffix (const cpp_token *); +/* In charset.c */ +int cpp_byte_column_to_display_column (const char *data, int data_length, + int column); +inline int cpp_display_width (const char *data, int data_length) +{ + return cpp_byte_column_to_display_column (data, data_length, data_length); +} +int cpp_display_column_to_byte_column (const char *data, int data_length, + int display_col); +int cpp_wcwidth (cppchar_t c); + #endif /* ! LIBCPP_CPPLIB_H */ |
