re PR libobjc/22606 (Exceptions cannot be thrown from -forward::)
2005-07-26 Andrew Pinski <pinskia@physics.uc.edu> PR libobjc/22606 * Makefile.in (ALL_CFLAGS): Add -fexceptions. 2005-07-26 Andrew Pinski <pinskia@physics.uc.edu> PR libobjc/22606 * objc.dg/try-catch-11.m: New test. From-SVN: r102386
This commit is contained in:
parent
a4174ebf41
commit
84fd360ddc
4 changed files with 53 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-07-26 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR libobjc/22606
|
||||
* objc.dg/try-catch-11.m: New test.
|
||||
|
||||
2005-07-26 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/22486
|
||||
|
|
42
gcc/testsuite/objc.dg/try-catch-11.m
Normal file
42
gcc/testsuite/objc.dg/try-catch-11.m
Normal file
|
@ -0,0 +1,42 @@
|
|||
/* Check that throwing an exception from a -forward:: works. */
|
||||
/* Developed by Marcin Koziej <creep@desk.pl>. */
|
||||
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-fobjc-exceptions -w" } */
|
||||
|
||||
#import <objc/Object.h>
|
||||
#import <objc/objc-api.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static int i;
|
||||
|
||||
@interface Thrower : Object
|
||||
- forward: (SEL) s : (void*) a;
|
||||
@end
|
||||
|
||||
@implementation Thrower
|
||||
- forward: (SEL) s : (void*) a
|
||||
{
|
||||
i++;
|
||||
@throw [Object new];
|
||||
}
|
||||
@end
|
||||
int
|
||||
main()
|
||||
{
|
||||
id t = [Thrower new];
|
||||
@try
|
||||
{
|
||||
[t doesnotexist];
|
||||
}
|
||||
@catch (id error)
|
||||
{
|
||||
i++;
|
||||
[error free];
|
||||
}
|
||||
|
||||
if (i != 2)
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,3 +1,8 @@
|
|||
2005-07-26 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR libobjc/22606
|
||||
* Makefile.in (ALL_CFLAGS): Add -fexceptions.
|
||||
|
||||
2005-06-08 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* objc/NXConstStr.h, objc/Object.h, objc/Protocol.h,
|
||||
|
|
|
@ -73,7 +73,7 @@ CC = @CC@
|
|||
CFLAGS = @CFLAGS@
|
||||
WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
|
||||
ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
|
||||
-DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing
|
||||
-DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
|
||||
|
||||
# Libtool
|
||||
# The following strings describe the version of the obj-C library
|
||||
|
|
Loading…
Add table
Reference in a new issue