diff options
author | Nathan Sidwell <nathan@acm.org> | 2018-10-31 14:46:39 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2018-10-31 14:46:39 +0000 |
commit | 43af5ef1cefc671f7baf3d0e33d46ab7f9a7d8b1 (patch) | |
tree | 2a68026aa23c85eecb22c2084afdea6651a79292 /libcpp | |
parent | c788734738f1afd93b5b78c0e22e013e9c9720eb (diff) | |
download | gcc-43af5ef1cefc671f7baf3d0e33d46ab7f9a7d8b1.zip gcc-43af5ef1cefc671f7baf3d0e33d46ab7f9a7d8b1.tar.gz gcc-43af5ef1cefc671f7baf3d0e33d46ab7f9a7d8b1.tar.bz2 |
[2/7] Preprocessor node access
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02038.html
* include/cpplib.h (HT_NODE): Don't cast NODE.
(NODE_LEN, NODE_NAME): Use HT_NODE.
From-SVN: r265687
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 3 | ||||
-rw-r--r-- | libcpp/include/cpplib.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 0736174..bcbfa97 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,5 +1,8 @@ 2018-10-31 Nathan Sidwell <nathan@acm.org> + * include/cpplib.h (HT_NODE): Don't cast NODE. + (NODE_LEN, NODE_NAME): Use HT_NODE. + * directives.c (DIRECTIVE_TABLE): Drop historical frequency comments. * files.c (_cpp_stack_file): Fix indentation. diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index a9b4fb3..345155b 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -844,9 +844,9 @@ enum cpp_builtin_type }; #define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE)) -#define HT_NODE(NODE) ((ht_identifier *) (NODE)) -#define NODE_LEN(NODE) HT_LEN (&(NODE)->ident) -#define NODE_NAME(NODE) HT_STR (&(NODE)->ident) +#define HT_NODE(NODE) (&(NODE)->ident) +#define NODE_LEN(NODE) HT_LEN (HT_NODE (NODE)) +#define NODE_NAME(NODE) HT_STR (HT_NODE (NODE)) /* The common part of an identifier node shared amongst all 3 C front ends. Also used to store CPP identifiers, which are a superset of |