Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/objc.dg/naming-6.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
/* Testing for detecting duplicate ivars. */ /* { dg-do compile } */ @interface A { /* TODO: Have the testsuite check that these messages occur only once! */ char x; /* { dg-message "previous declaration" } */ char x; /* { dg-error "duplicate instance variable" } */ } @end /* In some versions of the compiler (eg, 4.6.x), having a subclass would generate additional, duplicate errors for the duplicate instance variable in the superclass, so adding the following would cause the error messages above to be duplicated. */ @interface B : A { char y; } @end