From 606686f71b6ebf5013c875f824fc9cf8f3a54762 Mon Sep 17 00:00:00 2001 From: uweigand Date: Thu, 6 Oct 2005 23:49:31 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105074 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 16 ++++++++++++++++ gcc/testsuite/obj-c++.dg/bitfield-3.mm | 6 ++---- gcc/testsuite/obj-c++.dg/bitfield-4.mm | 7 +++---- gcc/testsuite/obj-c++.dg/const-str-4.mm | 2 +- gcc/testsuite/obj-c++.dg/encode-4.mm | 7 +++---- gcc/testsuite/obj-c++.dg/encode-5.mm | 7 +++---- gcc/testsuite/obj-c++.dg/encode-6.mm | 7 +++---- gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm | 2 +- gcc/testsuite/obj-c++.dg/method-10.mm | 2 +- gcc/testsuite/obj-c++.dg/method-17.mm | 3 ++- gcc/testsuite/obj-c++.dg/method-19.mm | 7 +++---- gcc/testsuite/obj-c++.dg/try-catch-2.mm | 2 +- 12 files changed, 39 insertions(+), 29 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f362685bbe7..44e8a7a5436 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2005-10-07 Ulrich Weigand + + 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 PR 24236 diff --git a/gcc/testsuite/obj-c++.dg/bitfield-3.mm b/gcc/testsuite/obj-c++.dg/bitfield-3.mm index d607a3efc9d..1ad10f64286 100644 --- a/gcc/testsuite/obj-c++.dg/bitfield-3.mm +++ b/gcc/testsuite/obj-c++.dg/bitfield-3.mm @@ -6,10 +6,8 @@ typedef struct objc_object { struct objc_class *class_pointer; } *id; -extern "C" { - extern void abort(void); - extern int strcmp(const char *, const char *); -} +#include +#include #define CHECK_IF(expr) if(!(expr)) abort(); diff --git a/gcc/testsuite/obj-c++.dg/bitfield-4.mm b/gcc/testsuite/obj-c++.dg/bitfield-4.mm index 4aa2a8b39df..d7617bf106c 100644 --- a/gcc/testsuite/obj-c++.dg/bitfield-4.mm +++ b/gcc/testsuite/obj-c++.dg/bitfield-4.mm @@ -6,10 +6,9 @@ #include -extern "C" { - extern void abort(void); - extern int strcmp(const char *str1, const char *str2); -} +#include +#include + #define CHECK_IF(expr) if(!(expr)) abort() enum Enum { one, two, three, four }; diff --git a/gcc/testsuite/obj-c++.dg/const-str-4.mm b/gcc/testsuite/obj-c++.dg/const-str-4.mm index df53c238a58..9ea257d80e9 100644 --- a/gcc/testsuite/obj-c++.dg/const-str-4.mm +++ b/gcc/testsuite/obj-c++.dg/const-str-4.mm @@ -3,7 +3,7 @@ /* { dg-options "-fnext-runtime -fconstant-string-class=MyString -lobjc" } */ /* { dg-do run { target *-*-darwin* } } */ -extern "C" void abort(void); +#include @interface MyString { diff --git a/gcc/testsuite/obj-c++.dg/encode-4.mm b/gcc/testsuite/obj-c++.dg/encode-4.mm index 25c0b509f8d..66745f01f08 100644 --- a/gcc/testsuite/obj-c++.dg/encode-4.mm +++ b/gcc/testsuite/obj-c++.dg/encode-4.mm @@ -31,10 +31,9 @@ #define CLASS_GETINSTANCEMETHOD class_get_instance_method #endif -extern "C" { - extern int sscanf(const char *str, const char *format, ...); - extern void abort(void); -} +#include +#include + #define CHECK_IF(expr) if(!(expr)) abort() @interface Foo: Object diff --git a/gcc/testsuite/obj-c++.dg/encode-5.mm b/gcc/testsuite/obj-c++.dg/encode-5.mm index 9a36326a355..748df7c634e 100644 --- a/gcc/testsuite/obj-c++.dg/encode-5.mm +++ b/gcc/testsuite/obj-c++.dg/encode-5.mm @@ -13,10 +13,9 @@ #include #endif -extern "C" { - extern int sscanf(const char *str, const char *format, ...); - extern void abort(void); -} +#include +#include + #define CHECK_IF(expr) if(!(expr)) abort() enum Enum { diff --git a/gcc/testsuite/obj-c++.dg/encode-6.mm b/gcc/testsuite/obj-c++.dg/encode-6.mm index 1ee11714def..5b85c3d5590 100644 --- a/gcc/testsuite/obj-c++.dg/encode-6.mm +++ b/gcc/testsuite/obj-c++.dg/encode-6.mm @@ -12,10 +12,9 @@ #define OBJC_GETCLASS objc_get_class #endif -extern "C" { - extern void abort(void); - extern int strcmp(const char *s1, const char *s2); -} +#include +#include + #define CHECK_IF(expr) if(!(expr)) abort() @class Int1, Int2; diff --git a/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm b/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm index 5a086ea2ae5..d9c62d9de2d 100644 --- a/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm +++ b/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm @@ -5,13 +5,13 @@ /* { dg-options "-fgnu-runtime" } */ #include +#include @interface FooBar: Object - (void)boo; @end int called = 0; -extern "C" void abort (); @implementation FooBar - (void)boo diff --git a/gcc/testsuite/obj-c++.dg/method-10.mm b/gcc/testsuite/obj-c++.dg/method-10.mm index 4c7ccb8b8a7..01a568ba857 100644 --- a/gcc/testsuite/obj-c++.dg/method-10.mm +++ b/gcc/testsuite/obj-c++.dg/method-10.mm @@ -4,8 +4,8 @@ /* { dg-do run } */ #include +#include -extern "C" void abort(void); #define CHECK_IF(expr) if(!(expr)) abort() @interface Int1: Object diff --git a/gcc/testsuite/obj-c++.dg/method-17.mm b/gcc/testsuite/obj-c++.dg/method-17.mm index 556830f3449..a7f27f86459 100644 --- a/gcc/testsuite/obj-c++.dg/method-17.mm +++ b/gcc/testsuite/obj-c++.dg/method-17.mm @@ -5,7 +5,8 @@ /* { dg-do run } */ #include -extern "C" void abort(void); +#include + #define CHECK_IF(expr) if(!(expr)) abort() static double d = 4.5920234e2; diff --git a/gcc/testsuite/obj-c++.dg/method-19.mm b/gcc/testsuite/obj-c++.dg/method-19.mm index 55890f5b404..e7a2b44fd7a 100644 --- a/gcc/testsuite/obj-c++.dg/method-19.mm +++ b/gcc/testsuite/obj-c++.dg/method-19.mm @@ -14,10 +14,9 @@ #define OBJC_GETCLASS objc_get_class #endif -extern "C" { - extern void abort(void); - extern int strcmp(const char *, const char *); -} +#include +#include + #define CHECK_IF(expr) if(!(expr)) abort() @protocol Proto diff --git a/gcc/testsuite/obj-c++.dg/try-catch-2.mm b/gcc/testsuite/obj-c++.dg/try-catch-2.mm index 77ef1535adc..9352260ab26 100644 --- a/gcc/testsuite/obj-c++.dg/try-catch-2.mm +++ b/gcc/testsuite/obj-c++.dg/try-catch-2.mm @@ -7,13 +7,13 @@ #include #include +#include /* The following is not required in actual user code; we include it here to check that the compiler generates an internal definition of _setjmp that is consistent with what provides. */ #include -extern "C" void abort(void); #define CHECK_IF(expr) if(!(expr)) abort() @interface Frob: Object -- 2.11.4.GIT