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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [basic.mm] - Blame information for rev 762

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

Line No. Rev Author Line
1 703 jeremybenn
// A basic sanity check for Objective-C++.
2
// { dg-do run }
3
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
4
 
5
#include "../objc-obj-c++-shared/TestsuiteObject.m"
6
#include 
7
 
8
@interface Greeter : TestsuiteObject
9
- (void) greet: (const char *)msg;
10
@end
11
 
12
@implementation Greeter
13
- (void) greet: (const char *)msg
14
{ std::cout << msg << __VERSION__ << std::endl;}
15
@end
16
 
17
int
18
main ()
19
{
20
  std::cout << "Hello from C++" << __VERSION__ << std::endl;
21
  Greeter *obj = [Greeter new];
22
  [obj greet: "Hello from Objective-C++"];
23
}
24
 

powered by: WebSVN 2.1.0

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