Skip to content

Commit 0f1cbe3

Browse files
author
nathan
committed
[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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265687 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 242dc50 commit 0f1cbe3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

libcpp/ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
2018-10-31 Nathan Sidwell <[email protected]>
22

3+
* include/cpplib.h (HT_NODE): Don't cast NODE.
4+
(NODE_LEN, NODE_NAME): Use HT_NODE.
5+
36
* directives.c (DIRECTIVE_TABLE): Drop historical frequency
47
comments.
58
* files.c (_cpp_stack_file): Fix indentation.

libcpp/include/cpplib.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,9 @@ enum cpp_builtin_type
844844
};
845845

846846
#define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE))
847-
#define HT_NODE(NODE) ((ht_identifier *) (NODE))
848-
#define NODE_LEN(NODE) HT_LEN (&(NODE)->ident)
849-
#define NODE_NAME(NODE) HT_STR (&(NODE)->ident)
847+
#define HT_NODE(NODE) (&(NODE)->ident)
848+
#define NODE_LEN(NODE) HT_LEN (HT_NODE (NODE))
849+
#define NODE_NAME(NODE) HT_STR (HT_NODE (NODE))
850850

851851
/* The common part of an identifier node shared amongst all 3 C front
852852
ends. Also used to store CPP identifiers, which are a superset of

0 commit comments

Comments
 (0)