On Mon, 28 Apr 2008, Andy Dougherty wrote: > On Sun, 27 Apr 2008, chromatic wrote: > > > Here's another proposed patch for testing on various platforms. I'm trying > > to > > get rid of some dodgy casts (which likely don't help C++ and processors > > with > > stricter alignment than 32-bit x86). I'd also like to remove unnecessary > > members from a few structs. This is the next step. > > > > Are there any weird errors or unexpected crashes on anything more exotic > > than > > 32-bit x86 GNU/Linux? > > > /* Parrot Object - base class for all others */ > > typedef struct pobj_t { > > + Parrot_UInt flags; > > UnionVal u; > > - Parrot_UInt flags; > > } pobj_t; >
> I'll try building, but since there are 4 permutations to try (cc and gcc, > and with and without this patch) and since each build takes 1 to 2 hours > if everything goes well, it won't be until tomorrow at the earliest that > I can report anything back. (Longer, if manual intervention is required > to fix unrelated errors.) For Solaris/SPARC I got no additional errors or test failures with this patch. (the build fails due to unrelated issues in the crypto stuff, but no additional failures show up.) Under gcc, I do get a new warning: src/gc/smallobject.c: In function 'Parrot_small_object_pool_merge': src/gc/smallobject.c:520: warning: cast increases required alignment of target type src/gc/smallobject.c:522: warning: cast increases required alignment of target type The relevant lines are: while (*free_list_end) free_list_end = &PMC_struct_val((PObj *)free_list_end); /* 520 */ PMC_struct_val((PObj *)free_list_end) = source->free_list; /* 522 */ Where free_list_end is a void **, and casting it to a (PObj *) assumes a stricter alignment. Since this is just the sort of thing you're hoping to clean up anyway, and since gcc already raises 162 other warnings (including 128 other alignment warnings, but not including the 149 different warnings Solaris cc raises) I'm not overly concerned by it. -- Andy Dougherty [EMAIL PROTECTED]