diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-10 14:27:32 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-10 14:27:32 +0000 |
commit | 2ee04baa68b1550bd7c06cee36b87adf3176a6c6 (patch) | |
tree | c5f8e2e7ce183b106614d41e5e99dcd5c47f5581 /libcpp/expr.c | |
parent | 5eaad62c471572a312c7e3f6f08c2a25ba891c80 (diff) | |
download | gcc-2ee04baa68b1550bd7c06cee36b87adf3176a6c6.tar.gz |
gcc:
* c-lex.c (c_lex_with_flags): Expect cpp_hashnode in
tok->val.node.node.
libcpp:
* include/cpplib.h (enum cpp_token_fld_kind): Add
CPP_TOKEN_FLD_TOKEN_NO.
(struct cpp_macro_arg, struct cpp_identifier): Define.
(union cpp_token_u): Use struct cpp_identifier for identifiers.
Use struct cpp_macro_arg for macro arguments. Add token_no for
CPP_PASTE token numbers.
* directives.c (_cpp_handle_directive, lex_macro_node, do_pragma,
do_pragma_poison, parse_assertion): Use val.node.node in place of
val.node.
* expr.c (parse_defined, eval_token): Use val.node.node in place
of val.node.
* lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len,
cpp_spell_token, cpp_output_token, _cpp_equiv_tokens,
cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in
place of val.arg_no. Use val.node.node in place of val.node.
* macro.c (replace_args, cpp_get_token, parse_params,
lex_expansion_token, create_iso_definition, cpp_macro_definition):
Use val.macro_arg.arg_no or val.token_no in place of val.arg_no.
Use val.node.node in place of val.node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147341 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/expr.c')
-rw-r--r-- | libcpp/expr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcpp/expr.c b/libcpp/expr.c index ecedb96c672..6887b165690 100644 --- a/libcpp/expr.c +++ b/libcpp/expr.c @@ -651,7 +651,7 @@ parse_defined (cpp_reader *pfile) if (token->type == CPP_NAME) { - node = token->val.node; + node = token->val.node.node; if (paren && cpp_get_token (pfile)->type != CPP_CLOSE_PAREN) { cpp_error (pfile, CPP_DL_ERROR, "missing ')' after \"defined\""); @@ -771,14 +771,14 @@ eval_token (cpp_reader *pfile, const cpp_token *token) break; case CPP_NAME: - if (token->val.node == pfile->spec_nodes.n_defined) + if (token->val.node.node == pfile->spec_nodes.n_defined) return parse_defined (pfile); else if (CPP_OPTION (pfile, cplusplus) - && (token->val.node == pfile->spec_nodes.n_true - || token->val.node == pfile->spec_nodes.n_false)) + && (token->val.node.node == pfile->spec_nodes.n_true + || token->val.node.node == pfile->spec_nodes.n_false)) { result.high = 0; - result.low = (token->val.node == pfile->spec_nodes.n_true); + result.low = (token->val.node.node == pfile->spec_nodes.n_true); } else { @@ -786,7 +786,7 @@ eval_token (cpp_reader *pfile, const cpp_token *token) result.low = 0; if (CPP_OPTION (pfile, warn_undef) && !pfile->state.skip_eval) cpp_error (pfile, CPP_DL_WARNING, "\"%s\" is not defined", - NODE_NAME (token->val.node)); + NODE_NAME (token->val.node.node)); } break; |