This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add a couple of dialect and warning options regarding Objective-C instance variable scope


On 04/28/2014 01:35 PM, Dimitris Papavasiliou wrote:
On 04/25/2014 07:50 PM, Mike Stump wrote:
On Apr 25, 2014, at 9:34 AM, Dimitris Papavasiliou<>

--Wreturn-type -Wsequence-point -Wshadow @gol
+-Wreturn-type -Wsequence-point -Wshadow -Wshadow-ivar @gol

This has to be -Wno-shadow-ivar, we document the non-default…

+@item -Wshadow-ivar @r{(Objective-C only)}


+ /* Check wheter the local variable hides the instance variable. */

spelling, whether...

Fixed these.

+ a = private; /* { dg-warning "hides instance variable" "" { xfail
*-*-* } } */
+ a = protected; /* { dg-warning "hides instance variable" "" { xfail
*-*-* } } */
+ a = public; /* { dg-warning "hides instance variable" "" { xfail
*-*-* } } */

No, we don’t expect failures. We makes the compiler do what we wants
or it gets the hose again. Then, we expect it to be perfect. If you
won’t want warning, and non are produces, then just remove the /* …
*/, or write /* no warning */.

I've fixed these as per your request. For the record though, this form
of test seems to be fairly common in the test suites as this output

dimitris@debian:~/sandbox/gcc-build$ find ../gcc-source/gcc/testsuite/
-name "*.c" -o -name "*.C" -o -name "*.m" | xargs grep "xfail \*-\*-\*"
| wc -l

Many of these seem to be in error or warning messages which are expected
not to show up. In any case if the messages do show up they'll trigger
the excessive messages test so I suppose that's enough.

Also, synth up the ChnageLogs… :-), they are trivial enough.


And, just pop them all into one patch (cd ..; svn diff), 3 is 3x the
work for me.


Once we resolve the 3 warning tests above, this will be ok.

Actually, there were a few more { xfail *-*-* } in the other test cases.
I've removed these as well.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]