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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [missing-proto-3.m] - Blame information for rev 318

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 309 jeremybenn
/* Ensure that the compiler gracefully handles missing protocol declarations.
2
   In addition to not crashing :-), the compiler should properly handle
3
   valid protocol references, even when they're mixed with invalid ones.  */
4
/* { dg-do compile } */
5
 
6
#include <objc/objc.h>
7
 
8
@protocol DefinedProtocol
9
- (id) missingMethod1;
10
@end
11
 
12
@interface MyClass <UndefinedProtocol, DefinedProtocol>
13
/* { dg-error "cannot find protocol declaration for .UndefinedProtocol." "" { target *-*-* } 12 } */
14
@end
15
 
16
@implementation MyClass
17
+(Class)class
18
{
19
  return self;
20
}
21
@end
22
 
23
/* { dg-warning "incomplete implementation of class .MyClass." "" { target *-*-* } 21 } */
24
/* { dg-warning "method definition for .\\-missingMethod1. not found" "" { target *-*-* } 21 } */
25
/* { dg-warning "class .MyClass. does not fully implement the .DefinedProtocol. protocol" "" { target *-*-* } 21 } */
26
 

powered by: WebSVN 2.1.0

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