# New Ticket Created by  Steve Peters 
# Please include the string:  [perl #42359]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42359 >


The attached patch includes several cleanups needed to silence warnings
when compiling Parrot with Intel C++.

The cleanups fall mainly into two catagories.

1) Changing strstart in STRING from a void * to a char *.  This also includes
some fixes where the pointer is treated as an unsigned char *.

2) Enum values should be treated as ints, not as the enum type.  So, there are
multiple variable and parameter redeclarations from an enumerated type to
an int.

Steve Peters
[EMAIL PROTECTED]
Index: src/embed.c
===================================================================
--- src/embed.c (revision 18040)
+++ src/embed.c (working copy)
@@ -97,7 +97,7 @@
 
 /*
 
-=item C<void Parrot_set_flag(Interp *interp, Parrot_Interp_flag flag)>
+=item C<void Parrot_set_flag(Interp *interp, int flag)>
 
 Sets a flag in the interpreter specified by C<flag>, any of
 C<PARROT_BOUNDS_FLAG>, or C<PARROT_PROFILE_FLAG> to enable profiling, and
@@ -119,7 +119,7 @@
 */
 
 void
-Parrot_set_flag(Interp *interp, Parrot_Interp_flag flag)
+Parrot_set_flag(Interp *interp, int flag)
 {
     /* These two macros (from interpreter.h) do exactly what they look like. */
 
@@ -150,7 +150,7 @@
 
 /*
 
-=item C<void Parrot_clear_flag(Interp *, Parrot_Interp_flag flag)>
+=item C<void Parrot_clear_flag(Interp *, int flag)>
 
 =item C<void Parrot_clear_debug(Interp *, UINTVAL flag)>
 
@@ -163,7 +163,7 @@
 */
 
 void
-Parrot_clear_flag(Parrot_Interp interp, Parrot_Interp_flag flag)
+Parrot_clear_flag(Parrot_Interp interp, int flag)
 {
     Interp_flags_CLEAR(interp, flag);
 }
@@ -183,7 +183,7 @@
 /*
 
 =item C<Parrot_Int
-Parrot_test_flag(Interp*, Parrot_Interp_flag flag)>
+Parrot_test_flag(Interp*, int flag)>
 
 =item C<UINTVAL
 Parrot_test_debug(Interp*, UINTVAL flag)>
@@ -198,7 +198,7 @@
 */
 
 Parrot_Int
-Parrot_test_flag(Interp* interp, Parrot_Interp_flag flag)
+Parrot_test_flag(Interp* interp, int flag)
 {
     return Interp_flags_TEST(interp, flag);
 }
Index: src/ops/io.ops
===================================================================
--- src/ops/io.ops      (revision 18040)
+++ src/ops/io.ops      (working copy)
@@ -509,7 +509,7 @@
   if ($3) {
     PIOOFF_T pos;
     pos = PIO_tell(interp, $3);
-    $1 = (INTVAL)(pos >> 32);
+    $1 = (INTVAL)(pos >> 31);
     $2 = (INTVAL)(pos & 0xffffffff);
   }
   goto NEXT();
Index: src/events.c
===================================================================
--- src/events.c        (revision 18040)
+++ src/events.c        (working copy)
@@ -107,7 +107,7 @@
  * a structure to communicate with the io_thread
  */
 typedef struct {
-    io_thread_msg_type command;
+    int command;
     parrot_event *ev;
 } io_thread_msg;
 
Index: src/string.c
===================================================================
--- src/string.c        (revision 18040)
+++ src/string.c        (working copy)
@@ -974,7 +974,7 @@
         dest->encoding = src->encoding;
         dest->charset = src->charset;
 
-        dest->strstart = (char *)src->strstart + true_offset ;
+        dest->strstart = src->strstart + true_offset ;
         dest->bufused = true_length;
 
         dest->strlen = true_length;
@@ -2011,7 +2011,7 @@
     STRING *result, *hex;
     UINTVAL i, len, charlen;
     String_iter iter;
-    unsigned char *dp;
+    char *dp;
 
     if (!src)
         return NULL;
@@ -2359,7 +2359,7 @@
 */
 
 INTVAL
-Parrot_string_is_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+Parrot_string_is_cclass(Interp *interp, int flags,
                         STRING *s, UINTVAL offset)
 {
     if (!string_length(interp, s))
@@ -2368,7 +2368,7 @@
 }
 
 INTVAL
-Parrot_string_find_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+Parrot_string_find_cclass(Interp *interp, int flags,
                           STRING *s, UINTVAL offset, UINTVAL count)
 {
     if (!s)
@@ -2377,7 +2377,7 @@
 }
 
 INTVAL
-Parrot_string_find_not_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+Parrot_string_find_not_cclass(Interp *interp, int flags,
                               STRING *s, UINTVAL offset, UINTVAL count)
 {
     if (!s)
Index: src/charset/tables.h
===================================================================
--- src/charset/tables.h        (revision 18040)
+++ src/charset/tables.h        (working copy)
@@ -20,8 +20,8 @@
 #define WORDCHAR    enum_cclass_word
 #define PUNCTUATION enum_cclass_punctuation
 #define DIGIT       enum_cclass_numeric
-extern const PARROT_CCLASS_FLAGS Parrot_ascii_typetable[256];
-extern const PARROT_CCLASS_FLAGS Parrot_iso_8859_1_typetable[256];
+extern const int Parrot_ascii_typetable[256];
+extern const int Parrot_iso_8859_1_typetable[256];
 #endif /* PARROT_CHARSET_TABLES_H_GUARD */
 
 /*
Index: src/charset/iso-8859-1.c
===================================================================
--- src/charset/iso-8859-1.c    (revision 18040)
+++ src/charset/iso-8859-1.c    (working copy)
@@ -134,7 +134,7 @@
 static void
 upcase(Interp *interp, STRING *source_string)
 {
-    unsigned char *buffer;
+    char *buffer;
     UINTVAL offset = 0;
 
     if (!source_string->strlen) {
@@ -157,7 +157,7 @@
 downcase(Interp *interp, STRING *source_string)
 {
     UINTVAL offset = 0;
-    unsigned char *buffer;
+    char *buffer;
     if (!source_string->strlen) {
         return;
     }
@@ -176,7 +176,7 @@
 static void
 titlecase(Interp *interp, STRING *source_string)
 {
-    unsigned char *buffer;
+    char *buffer;
     unsigned int c;
     UINTVAL offset;
 
@@ -205,7 +205,7 @@
 static void
 upcase_first(Interp *interp, STRING *source_string)
 {
-    unsigned char *buffer;
+    char *buffer;
     unsigned int c;
 
     if (!source_string->strlen) {
@@ -224,7 +224,7 @@
 static void
 downcase_first(Interp *interp, STRING *source_string)
 {
-    unsigned char *buffer;
+    char *buffer;
     unsigned int c;
 
     if (!source_string->strlen) {
@@ -262,7 +262,7 @@
 }
 
 static INTVAL
-is_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+is_cclass(Interp *interp, int flags,
           STRING *source_string, UINTVAL offset)
 {
     UINTVAL codepoint;
@@ -278,7 +278,7 @@
 }
 
 static INTVAL
-find_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_cclass(Interp *interp, int flags,
             STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     UINTVAL pos = offset;
@@ -297,7 +297,7 @@
 }
 
 static INTVAL
-find_not_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_not_cclass(Interp *interp, int flags,
                 STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     UINTVAL pos = offset;
Index: src/charset/binary.c
===================================================================
--- src/charset/binary.c        (revision 18040)
+++ src/charset/binary.c        (working copy)
@@ -125,21 +125,21 @@
 }
 
 static INTVAL
-is_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+is_cclass(Interp *interp, int flags,
           STRING *source_string, UINTVAL offset)
 {
     return 0;
 }
 
 static INTVAL
-find_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_cclass(Interp *interp, int flags,
             STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     return offset + count;
 }
 
 static INTVAL
-find_not_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_not_cclass(Interp *interp, int flags,
                 STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     return offset + count;
Index: src/charset/unicode.c
===================================================================
--- src/charset/unicode.c       (revision 18040)
+++ src/charset/unicode.c       (working copy)
@@ -362,7 +362,7 @@
 }
 
 static int
-u_iscclass(Interp *interp, UINTVAL codepoint, PARROT_CCLASS_FLAGS flags)
+u_iscclass(Interp *interp, UINTVAL codepoint, int flags)
 {
 #if PARROT_HAS_ICU
             /* XXX which one
@@ -429,7 +429,7 @@
 }
 
 static INTVAL
-is_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+is_cclass(Interp *interp, int flags,
           STRING *source_string, UINTVAL offset)
 {
     UINTVAL codepoint;
@@ -444,7 +444,7 @@
 }
 
 static INTVAL
-find_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_cclass(Interp *interp, int flags,
             STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     UINTVAL pos = offset;
@@ -469,7 +469,7 @@
 }
 
 static INTVAL
-find_not_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_not_cclass(Interp *interp, int flags,
                 STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     UINTVAL pos = offset;
Index: src/charset/ascii.c
===================================================================
--- src/charset/ascii.c (revision 18040)
+++ src/charset/ascii.c (working copy)
@@ -85,7 +85,7 @@
 {
     String_iter iter;
     UINTVAL c, len, offs;
-    unsigned char *p;
+    char *p;
 
     len = src->strlen;
     if (dest) {
@@ -355,7 +355,7 @@
 }
 
 static INTVAL
-is_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+is_cclass(Interp *interp, int flags,
         STRING *source_string, UINTVAL offset)
 {
     UINTVAL codepoint;
@@ -372,7 +372,7 @@
 }
 
 static INTVAL
-find_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_cclass(Interp *interp, int flags,
             STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     UINTVAL pos = offset;
@@ -391,7 +391,7 @@
 }
 
 static INTVAL
-find_not_cclass(Interp *interp, PARROT_CCLASS_FLAGS flags,
+find_not_cclass(Interp *interp, int flags,
                 STRING *source_string, UINTVAL offset, UINTVAL count)
 {
     UINTVAL pos = offset;
Index: src/charset/tables.c
===================================================================
--- src/charset/tables.c        (revision 18040)
+++ src/charset/tables.c        (working copy)
@@ -14,7 +14,7 @@
  */
 
 #include "tables.h"
-const PARROT_CCLASS_FLAGS Parrot_ascii_typetable[256] = {
+const int Parrot_ascii_typetable[256] = {
 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 0-7 */
 0x0200, 0x0320, 0x1220, 0x0220, 0x1220, 0x1220, 0x0200, 0x0200, /* 8-15 */
 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 16-23 */
@@ -48,7 +48,7 @@
 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 240-247 */
 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 248-255 */
 };
-const PARROT_CCLASS_FLAGS Parrot_iso_8859_1_typetable[256] = {
+const int Parrot_iso_8859_1_typetable[256] = {
 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 0-7 */
 0x0200, 0x0320, 0x1220, 0x0220, 0x1220, 0x1220, 0x0200, 0x0200, /* 8-15 */
 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 16-23 */
Index: src/pmc/string.pmc
===================================================================
--- src/pmc/string.pmc  (revision 18040)
+++ src/pmc/string.pmc  (working copy)
@@ -836,7 +836,7 @@
 
     METHOD void trans(STRING* src, PMC* table) {
         INTVAL i, len;
-        unsigned char *p, ch;
+        char *p, ch;
         INTVAL *tr_data;
 
         len = string_length(interp, src);
@@ -868,7 +868,7 @@
 
     METHOD void reverse(STRING* src) {
         INTVAL i, len;
-        unsigned char *p, ch;
+        char *p, ch;
 
         len = string_length(interp, src);
         if (!len)
@@ -898,7 +898,7 @@
 
     METHOD INTVAL is_integer(STRING* src) {
         INTVAL i, len;
-        unsigned char *p;
+        char *p;
 
         len = string_length(interp, src);
         if (!len)
Index: src/pmc/parrotinterpreter.pmc
===================================================================
--- src/pmc/parrotinterpreter.pmc       (revision 18040)
+++ src/pmc/parrotinterpreter.pmc       (working copy)
@@ -43,7 +43,7 @@
 */
 
 void
-clone_interpreter(Parrot_Interp d, Parrot_Interp s, Parrot_clone_flags flags)
+clone_interpreter(Parrot_Interp d, Parrot_Interp s, int flags)
 {
     /* we block DOD runs while cloning since C<d> is not yet running */
     Parrot_block_DOD(d);
@@ -138,7 +138,7 @@
 static void
 create_interp(PMC *self, Parrot_Interp parent)
 {
-    Interp_flags flag  = 0;
+    int flag  = 0;
     Parrot_Interp new_interp;
 
     if (self->vtable->base_type == enum_class_ParrotThread)
Index: src/pmc/default.pmc
===================================================================
--- src/pmc/default.pmc (revision 18040)
+++ src/pmc/default.pmc (working copy)
@@ -952,7 +952,7 @@
              b = parrot_hash_get_bucket(INTERP, (Hash*) PMC_metadata(SELF),
                                         name);
              if (b)
-                 p = b->value;
+                 p = (PMC *)b->value;
         }
         if (PMC_IS_NULL(p)) {
             /* may be NCI? */
Index: src/pmc/key.pmc
===================================================================
--- src/pmc/key.pmc     (revision 18040)
+++ src/pmc/key.pmc     (working copy)
@@ -435,7 +435,7 @@
     void thawfinish(visit_info *info) {
         PMC *key = SELF, *next;
         while (1) {
-            next = PMC_data(key);
+            next = (PMC *)PMC_data(key);
             if (PMC_IS_NULL(next)) {
                 PMC_data(key) = NULL;
                 break;
Index: src/inter_create.c
===================================================================
--- src/inter_create.c  (revision 18040)
+++ src/inter_create.c  (working copy)
@@ -89,7 +89,7 @@
 void Parrot_really_destroy(Interp *, int exit_code, void *);
 
 Parrot_Interp
-make_interpreter(Parrot_Interp parent, Interp_flags flags)
+make_interpreter(Parrot_Interp parent, int flags)
 {
     Interp *interp;
 #if EXEC_CAPABLE
@@ -102,7 +102,7 @@
         interp = &interpre;
     else
 #endif
-        interp = mem_sys_allocate_zeroed(sizeof (Interp));
+        interp = mem_allocate_zeroed_typed(Interp);
 
     /*
      * the last interpreter (w/o) parent has to cleanup globals
Index: src/packfile.c
===================================================================
--- src/packfile.c      (revision 18040)
+++ src/packfile.c      (working copy)
@@ -2839,7 +2839,7 @@
 
 void
 PackFile_FixupTable_new_entry(Interp *interp,
-        char *label, enum_fixup_t type, opcode_t offs)
+        char *label, int type, opcode_t offs)
 {
     struct PackFile_FixupTable *self = interp->code->fixups;
     opcode_t i;
@@ -2943,7 +2943,7 @@
 */
 
 struct PackFile_FixupEntry *
-PackFile_find_fixup_entry(Interp *interp, enum_fixup_t type,
+PackFile_find_fixup_entry(Interp *interp, int type,
         char * name)
 {
     /* TODO make a hash of all fixups */
Index: src/exceptions.c
===================================================================
--- src/exceptions.c    (revision 18040)
+++ src/exceptions.c    (working copy)
@@ -646,8 +646,7 @@
 
 */
 void
-do_exception(Interp *interp,
-        exception_severity severity, long error)
+do_exception(Interp *interp, int severity, long error)
 {
     Parrot_exception * const the_exception = interp->exceptions;
 
Index: src/io/io_buf.c
===================================================================
--- src/io/io_buf.c     (revision 18040)
+++ src/io/io_buf.c     (working copy)
@@ -384,7 +384,7 @@
 {
     ParrotIOLayer *l = layer;
     ParrotIOBuf *b;
-    unsigned char *out_buf;
+    char *out_buf;
     STRING *s;
     size_t len;
     size_t current = 0;
@@ -538,8 +538,8 @@
                  STRING **buf)
 {
     size_t l;
-    unsigned char *out_buf;
-    unsigned char *buf_start;
+    char *out_buf;
+    char *buf_start;
     ParrotIOBuf * const b = &io->b;
     size_t len;
     STRING *s;
@@ -578,7 +578,7 @@
                     Parrot_allocate_string(interp, s, l);
                 }
             }
-            out_buf = (unsigned char*)s->strstart + s->strlen;
+            out_buf = s->strstart + s->strlen;
             memcpy(out_buf, buf_start, len);
             s->strlen = s->bufused = l;
             if (PIO_buf_fill_readbuf(interp, layer, io, b) == 0)
@@ -594,7 +594,7 @@
             Parrot_allocate_string(interp, s, l);
         }
     }
-    out_buf = (unsigned char*)s->strstart + s->strlen;
+    out_buf = s->strstart + s->strlen;
     len = b->next - buf_start;
     memcpy(out_buf, buf_start, len);
     s->strlen = s->bufused = l;
Index: src/io/io_private.h
===================================================================
--- src/io/io_private.h (revision 18040)
+++ src/io/io_private.h (working copy)
@@ -97,9 +97,9 @@
 struct _ParrotIOBuf {
     INTVAL flags;               /* Buffer specific flags        */
     size_t size;
-    unsigned char *startb;      /* Start of buffer              */
-    unsigned char *endb;        /* End of buffer                */
-    unsigned char *next;        /* Current read/write pointer   */
+    char *startb;               /* Start of buffer              */
+    char *endb;                 /* End of buffer                */
+    char *next;                 /* Current read/write pointer   */
 };
 
 struct _ParrotIO {
Index: src/io/io.c
===================================================================
--- src/io/io.c (revision 18040)
+++ src/io/io.c (working copy)
@@ -1283,7 +1283,7 @@
 PIOOFF_T
 PIO_make_offset32(INTVAL hi, INTVAL lo)
 {
-    return ((PIOOFF_T)hi << 32) | lo;
+    return ((PIOOFF_T)hi << 31) | lo;
 }
 
 /*
Index: src/jit.c
===================================================================
--- src/jit.c   (revision 18040)
+++ src/jit.c   (working copy)
@@ -1351,7 +1351,7 @@
 Parrot_jit_info_t *
 parrot_build_asm(Interp *interp,
           opcode_t *code_start, opcode_t *code_end,
-          void *objfile, enum_jit_code_type jit_type)
+          void *objfile, int jit_type)
 {
     UINTVAL i;
     char *new_arena;
Index: src/jit.h
===================================================================
--- src/jit.h   (revision 18040)
+++ src/jit.h   (working copy)
@@ -195,7 +195,7 @@
     Parrot_jit_arena_t               arena;
     Parrot_jit_optimizer_t          *optimizer;
     Parrot_jit_constant_pool_t      *constant_pool;
-    enum_jit_code_type              code_type;
+    int                              code_type;
     int                             flags;
     const struct jit_arch_info_t    *arch_info;
     int                              n_args;
@@ -314,7 +314,7 @@
 Parrot_jit_info_t *
 parrot_build_asm(Interp *interp,
                 opcode_t *code_start, opcode_t *code_end,
-                void *objfile, enum_jit_code_type);
+                void *objfile, int);
 /*
  * NCI interface
  */
Index: include/parrot/misc.h
===================================================================
--- include/parrot/misc.h       (revision 18040)
+++ include/parrot/misc.h       (working copy)
@@ -141,9 +141,9 @@
     typedef struct spfinfo_t {
         UINTVAL width;
         UINTVAL prec;
-        FLAG flags;
-        TYPE type;
-        PHASE phase;
+        int flags;
+        int type;
+        int phase;
     } *SpfInfo;
 
     /* SPRINTF ARGUMENT OBJECT */
Index: include/parrot/embed.h
===================================================================
--- include/parrot/embed.h      (revision 18040)
+++ include/parrot/embed.h      (working copy)
@@ -28,9 +28,9 @@
 PARROT_API void Parrot_init(Parrot_Interp);
 PARROT_API void Parrot_init_stacktop(Parrot_Interp, void *);
 
-PARROT_API void Parrot_set_flag(Parrot_Interp, Parrot_Interp_flag);
-PARROT_API void Parrot_clear_flag(Parrot_Interp, Parrot_Interp_flag);
-PARROT_API Parrot_Int Parrot_test_flag(Parrot_Interp, Parrot_Interp_flag);
+PARROT_API void Parrot_set_flag(Parrot_Interp, int);
+PARROT_API void Parrot_clear_flag(Parrot_Interp, int);
+PARROT_API Parrot_Int Parrot_test_flag(Parrot_Interp, int);
 
 PARROT_API void Parrot_set_trace(Parrot_Interp, Parrot_UInt);
 PARROT_API void Parrot_clear_trace(Parrot_Interp, Parrot_UInt);
Index: include/parrot/charset.h
===================================================================
--- include/parrot/charset.h    (revision 18040)
+++ include/parrot/charset.h    (working copy)
@@ -53,9 +53,9 @@
 typedef INTVAL (*charset_index_t)(Interp *, STRING *source_string, STRING 
*search_string, UINTVAL offset);
 typedef INTVAL (*charset_rindex_t)(Interp *, STRING *source_string, STRING 
*search_string, UINTVAL offset);
 typedef UINTVAL (*charset_validate_t)(Interp *, STRING *source_string);
-typedef INTVAL (*charset_is_cclass_t)(Interp *, PARROT_CCLASS_FLAGS, STRING 
*source_string, UINTVAL offset);
-typedef INTVAL (*charset_find_cclass_t)(Interp *, PARROT_CCLASS_FLAGS, STRING 
*source_string, UINTVAL offset, UINTVAL count);
-typedef INTVAL (*charset_find_not_cclass_t)(Interp *, PARROT_CCLASS_FLAGS, 
STRING *source_string, UINTVAL offset, UINTVAL count);
+typedef INTVAL (*charset_is_cclass_t)(Interp *, int, STRING *source_string, 
UINTVAL offset);
+typedef INTVAL (*charset_find_cclass_t)(Interp *, int, STRING *source_string, 
UINTVAL offset, UINTVAL count);
+typedef INTVAL (*charset_find_not_cclass_t)(Interp *, int, STRING 
*source_string, UINTVAL offset, UINTVAL count);
 typedef INTVAL (*charset_is_wordchar_t)(Interp *, STRING *source_string, 
UINTVAL offset);
 typedef INTVAL (*charset_find_wordchar_t)(Interp *, STRING *source_string, 
UINTVAL offset);
 typedef INTVAL (*charset_find_not_wordchar_t)(Interp *, STRING *source_string, 
UINTVAL offset);
Index: include/parrot/string_funcs.h
===================================================================
--- include/parrot/string_funcs.h       (revision 18040)
+++ include/parrot/string_funcs.h       (working copy)
@@ -112,11 +112,11 @@
 PARROT_API void string_downcase_inplace(Interp *, STRING *);
 PARROT_API void string_titlecase_inplace(Interp *, STRING *);
 
-PARROT_API INTVAL Parrot_string_is_cclass(Interp *, PARROT_CCLASS_FLAGS,
+PARROT_API INTVAL Parrot_string_is_cclass(Interp *, int,
         STRING *, UINTVAL offset);
-PARROT_API INTVAL Parrot_string_find_cclass(Interp *, PARROT_CCLASS_FLAGS,
+PARROT_API INTVAL Parrot_string_find_cclass(Interp *, int,
         STRING *, UINTVAL offset, UINTVAL count);
-PARROT_API INTVAL Parrot_string_find_not_cclass(Interp *, PARROT_CCLASS_FLAGS,
+PARROT_API INTVAL Parrot_string_find_not_cclass(Interp *, int,
         STRING *, UINTVAL offset, UINTVAL count);
 PARROT_API INTVAL Parrot_string_is_whitespace(Interp *, STRING *, INTVAL 
offset);
 PARROT_API INTVAL Parrot_string_is_digit(Interp *, STRING *, INTVAL offset);
Index: include/parrot/pobj.h
===================================================================
--- include/parrot/pobj.h       (revision 18040)
+++ include/parrot/pobj.h       (working copy)
@@ -78,7 +78,7 @@
 struct parrot_string_t {
     pobj_t obj;
     UINTVAL bufused;
-    void *strstart;
+    char *strstart;
     UINTVAL strlen;
     /*    parrot_string_representation_t representation;*/
     void *encoding; /* These should be of type ENCODING * and CHARSET *
Index: include/parrot/interpreter.h
===================================================================
--- include/parrot/interpreter.h        (revision 18040)
+++ include/parrot/interpreter.h        (working copy)
@@ -314,7 +314,7 @@
     int         n_libs;                       /* count of libs below */
     op_lib_t  **all_op_libs;                  /* all loaded opcode libraries */
 
-    Interp_flags flags;                       /* Various interpreter flags that
+    int flags;                       /* Various interpreter flags that
                                                * signal that runops should do
                                                * something */
 
@@ -459,7 +459,7 @@
 
 /* &end_gen */
 
-PARROT_API Interp *make_interpreter(Interp * parent, Interp_flags);
+PARROT_API Interp *make_interpreter(Interp * parent, int);
 PARROT_API void Parrot_init(Interp *);
 PARROT_API void Parrot_destroy(Interp *);
 
@@ -528,7 +528,7 @@
 PARROT_API void dynop_register(Interp *interp, PMC* op_lib);
 void do_prederef(void **pc_prederef, Interp *interp, int type);
 
-void clone_interpreter(Parrot_Interp dest, Parrot_Interp self, 
Parrot_clone_flags flags);
+void clone_interpreter(Parrot_Interp dest, Parrot_Interp self, int flags);
 
 PARROT_API void enter_nci_method(Interp *, const int type,
         void *func, const char *name, const char *proto);
Index: include/parrot/thread.h
===================================================================
--- include/parrot/thread.h     (revision 18040)
+++ include/parrot/thread.h     (working copy)
@@ -85,7 +85,7 @@
  */
 typedef struct _Thread_data {
     Parrot_thread       thread;         /* pthread_t or such */
-    thread_state_enum   state;
+    int   state;
     int                 wants_shared_gc; /* therad is trying to
                                             do a shared GC run */
     UINTVAL             tid;            /* 0.. n-1 idx in interp array */
Index: include/parrot/packfile.h
===================================================================
--- include/parrot/packfile.h   (revision 18040)
+++ include/parrot/packfile.h   (working copy)
@@ -322,10 +322,10 @@
 
 /* create new fixup entry */
 PARROT_API void PackFile_FixupTable_new_entry(Interp *, char *label,
-                enum_fixup_t, opcode_t offs);
+                int, opcode_t offs);
 /* find entry */
 PARROT_API struct PackFile_FixupEntry * PackFile_find_fixup_entry(Interp *,
-        enum_fixup_t type, char *);
+        int type, char *);
 
 /*
 ** PackFile_ByteCode Functions:
Index: include/parrot/pmc_freeze.h
===================================================================
--- include/parrot/pmc_freeze.h (revision 18040)
+++ include/parrot/pmc_freeze.h (working copy)
@@ -76,7 +76,7 @@
     PMC*                id_list;        /* seen list used by thaw */
     UINTVAL             id;             /* freze ID of PMC */
     void*               extra;          /* PMC specific */
-    extra_flags_enum    extra_flags;    /* concerning to extra */
+    int    extra_flags;                 /* concerning to extra */
     PMC*                thaw_result;    /* 1st thawed */
     IMAGE_IO            *image_io;
 } visit_info;
Index: include/parrot/exceptions.h
===================================================================
--- include/parrot/exceptions.h (revision 18040)
+++ include/parrot/exceptions.h (working copy)
@@ -154,7 +154,7 @@
 /* Right now there's nothing special for the jump buffer, but there might be 
one later, so we wrap it in a struct so that we can expand it later */
 struct parrot_exception_t {
     Parrot_jump_buff destination;       /* jmp_buf */
-    exception_severity severity;        /* s. above */
+    int severity;        /* s. above */
     long error;                         /* exception_type_enum */
     STRING *msg;                        /* may be NULL */
     void *resume;                       /* opcode_t* for resume or NULL */
@@ -181,7 +181,7 @@
 /*
  * internal exception handling
  */
-PARROT_API void do_exception(Parrot_Interp, exception_severity severity, long 
error);
+PARROT_API void do_exception(Parrot_Interp, int severity, long error);
 PARROT_API void new_internal_exception(Parrot_Interp);
 PARROT_API void free_internal_exception(Parrot_Interp);
 
Index: config/auto/gcc.pm
===================================================================
--- config/auto/gcc.pm  (revision 18040)
+++ config/auto/gcc.pm  (working copy)
@@ -126,7 +126,7 @@
                 . " -Wformat-nonliteral -Wformat-security -Wpacked"
                 . " -Wdisabled-optimization -mno-accumulate-outgoing-args"
                 . " -Wno-shadow",
-
+            4.1 => "-Wc++-compat",
             # -Wsequence-point is part of -Wall
             # -Wfloat-equal may not be what we want
             # We shouldn't be using __packed__, but I doubt -Wpacked will harm

Reply via email to