From patchwork Wed Oct 12 13:18:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 119199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 09DB2B6F71 for ; Thu, 13 Oct 2011 00:20:18 +1100 (EST) Received: (qmail 12998 invoked by alias); 12 Oct 2011 13:20:10 -0000 Received: (qmail 12980 invoked by uid 22791); 12 Oct 2011 13:20:08 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_XT X-Spam-Check-By: sourceware.org Received: from smtp205.alice.it (HELO smtp205.alice.it) (82.57.200.101) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Oct 2011 13:19:54 +0000 Received: from [192.168.1.4] (79.52.211.215) by smtp205.alice.it (8.5.124.08) id 4E8575B7013FEEEB; Wed, 12 Oct 2011 15:19:50 +0200 Message-ID: <4E95939C.5060903@oracle.com> Date: Wed, 12 Oct 2011 15:18:20 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Richard Guenther CC: Jason Merrill , "gcc-patches@gcc.gnu.org" Subject: Re: [C++ Patch] PR 50594 (C++ front-end bits) References: <4E95797E.5040904@oracle.com> <4E9585A1.4090003@redhat.com> <4E958843.7060707@oracle.com> <4E958EB8.8080505@oracle.com> In-Reply-To: <4E958EB8.8080505@oracle.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org ... or like this, maybe better. 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, extvisattr; tree newtype, deltype; tree ptr_ftype_sizetype; tree new_eh_spec; @@ -3687,9 +3687,13 @@ cxx_init_decl_processing (void) newattrs = build_tree_list (get_identifier ("alloc_size"), build_tree_list (NULL_TREE, integer_one_node)); + extvisattr = build_tree_list (get_identifier ("externally_visible"), + NULL_TREE); + newattrs = chainon (newattrs, extvisattr); 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); + deltype = cp_build_type_attribute_variant (void_ftype_ptr, extvisattr); + 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);