Commit 7d0039a6 by Jason Merrill Committed by Jason Merrill

DR 1338

	DR 1338
	* decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
	built-in operator new.

From-SVN: r209313
parent 473fd99a
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> 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58600 PR c++/58600
......
...@@ -3847,8 +3847,12 @@ cxx_init_decl_processing (void) ...@@ -3847,8 +3847,12 @@ cxx_init_decl_processing (void)
newtype = build_exception_variant (newtype, new_eh_spec); newtype = build_exception_variant (newtype, new_eh_spec);
deltype = cp_build_type_attribute_variant (void_ftype_ptr, extvisattr); deltype = cp_build_type_attribute_variant (void_ftype_ptr, extvisattr);
deltype = build_exception_variant (deltype, empty_except_spec); deltype = build_exception_variant (deltype, empty_except_spec);
DECL_IS_OPERATOR_NEW (push_cp_library_fn (NEW_EXPR, newtype, 0)) = 1; tree opnew = push_cp_library_fn (NEW_EXPR, newtype, 0);
DECL_IS_OPERATOR_NEW (push_cp_library_fn (VEC_NEW_EXPR, newtype, 0)) = 1; 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); global_delete_fndecl = push_cp_library_fn (DELETE_EXPR, deltype, ECF_NOTHROW);
push_cp_library_fn (VEC_DELETE_EXPR, deltype, ECF_NOTHROW); push_cp_library_fn (VEC_DELETE_EXPR, deltype, ECF_NOTHROW);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment