URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [attributes/] [method-noreturn-1.m] - Rev 739
Go to most recent revision | Compare with Previous | Blame | View Log
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010. */ /* { dg-do compile } */ #include <objc/objc.h> #include <stdlib.h> @interface MyClass { Class isa; } + (id) method1 __attribute__ ((noreturn)); - (id) method2 __attribute__ ((noreturn)); + (id) method3 __attribute__ ((noreturn)); - (id) method4 __attribute__ ((noreturn)); @end @implementation MyClass + (id) method1 { return self; /* { dg-warning "function declared .noreturn. has a .return. statement" } */ } /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 20 } */ - (id) method2 { return self; /* { dg-warning "function declared .noreturn. has a .return. statement" } */ } /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 24 } */ + (id) method3 { abort (); } - (id) method4 { abort (); } @end
Go to most recent revision | Compare with Previous | Blame | View Log