From 79c191c0a2ed69822898475c3649021b05f15096 Mon Sep 17 00:00:00 2001
From: mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 26 May 2005 01:53:56 +0000
Subject:         * objc/execute/next_mapping.h: Update for C++.

        * obj-c++.dg/selector-1.mm: Move to...
        * obj-c++.dg/selector-4.mm: here...

        * obj-c++.dg/comp-types-1.mm: New.
        * obj-c++.dg/cxx-class-1.mm: New.
        * obj-c++.dg/cxx-ivars-1.mm: New.
        * obj-c++.dg/cxx-ivars-2.mm: New.
        * obj-c++.dg/cxx-ivars-3.mm: New.
        * obj-c++.dg/cxx-scope-1.mm: New.
        * obj-c++.dg/cxx-scope-2.mm: New.
        * obj-c++.dg/defs.mm: New.
        * obj-c++.dg/empty-private-1.mm: New.
        * obj-c++.dg/encode-1.mm: New.
        * obj-c++.dg/encode-2.mm: New.
        * obj-c++.dg/encode-3.mm: New.
        * obj-c++.dg/extern-c-1.mm: New.
        * obj-c++.dg/extra-semi.mm: New.
        * obj-c++.dg/fix-and-continue-2.mm: New.
        * obj-c++.dg/isa-field-1.mm: New.
        * obj-c++.dg/ivar-list-semi.mm: New.
        * obj-c++.dg/local-decl-1.mm: New.
        * obj-c++.dg/lookup-1.mm: New.
        * obj-c++.dg/lookup-2.mm: New.
        * obj-c++.dg/method-1.mm: New.
        * obj-c++.dg/method-2.mm: New.
        * obj-c++.dg/method-3.mm: New.
        * obj-c++.dg/method-4.mm: New.
        * obj-c++.dg/method-5.mm: New.
        * obj-c++.dg/method-6.mm: New.
        * obj-c++.dg/method-7.mm: New.
        * obj-c++.dg/no-extra-load.mm: New.
        * obj-c++.dg/overload-1.mm: New.
        * obj-c++.dg/pragma-1.mm: New.
        * obj-c++.dg/pragma-2.mm: New.
        * obj-c++.dg/private-1.mm: New.
        * obj-c++.dg/private-2.mm: New.
        * obj-c++.dg/proto-qual-1.mm: New.
        * obj-c++.dg/qual-types-1.mm: New.
        * obj-c++.dg/stubify-1.mm: New.
        * obj-c++.dg/stubify-2.mm: New.
        * obj-c++.dg/super-class-1.mm: New.
        * obj-c++.dg/super-class-2.mm: New.
        * obj-c++.dg/super-dealloc-1.mm: New.
        * obj-c++.dg/super-dealloc-2.mm: New.
        * obj-c++.dg/template-1.mm: New.
        * obj-c++.dg/template-2.mm: New.
        * obj-c++.dg/template-3.mm: New.
        * obj-c++.dg/template-4.mm: New.
        * obj-c++.dg/template-5.mm: New.
        * obj-c++.dg/template-6.mm: New.
        * obj-c++.dg/try-catch-1.mm: New.
        * obj-c++.dg/try-catch-2.mm: New.
        * obj-c++.dg/try-catch-3.mm: New.
        * obj-c++.dg/try-catch-4.mm: New.
        * obj-c++.dg/try-catch-5.mm: New.
        * obj-c++.dg/try-catch-6.mm: New.
        * obj-c++.dg/try-catch-7.mm: New.
        * obj-c++.dg/try-catch-8.mm: New.
        * obj-c++.dg/try-catch-9.mm: New.
        * obj-c++.dg/va-meth-1.mm: New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100181 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/objc/execute/next_mapping.h | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

(limited to 'gcc/testsuite/objc')

diff --git a/gcc/testsuite/objc/execute/next_mapping.h b/gcc/testsuite/objc/execute/next_mapping.h
index 0a361896e12..41d40fdf0dc 100644
--- a/gcc/testsuite/objc/execute/next_mapping.h
+++ b/gcc/testsuite/objc/execute/next_mapping.h
@@ -8,6 +8,8 @@
 #include <objc/objc-class.h>
 #include <objc/Object.h>
 #include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
 
 #define objc_get_class(C)			objc_getClass(C)
 #define objc_get_meta_class(C)			objc_getMetaClass(C)
@@ -45,22 +47,28 @@
 /* The following is necessary to "cover" the bf*.m test cases on NeXT.  */
 
 #undef  MAX
+#undef  MIN
+#undef  ROUND
+
+#ifdef __cplusplus
+#define MAX(X, Y) ((X > Y) ? X : Y)
+#define MIN(X, Y) ((X < Y) ? X : Y)
+#define ROUND(V, A) (A * ((V + A - 1) / A))
+#else
 #define MAX(X, Y)                    \
   ({ typeof (X) __x = (X), __y = (Y); \
      (__x > __y ? __x : __y); })
-
-#undef  MIN
 #define MIN(X, Y)                    \
   ({ typeof (X) __x = (X), __y = (Y); \
      (__x < __y ? __x : __y); })
-  
-#undef  ROUND
 #define ROUND(V, A) \
   ({ typeof (V) __v = (V); typeof (A) __a = (A); \
      __a * ((__v+__a - 1)/__a); })
+#endif
 
 #define BITS_PER_UNIT __CHAR_BIT__
-#define STRUCTURE_SIZE_BOUNDARY (BITS_PER_UNIT * sizeof (struct{char a;}))
+typedef struct{ char a; } __small_struct;
+#define STRUCTURE_SIZE_BOUNDARY (BITS_PER_UNIT * sizeof (__small_struct))
 
 /* Not sure why the following are missing from NeXT objc headers... */
 
@@ -104,7 +112,7 @@ struct objc_struct_layout
   unsigned int record_align;
 };
 
-typedef union {
+typedef union arglist {
   char *arg_ptr;
   char arg_regs[sizeof (char*)];
 } *arglist_t;                   /* argument frame */
@@ -117,6 +125,7 @@ void objc_layout_structure (const char *type,
 BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout);
 void objc_layout_finish_structure (struct objc_struct_layout *layout,
     unsigned int *size, unsigned int *align);
+int objc_aligned_size (const char *type);
 
 /*
   return the size of an object specified by type
@@ -193,10 +202,6 @@ objc_sizeof_type (const char *type)
     return sizeof (double);
     break;
 
-  case _C_VOID:
-    return sizeof (void);
-    break;
-
   case _C_PTR:
   case _C_ATOM:
   case _C_CHARPTR:
-- 
cgit v1.2.1