OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [local-decl-1.m] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 309 jeremybenn
/* Test for hiding of ivars by local variables.  */
2
/* Author: Ziemowit Laski <zlaski@apple.com>.  */
3
/* { dg-do compile } */
4
 
5
@interface Sprite {
6
  int a;
7
}
8
@end
9
 
10
Sprite *glob;
11
 
12
@interface blah
13
{
14
  Sprite* sprite;
15
}
16
@end
17
 
18
@implementation blah
19
- (Sprite *)load
20
{
21
    Sprite *sprite = 0;
22
    Sprite *glob = 0;    /* ok */
23
    return sprite;       /* { dg-warning "hides instance variable" } */
24
}
25
@end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.