Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/objc.dg/shadow-2.m @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
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" } */ #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