diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2000-03-09 15:34:52 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-03-09 15:34:52 -0500 |
commit | 12a22e76d64eca6e3b54949121b5c5820e189ee1 (patch) | |
tree | d6b66c9ef5d6a7003c13b1e76cfe2cc51c1fe8f3 /gcc/tree.h | |
parent | 217ab4b7e745db9ff5d1fd4ec8ad364f7060a388 (diff) | |
download | gcc-12a22e76d64eca6e3b54949121b5c5820e189ee1.zip gcc-12a22e76d64eca6e3b54949121b5c5820e189ee1.tar.gz gcc-12a22e76d64eca6e3b54949121b5c5820e189ee1.tar.bz2 |
tree.h (struct tree_common): Rename raises_flag to nothrow_flag.
* tree.h (struct tree_common): Rename raises_flag to nothrow_flag.
(TREE_NOTHROW): Rename from TREE_RAISES.
* toplev.c (rest_of_compilation): Set it.
* print-tree.c (print_node): Adjust.
* tree.c (stabilize_reference, build, build1): Don't set TREE_RAISES.
(stabilize_reference_1, get_unwidened, get_narrower): Likewise.
* calls.c (emit_call_1): Add 'nothrow' parm. Add
REG_EH_REGION note as appropriate.
(libfunc_nothrow): New fn.
(emit_library_call, emit_library_call_value): Use it.
(expand_call): Check TREE_NOTHROW.
cp:
* call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
appropriate.
* decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
* except.c (call_eh_info, alloc_eh_object, expand_throw): Set
TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
* rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
expand_generic_desc): Likewise.
From-SVN: r32453
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -206,7 +206,7 @@ struct tree_common unsigned asm_written_flag: 1; unsigned used_flag : 1; - unsigned raises_flag : 1; + unsigned nothrow_flag : 1; unsigned static_flag : 1; unsigned public_flag : 1; unsigned private_flag : 1; @@ -322,10 +322,10 @@ struct tree_common TREE_USED in expressions, IDENTIFIER_NODE - raises_flag: + nothrow_flag: - TREE_RAISES in - expressions + TREE_NOTHROW in + CALL_EXPR, FUNCTION_DECL */ /* Define accessors for the fields that all tree nodes have @@ -599,9 +599,9 @@ extern void tree_class_check_failed PARAMS ((const tree, char, was used. */ #define TREE_USED(NODE) ((NODE)->common.used_flag) -/* Nonzero for a tree node whose evaluation could result - in the raising of an exception. Not implemented yet. */ -#define TREE_RAISES(NODE) ((NODE)->common.raises_flag) +/* In a FUNCTION_DECL, nonzero means a call to the function cannot throw + an exception. In a CALL_EXPR, nonzero means the call cannot throw. */ +#define TREE_NOTHROW(NODE) ((NODE)->common.nothrow_flag) /* Used in classes in C++. */ #define TREE_PRIVATE(NODE) ((NODE)->common.private_flag) @@ -1300,15 +1300,17 @@ struct tree_type contour that restored a stack level and which is now exited. */ #define DECL_TOO_LATE(NODE) (DECL_CHECK (NODE)->decl.bit_field_flag) -/* In a FUNCTION_DECL, nonzero means a built in function. */ -#define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN) -/* For a builtin function, identify which part of the compiler defined it. */ -#define DECL_BUILT_IN_CLASS(NODE) (DECL_CHECK (NODE)->decl.built_in_class) +/* Unused in FUNCTION_DECL. */ /* In a VAR_DECL that's static, nonzero if the space is in the text section. */ #define DECL_IN_TEXT_SECTION(NODE) (DECL_CHECK (NODE)->decl.bit_field_flag) +/* In a FUNCTION_DECL, nonzero means a built in function. */ +#define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN) +/* For a builtin function, identify which part of the compiler defined it. */ +#define DECL_BUILT_IN_CLASS(NODE) (DECL_CHECK (NODE)->decl.built_in_class) + /* Used in VAR_DECLs to indicate that the variable is a vtable. Used in FIELD_DECLs for vtable pointers. Used in FUNCTION_DECLs to indicate that the function is virtual. */ |