From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8220 invoked by alias); 30 Jul 2015 13:13:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8208 invoked by uid 89); 30 Jul 2015 13:13:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,KAM_STOCKGEN,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 30 Jul 2015 13:13:12 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 1DF2D91740 for ; Thu, 30 Jul 2015 13:13:11 +0000 (UTC) Received: from [10.10.56.134] (vpn-56-134.rdu2.redhat.com [10.10.56.134]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6UDDA4r028554 for ; Thu, 30 Jul 2015 09:13:10 -0400 Message-ID: <55BA22E6.4010909@redhat.com> Date: Thu, 30 Jul 2015 14:09:00 -0000 From: Andrew MacLeod User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: gcc-patches Subject: [patch] Move symbol_visibility to coretypes.h Content-Type: multipart/mixed; boundary="------------000907040200070406010303" X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg02569.txt.bz2 This is a multi-part message in MIME format. --------------000907040200070406010303 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 386 Pretty simple. Both flag-types.h and tree-core.h check to see if the other header has already defined this enumerated type, and defined it if not. Its an unnecessary conditional compilation and dual maintenance of this small enum. This patch puts it in coretypes.h and makes it always available. Bootstraps on x86_64-pc-linux-gnu with no new regressions. Ok for trunk? Andrew --------------000907040200070406010303 Content-Type: text/x-patch; name="symbol.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="symbol.patch" Content-length: 2113 * coretypes.h (enum symbol_visibility): Relocate here. * flag-types.h (enum symbol_visibility): Remove. * tree-core.h (enum symbol_visibility): Remove. Index: coretypes.h =================================================================== *** coretypes.h (revision 224292) --- coretypes.h (working copy) *************** enum function_class { *** 263,268 **** --- 263,278 ---- function_c11_misc }; + /* Enumerate visibility settings. This is deliberately ordered from most + to least visibility. */ + enum symbol_visibility + { + VISIBILITY_DEFAULT, + VISIBILITY_PROTECTED, + VISIBILITY_HIDDEN, + VISIBILITY_INTERNAL + }; + /* Suppose that higher bits are target dependent. */ #define MEMMODEL_MASK ((1<<16)-1) Index: flag-types.h =================================================================== *** flag-types.h (revision 224292) --- flag-types.h (working copy) *************** enum debug_struct_file *** 91,109 **** DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */ }; - /* Enumerate visibility settings. This is deliberately ordered from most - to least visibility. */ - #ifndef SYMBOL_VISIBILITY_DEFINED - #define SYMBOL_VISIBILITY_DEFINED - enum symbol_visibility - { - VISIBILITY_DEFAULT, - VISIBILITY_PROTECTED, - VISIBILITY_HIDDEN, - VISIBILITY_INTERNAL - }; - #endif - /* Enumerate Objective-c instance variable visibility settings. */ enum ivar_visibility --- 91,96 ---- Index: tree-core.h =================================================================== *** tree-core.h (revision 224292) --- tree-core.h (working copy) *************** enum cv_qualifier { *** 431,447 **** TYPE_QUAL_ATOMIC = 0x8 }; - /* Enumerate visibility settings. */ - #ifndef SYMBOL_VISIBILITY_DEFINED - #define SYMBOL_VISIBILITY_DEFINED - enum symbol_visibility { - VISIBILITY_DEFAULT, - VISIBILITY_PROTECTED, - VISIBILITY_HIDDEN, - VISIBILITY_INTERNAL - }; - #endif // SYMBOL_VISIBILITY_DEFINED - /* Standard named or nameless data types of the C compiler. */ enum tree_index { TI_ERROR_MARK, --- 431,436 ---- --------------000907040200070406010303--