Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/objc.dg/shadow-1.m @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
/* Test disabling of warnings for shadowing instance variables. */ /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>. */ /* { dg-do compile } */ /* { dg-additional-options "-Wno-shadow-ivar" } */ #include <objc/objc.h> @interface MyClass { @private int private; @protected int protected; @public int public; } - (void) test; @end @implementation MyClass - (void) test { int private = 12; int protected = 12; int public = 12; int a; a = private; /* No warning. */ a = protected; /* No warning. */ a = public; /* No warning. */ } @end