On Tue, 23 Oct 2001, Simon Cozens wrote: > On Tue, Oct 23, 2001 at 02:39:37PM +0100, Alex Gough wrote: > > Parrot_base_vtables[enum_class_int] = (struct _vtable) { > > This construct is a little dodgy, but I couldn't think of > a better way to do it. Alex, could you try manually hacking > it to use a temporary variable, like this:
This makes it happy again. Alex ############## Index: genclass.pl =================================================================== RCS file: /home/perlcvs/parrot/classes/genclass.pl,v retrieving revision 1.1 diff -u -r1.1 genclass.pl --- genclass.pl 2001/10/21 16:47:11 1.1 +++ genclass.pl 2001/10/23 14:03:17 @@ -28,9 +28,10 @@ print "}\n"; } +# I am Jack's contorted attempt at portability print <<EOF; void Parrot_${classname}_init (void) { - Parrot_base_vtables[enum_class_$classname] = (struct _vtable) { + struct _vtable temp_base_vtable = { NULL, enum_class_$classname, 0, /* int_type - change me */ @@ -44,5 +45,6 @@ print "\t\tParrot_${classname}_$_->[1],\n"; } print "\t};\n"; +print "\tParrot_base_vtables[enum_class_$classname] = temp_base_vtable;\n"; print "}\n";