public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dimitris Papavasiliou <dpapavas@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Add a couple of dialect and warning options regarding Objective-C instance variable scope
Date: Tue, 02 Jul 2013 08:05:00 -0000	[thread overview]
Message-ID: <51D28A45.30007@gmail.com> (raw)
In-Reply-To: <51C835D9.5080706@gmail.com>

Since there obviously is no interest in this patch I'm simply going to 
attach it to the ticket mentioned below (Bug 56044) in case someone 
decides to look into it in the future.  If anyone should want to comment 
on this please do so at the bug tracker since I probably won't be 
following this list.

Thanks,
Dimitris

On 06/24/2013 03:04 PM, Dimitris Papavasiliou wrote:
> Ping! Would anybody care to comment on this?
>
> On 06/10/2013 12:44 AM, Dimitris Papavasiliou wrote:
>> Hello,
>>
>> First, let me say that I have consciously broken most of the rules
>> mentioned about patch submission at gcc.gnu.org but I have done so in
>> order to spare myself from wasting time to provide a proper patch in
>> case the implemented functionality is not deemed worthy of approval and
>> adoption into GCC. If any of the implemented switches prove to be
>> welcome I'll be more than happy to split them into separate patches, add
>> test-cases and add ChangLog entries as needed.
>>
>> 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
>

  reply	other threads:[~2013-07-02  8:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 21:44 Dimitris Papavasiliou
2013-06-24 12:09 ` Dimitris Papavasiliou
2013-07-02  8:05   ` Dimitris Papavasiliou [this message]
2014-02-06  9:22 Dimitris Papavasiliou
2014-04-24 16:03 ` Mike Stump
2014-04-24 23:16   ` Dimitris Papavasiliou
2014-04-25  3:20     ` Mike Stump
2014-04-25 16:50       ` Dimitris Papavasiliou
2014-04-25 16:53         ` Mike Stump
2014-04-28 10:37           ` Dimitris Papavasiliou
2014-05-05  7:31             ` Dimitris Papavasiliou
2014-05-12  7:49               ` Dimitris Papavasiliou
2014-05-12 16:25             ` Mike Stump
2014-05-12 18:57               ` Dimitris Papavasiliou
2014-05-12 19:14                 ` Mike Stump
2014-05-12 20:53             ` Mike Stump
2014-05-13 14:17               ` Dimitris Papavasiliou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51D28A45.30007@gmail.com \
    --to=dpapavas@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).