On 04/25/2014 04:07 AM, Mike Stump wrote: > On Apr 24, 2014, at 4:09 PM, Dimitris Papavasiliou wrote: >> On 04/24/2014 07:00 PM, Mike Stump wrote: >>> On Feb 6, 2014, at 1:25 AM, Dimitris Papavasiliou wrote: >>>> This is a patch regarding a couple of Objective-C related dialect options and warning switches. >>> >>> Ok. >>> >>> Committed revision 209753. >>> >>> If you could, please add documentation and a test case. >> >> Thanks for taking the time to look at this, although to be honest I didn't expect a straight merge into the trunk. > > Don’t submit changes you don’t want! :-) > >> I'll add documentation and test cases as soon as I figure out how. > > Just copy testsuite/objc.dg/private-2.m into shadow-1.m and then `fix’ it to test what you want. If you need one with and one without a flag, copy it twice and use something like: > > // { dg-options "-Wshadow" } > > on it. Type make RUNTESTFLAGS=dg.exp=shadow-1.m check-objc to test it. > > For the doc, just find a simple option in the part of the manual you want to put it in, and copy it. We document the non-default, (Wno-shadow-ivar for example) options. I'm attaching three additional patches: documentation.patch: This adds documentation for the three additional switches plus a small change to reflect the fact that -Wshadow now controls instance variable shadowing as well. tests.patch: This adds 9 test cases that test both the intended behavior of the added switches as well as the default behavior in their absence. enabledby_wshadow.patch: This adds the proposed change to allow specifying -Wno-shadow to turn off -Wshadow-ivar as well plus one more test to make sure that it happens. I've run make check-objc with all these changes and everything seems to be fine. Let me know if you need anything else and thanks again for your time. Dimitris