From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19262 invoked by alias); 13 Mar 2014 09:51:44 -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 19252 invoked by uid 89); 13 Mar 2014 09:51:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f171.google.com Received: from mail-we0-f171.google.com (HELO mail-we0-f171.google.com) (74.125.82.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 13 Mar 2014 09:51:42 +0000 Received: by mail-we0-f171.google.com with SMTP id t61so614845wes.16 for ; Thu, 13 Mar 2014 02:51:39 -0700 (PDT) X-Received: by 10.180.82.37 with SMTP id f5mr845635wiy.6.1394704299355; Thu, 13 Mar 2014 02:51:39 -0700 (PDT) Received: from [192.168.1.12] (ppp-94-65-194-240.home.otenet.gr. [94.65.194.240]) by mx.google.com with ESMTPSA id bm8sm4246052wjc.12.2014.03.13.02.51.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 02:51:38 -0700 (PDT) Message-ID: <5321806E.7030107@gmail.com> Date: Thu, 13 Mar 2014 09:52:00 -0000 From: Dimitris Papavasiliou User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: mikestump@comcast.net, stanshebs@earthlink.net Subject: Re: [PING^4][PATCH] Add a couple of dialect and warning options regarding Objective-C instance variable scope References: <52F35508.4080205@gmail.com> <52FCD51A.4010706@gmail.com> <5305D4CF.3080605@gmail.com> <530F08FD.6020207@gmail.com> <5318B410.2080502@gmail.com> In-Reply-To: <5318B410.2080502@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00639.txt.bz2 Ping! On 03/06/2014 07:44 PM, Dimitris Papavasiliou wrote: > Ping! > > On 02/27/2014 11:44 AM, Dimitris Papavasiliou wrote: >> Ping! >> >> On 02/20/2014 12:11 PM, Dimitris Papavasiliou wrote: >>> Hello all, >>> >>> Pinging this patch review request again. See previous messages quoted >>> below for details. >>> >>> Regards, >>> Dimitris >>> >>> On 02/13/2014 04:22 PM, Dimitris Papavasiliou wrote: >>>> Hello, >>>> >>>> Pinging this patch review request. Can someone involved in the >>>> Objective-C language frontend have a quick look at the description of >>>> the proposed features and tell me if it'd be ok to have them in the >>>> trunk so I can go ahead and create proper patches? >>>> >>>> Thanks, >>>> Dimitris >>>> >>>> On 02/06/2014 11:25 AM, Dimitris Papavasiliou wrote: >>>>> Hello, >>>>> >>>>> This is a patch regarding a couple of Objective-C related dialect >>>>> options and warning switches. I have already submitted it a while ago >>>>> but gave up after pinging a couple of times. I am now informed that >>>>> should have kept pinging until I got someone's attention so I'm >>>>> resending it. >>>>> >>>>> The patch is now against an old revision and as I stated originally >>>>> it's >>>>> probably not in a state that can be adopted as is. I'm sending it >>>>> as is >>>>> so that the implemented features can be assesed in terms of their >>>>> usefulness and if they're welcome I'd be happy to make any necessary >>>>> changes to bring it up-to-date, split it into smaller patches, add >>>>> test-cases and anything else that is deemed necessary. >>>>> >>>>> Here's the relevant text from my initial message: >>>>> >>>>> Two of these switches are related to a feature request I submitted a >>>>> while ago, Bug 56044 >>>>> (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56044). I won't reproduce >>>>> the entire argument here since it is available in the feature request. >>>>> The relevant functionality in the patch comes in the form of two >>>>> switches: >>>>> >>>>> -Wshadow-ivars which controls the "local declaration of ‘somevar’ >>>>> hides >>>>> instance variable" warning which curiously is enabled by default >>>>> instead >>>>> of being controlled at least by -Wshadow. The patch changes it so that >>>>> this warning can be enabled and disabled specifically through >>>>> -Wshadow-ivars as well as with all other shadowing-related warnings >>>>> through -Wshadow. >>>>> >>>>> The reason for the extra switch is that, while searching through the >>>>> Internet for a solution to this problem I have found out that other >>>>> people are inconvenienced by this particular warning as well so it >>>>> might >>>>> be useful to be able to turn it off while keeping all the other >>>>> shadowing-related warnings enabled. >>>>> >>>>> -flocal-ivars which when true, as it is by default, treats instance >>>>> variables as having local scope. If false (-fno-local-ivars) instance >>>>> variables must always be referred to as self->ivarname and >>>>> references of >>>>> ivarname resolve to the local or global scope as usual. >>>>> >>>>> I've also taken the opportunity of adding another switch unrelated to >>>>> the above but related to instance variables: >>>>> >>>>> -fivar-visibility which can be set to either private, protected (the >>>>> default), public and package. This sets the default instance variable >>>>> visibility which normally is implicitly protected. My use-case for >>>>> it is >>>>> basically to be able to set it to public and thus effectively disable >>>>> this visibility mechanism altogether which I find no use for and >>>>> therefore have to circumvent. I'm not sure if anyone else feels the >>>>> same >>>>> way towards this but I figured it was worth a try. >>>>> >>>>> I'm attaching a preliminary patch against the current revision in case >>>>> anyone wants to have a look. The changes are very small and any >>>>> blatant >>>>> mistakes should be immediately obvious. I have to admit to having >>>>> virtually no knowledge of the internals of GCC but I have tried to >>>>> keep >>>>> in line with formatting guidelines and general style as well as >>>>> looking >>>>> up the particulars of the way options are handled in the available >>>>> documentation to avoid blind copy-pasting. I have also tried to test >>>>> the >>>>> functionality both in my own (relatively large, or at least not too >>>>> small) project and with small test programs and everything works as >>>>> expected. Finallly, I tried running the tests too but these fail to >>>>> complete both in the patched and unpatched version, possibly due to >>>>> the >>>>> way I've configured GCC. >>>>> >>>>> Dimitris >>>> >>> >> >