diff options
author | Jason Merrill <jason@redhat.com> | 2014-04-11 14:24:57 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-04-11 14:24:57 -0400 |
commit | 7d0039a6fcd8fa25cf699c8a1ea30f8f8a92a8e7 (patch) | |
tree | 6df24a1157c9b08fe5c8dd4a052de604dd52e1e4 /gcc/cp | |
parent | 473fd99a4ca248ade8f6d648e4b688695055c1ee (diff) | |
download | gcc-7d0039a6fcd8fa25cf699c8a1ea30f8f8a92a8e7.zip gcc-7d0039a6fcd8fa25cf699c8a1ea30f8f8a92a8e7.tar.gz gcc-7d0039a6fcd8fa25cf699c8a1ea30f8f8a92a8e7.tar.bz2 |
DR 1338
DR 1338
* decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
built-in operator new.
From-SVN: r209313
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f722da3..04e4787 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2014-04-11 Jason Merrill <jason@redhat.com> + + DR 1338 + * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on + built-in operator new. + 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58600 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 3400594..069b374 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3847,8 +3847,12 @@ cxx_init_decl_processing (void) newtype = build_exception_variant (newtype, new_eh_spec); deltype = cp_build_type_attribute_variant (void_ftype_ptr, extvisattr); deltype = build_exception_variant (deltype, empty_except_spec); - DECL_IS_OPERATOR_NEW (push_cp_library_fn (NEW_EXPR, newtype, 0)) = 1; - DECL_IS_OPERATOR_NEW (push_cp_library_fn (VEC_NEW_EXPR, newtype, 0)) = 1; + tree opnew = push_cp_library_fn (NEW_EXPR, newtype, 0); + DECL_IS_MALLOC (opnew) = 1; + DECL_IS_OPERATOR_NEW (opnew) = 1; + opnew = push_cp_library_fn (VEC_NEW_EXPR, newtype, 0); + DECL_IS_MALLOC (opnew) = 1; + DECL_IS_OPERATOR_NEW (opnew) = 1; global_delete_fndecl = push_cp_library_fn (DELETE_EXPR, deltype, ECF_NOTHROW); push_cp_library_fn (VEC_DELETE_EXPR, deltype, ECF_NOTHROW); |