Commit 5d19b781 by Ulrich Weigand Committed by Ulrich Weigand

PR testsuite/23611, PR testsuite/23615

	PR testsuite/23611, PR testsuite/23615
	* obj-c++.dg/bitfield-3.mm: Include standard headers instead of
	writing prototypes of library functions by hand.
	* obj-c++.dg/bitfield-4.mm: Likewise.
	* obj-c++.dg/const-str-4.mm: Likewise.
	* obj-c++.dg/encode-4.mm: Likewise.
	* obj-c++.dg/encode-5.mm: Likewise.
	* obj-c++.dg/encode-6.mm: Likewise.
	* obj-c++.dg/gnu-runtime-3.mm: Likewise.
	* obj-c++.dg/method-10.mm: Likewise.
	* obj-c++.dg/method-17.mm: Likewise.
	* obj-c++.dg/method-19.mm: Likewise.
	* obj-c++.dg/try-catch-2.mm: Likewise.

From-SVN: r105074
parent b7add506
2005-10-07 Ulrich Weigand <uweigand@de.ibm.com>
PR testsuite/23611, PR testsuite/23615
* obj-c++.dg/bitfield-3.mm: Include standard headers instead of
writing prototypes of library functions by hand.
* obj-c++.dg/bitfield-4.mm: Likewise.
* obj-c++.dg/const-str-4.mm: Likewise.
* obj-c++.dg/encode-4.mm: Likewise.
* obj-c++.dg/encode-5.mm: Likewise.
* obj-c++.dg/encode-6.mm: Likewise.
* obj-c++.dg/gnu-runtime-3.mm: Likewise.
* obj-c++.dg/method-10.mm: Likewise.
* obj-c++.dg/method-17.mm: Likewise.
* obj-c++.dg/method-19.mm: Likewise.
* obj-c++.dg/try-catch-2.mm: Likewise.
2005-10-06 Richard Henderson <rth@redhat.com> 2005-10-06 Richard Henderson <rth@redhat.com>
PR 24236 PR 24236
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
typedef struct objc_object { struct objc_class *class_pointer; } *id; typedef struct objc_object { struct objc_class *class_pointer; } *id;
extern "C" { #include <stdlib.h>
extern void abort(void); #include <string.h>
extern int strcmp(const char *, const char *);
}
#define CHECK_IF(expr) if(!(expr)) abort(); #define CHECK_IF(expr) if(!(expr)) abort();
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
#include <objc/Object.h> #include <objc/Object.h>
extern "C" { #include <stdlib.h>
extern void abort(void); #include <string.h>
extern int strcmp(const char *str1, const char *str2);
}
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
enum Enum { one, two, three, four }; enum Enum { one, two, three, four };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* { dg-options "-fnext-runtime -fconstant-string-class=MyString -lobjc" } */ /* { dg-options "-fnext-runtime -fconstant-string-class=MyString -lobjc" } */
/* { dg-do run { target *-*-darwin* } } */ /* { dg-do run { target *-*-darwin* } } */
extern "C" void abort(void); #include <stdlib.h>
@interface MyString @interface MyString
{ {
......
...@@ -31,10 +31,9 @@ ...@@ -31,10 +31,9 @@
#define CLASS_GETINSTANCEMETHOD class_get_instance_method #define CLASS_GETINSTANCEMETHOD class_get_instance_method
#endif #endif
extern "C" { #include <stdio.h>
extern int sscanf(const char *str, const char *format, ...); #include <stdlib.h>
extern void abort(void);
}
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
@interface Foo: Object @interface Foo: Object
......
...@@ -13,10 +13,9 @@ ...@@ -13,10 +13,9 @@
#include <objc/objc-api.h> #include <objc/objc-api.h>
#endif #endif
extern "C" { #include <stdio.h>
extern int sscanf(const char *str, const char *format, ...); #include <stdlib.h>
extern void abort(void);
}
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
enum Enum { enum Enum {
......
...@@ -12,10 +12,9 @@ ...@@ -12,10 +12,9 @@
#define OBJC_GETCLASS objc_get_class #define OBJC_GETCLASS objc_get_class
#endif #endif
extern "C" { #include <stdlib.h>
extern void abort(void); #include <string.h>
extern int strcmp(const char *s1, const char *s2);
}
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
@class Int1, Int2; @class Int1, Int2;
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
/* { dg-options "-fgnu-runtime" } */ /* { dg-options "-fgnu-runtime" } */
#include <objc/Object.h> #include <objc/Object.h>
#include <stdlib.h>
@interface FooBar: Object @interface FooBar: Object
- (void)boo; - (void)boo;
@end @end
int called = 0; int called = 0;
extern "C" void abort ();
@implementation FooBar @implementation FooBar
- (void)boo - (void)boo
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
/* { dg-do run } */ /* { dg-do run } */
#include <objc/Object.h> #include <objc/Object.h>
#include <stdlib.h>
extern "C" void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
@interface Int1: Object @interface Int1: Object
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
/* { dg-do run } */ /* { dg-do run } */
#include <objc/Object.h> #include <objc/Object.h>
extern "C" void abort(void); #include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
static double d = 4.5920234e2; static double d = 4.5920234e2;
......
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
#define OBJC_GETCLASS objc_get_class #define OBJC_GETCLASS objc_get_class
#endif #endif
extern "C" { #include <stdlib.h>
extern void abort(void); #include <string.h>
extern int strcmp(const char *, const char *);
}
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
@protocol Proto @protocol Proto
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
#include <objc/Object.h> #include <objc/Object.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
/* The following is not required in actual user code; we include it /* The following is not required in actual user code; we include it
here to check that the compiler generates an internal definition of here to check that the compiler generates an internal definition of
_setjmp that is consistent with what <setjmp.h> provides. */ _setjmp that is consistent with what <setjmp.h> provides. */
#include <setjmp.h> #include <setjmp.h>
extern "C" void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort() #define CHECK_IF(expr) if(!(expr)) abort()
@interface Frob: Object @interface Frob: Object
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment