summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-16 02:27:02 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-16 02:27:02 +0000
commit54f6ea65c2f6dd92b6ddf40bb1f4e28575cd1218 (patch)
tree699ab721514cf76b302460b68157f29fee95d298 /gcc/cp/cp-tree.h
parent00b7ca84db5fc0fb4085836d7a5cf277ab132168 (diff)
downloadgcc-54f6ea65c2f6dd92b6ddf40bb1f4e28575cd1218.tar.gz
gcc:
* c.opt: Add -fnothrow-opt. gcc/cp: * cp-tree.h (TYPE_NOEXCEPT_P): New macro. * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if TYPE_NOEXCEPT_P. (finish_eh_spec_block): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159450 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 3b8e9d05584..361a6f26b37 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1741,6 +1741,12 @@ struct GTY(()) lang_type {
(TYPE_RAISES_EXCEPTIONS (NODE) \
&& TREE_VALUE (TYPE_RAISES_EXCEPTIONS (NODE)) == NULL_TREE)
+/* For FUNCTION_TYPE or METHOD_TYPE, true if NODE is noexcept. This is the
+ case for things declared noexcept(true) and, with -fnothrow-opt, for
+ throw() functions. */
+#define TYPE_NOEXCEPT_P(NODE) \
+ (flag_nothrow_opt && TYPE_NOTHROW_P(NODE))
+
/* The binding level associated with the namespace. */
#define NAMESPACE_LEVEL(NODE) \
(LANG_DECL_NS_CHECK (NODE)->level)