From cb50701ec2c7abdc48db278802022f7e94675d07 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 25 Jul 2019 11:36:19 +0200 Subject: Come up with function_decl_type and use it in tree_function_decl. 2019-07-25 Martin Liska * calls.c (maybe_warn_alloc_args_overflow): Use new macros (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P). * coverage.c (coverage_begin_function): Likewise. * fold-const.c (tree_expr_nonzero_warnv_p): Likewise. * gimple.c (gimple_call_nonnull_result_p): Likewise. * ipa-icf.c (sem_item::compare_referenced_symbol_properties): Likewise. (sem_item::hash_referenced_symbol_properties): Likewise. * lto-streamer-out.c (hash_tree): Likewise. * predict.c (expr_expected_value_1): Likewise. * tree-inline.c (expand_call_inline): Likewise. * tree-streamer-in.c (unpack_ts_function_decl_value_fields): Likewise. * tree-streamer-out.c (pack_ts_function_decl_value_fields): Likewise. * tree-core.h (enum function_decl_type): New enum. (struct tree_function_decl): Remove operator_new_flag and lambda_function. * tree.h (FUNCTION_DECL_DECL_TYPE): New. (set_function_decl_type): Likewise. (DECL_IS_OPERATOR_NEW_P): New. (DECL_SET_IS_OPERATOR_NEW): Likewise. (DECL_LAMBDA_FUNCTION): Likewise. (DECL_LAMBDA_FUNCTION_P): Likewise. (DECL_IS_OPERATOR_NEW): Remove. (DECL_SET_LAMBDA_FUNCTION): Likewise. 2019-07-25 Martin Liska * c-decl.c (merge_decls): Use new macros (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P). 2019-07-25 Martin Liska * decl.c (duplicate_decls): Use new macros (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P). (cxx_init_decl_processing): Likewise. (grok_op_properties): Likewise. * parser.c (cp_parser_lambda_declarator_opt): Likewise. 2019-07-25 Martin Liska * lto-common.c (compare_tree_sccs_1): Use new macros (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P). From-SVN: r273790 --- gcc/c/ChangeLog | 5 +++++ gcc/c/c-decl.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/c') diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 0bb1d4c..77ffbfb 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2019-07-25 Martin Liska + + * c-decl.c (merge_decls): Use new macros + (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P). + 2019-07-23 Richard Biener PR tree-optimization/83518 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 0d107ad..92cc06e 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -2639,7 +2639,8 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype) |= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl); TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl); DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl); - DECL_IS_OPERATOR_NEW (newdecl) |= DECL_IS_OPERATOR_NEW (olddecl); + if (DECL_IS_OPERATOR_NEW_P (olddecl)) + DECL_SET_IS_OPERATOR_NEW (newdecl, true); TREE_READONLY (newdecl) |= TREE_READONLY (olddecl); DECL_PURE_P (newdecl) |= DECL_PURE_P (olddecl); DECL_IS_NOVOPS (newdecl) |= DECL_IS_NOVOPS (olddecl); -- cgit v1.1