Sun's Workshop compiler complains about the use of a non-constant
initializer in the giant vtable initialization in the class_init()
functions generated by classes/pmc2c.pl.  Here's a sample error message:

    "array.c", line 649: non-constant initializer: op "NAME"

Here's a suggested fix:

--- parrot/classes/pmc2c.pl     Tue Sep 30 11:00:19 2003
+++ parrot-andy/classes/pmc2c.pl        Wed Oct  1 13:07:12 2003
@@ -751,7 +751,7 @@

     struct _vtable temp_base_vtable = {
         NULL,  /* package */
-        entry,
+        NULL,   /* base_type -- set to entry below */
         NULL,  /* whoami */
         NULL,  /* method_table */
         $vtbl_flag, /* flags */
@@ -759,6 +759,7 @@
         0, /* extra data */
         $methodlist
         };
+    temp_base_vtable.base_type = entry;

    /* parrotio calls some class_init functions during its class_init
     * code, so some of the slots might already be allocated

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to