Message ID | 4E95797E.5040904@oracle.com |
---|---|
State | New |
Headers | show |
On 10/12/2011 07:26 AM, Paolo Carlini wrote: > + delattrs > + = build_tree_list (get_identifier ("externally_visible"), > + build_tree_list (NULL_TREE, integer_one_node)); Why integer_one_node? Jason
On 10/12/2011 02:18 PM, Jason Merrill wrote: > On 10/12/2011 07:26 AM, Paolo Carlini wrote: >> + delattrs >> + = build_tree_list (get_identifier ("externally_visible"), >> + build_tree_list (NULL_TREE, integer_one_node)); > > Why integer_one_node? To be honest? No idea, I copied what pre-existed for operator new. Shall I test (NULL_TREE, NULL_TREE)?? Paolo.
On Wed, Oct 12, 2011 at 2:29 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote: > On 10/12/2011 02:18 PM, Jason Merrill wrote: >> >> On 10/12/2011 07:26 AM, Paolo Carlini wrote: >>> >>> + delattrs >>> + = build_tree_list (get_identifier ("externally_visible"), >>> + build_tree_list (NULL_TREE, integer_one_node)); >> >> Why integer_one_node? > > To be honest? No idea, I copied what pre-existed for operator new. Shall I > test (NULL_TREE, NULL_TREE)?? build_tree_list (get_identifier ("externally_visible"), NULL_TREE) > Paolo. > >
Index: decl.c =================================================================== --- decl.c (revision 179842) +++ decl.c (working copy) @@ -3654,7 +3654,7 @@ cxx_init_decl_processing (void) current_lang_name = lang_name_cplusplus; { - tree newattrs; + tree newattrs, delattrs; tree newtype, deltype; tree ptr_ftype_sizetype; tree new_eh_spec; @@ -3687,9 +3687,16 @@ cxx_init_decl_processing (void) newattrs = build_tree_list (get_identifier ("alloc_size"), build_tree_list (NULL_TREE, integer_one_node)); + newattrs + = chainon (newattrs, build_tree_list + (get_identifier ("externally_visible"), NULL_TREE)); newtype = cp_build_type_attribute_variant (ptr_ftype_sizetype, newattrs); newtype = build_exception_variant (newtype, new_eh_spec); - deltype = build_exception_variant (void_ftype_ptr, empty_except_spec); + delattrs + = build_tree_list (get_identifier ("externally_visible"), + build_tree_list (NULL_TREE, integer_one_node)); + deltype = cp_build_type_attribute_variant (void_ftype_ptr, delattrs); + deltype = build_exception_variant (deltype, empty_except_spec); push_cp_library_fn (NEW_EXPR, newtype); push_cp_library_fn (VEC_NEW_EXPR, newtype); global_delete_fndecl = push_cp_library_fn (DELETE_EXPR, deltype);