diff options
author | Nathan Sidwell <nathan@acm.org> | 2018-08-20 17:45:42 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2018-08-20 17:45:42 +0000 |
commit | a5a35247177708c5dd2e6c835ae5aa19fe1fb77e (patch) | |
tree | 809bb3027936321b5a454d5ad029a73df48babe7 /libcpp | |
parent | a570d97f5b8612ad2756333e5f21098be64057df (diff) | |
download | gcc-a5a35247177708c5dd2e6c835ae5aa19fe1fb77e.tar.gz |
[CPP PATCH] node field bits
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01171.html
* include/cpplib.h: Fixup some whitespace.
(cpp_hashnode): Reduce type to 2 bit & flags to 8.
From-SVN: r263669
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 3 | ||||
-rw-r--r-- | libcpp/include/cpplib.h | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 8998c0dace9..de6f5421b12 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,5 +1,8 @@ 2018-08-20 Nathan Sidwell <nathan@acm.org> + * include/cpplib.h: Fixup some whitespace. + (cpp_hashnode): Reduce type to 2 bit & flags to 8. + * include/cpplib.h (NODE_BUILTIN, NODE_MACRO_ARG): Delete. Renumber others. (enum node_type): Replace NT_MACRO with NT_USER_MACRO, diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index e7a933b1787..85aa09fc9f3 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -813,8 +813,10 @@ struct GTY(()) cpp_hashnode { then index into directive table. Otherwise, a NODE_OPERATOR. */ unsigned char rid_code; /* Rid code - for front ends. */ - ENUM_BITFIELD(node_type) type : 6; /* CPP node type. */ - unsigned int flags : 10; /* CPP flags. */ + ENUM_BITFIELD(node_type) type : 2; /* CPP node type. */ + unsigned int flags : 8; /* CPP flags. */ + + /* 6 bits spare (plus another 32 on 64-bit hosts). */ union _cpp_hashnode_value GTY ((desc ("%1.type"))) value; }; @@ -940,7 +942,6 @@ extern const cpp_token *cpp_get_token_with_location (cpp_reader *, inline bool cpp_user_macro_p (const cpp_hashnode *node) { return node->type == NT_USER_MACRO; - } inline bool cpp_builtin_macro_p (const cpp_hashnode *node) { @@ -950,6 +951,7 @@ inline bool cpp_macro_p (const cpp_hashnode *node) { return node->type & NT_MACRO_MASK; } + /* Returns true if NODE is a function-like user macro. */ inline bool cpp_fun_like_macro_p (cpp_hashnode *node) { |