Re: [AD] Allegro 4.1.8 WIP, dat2c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Looks ok, but don't you need to apply the same tweak for every structure
> containing a ZERO_SIZE_ARRAY member ? Three structures are involved: struct
> BITMAP, struct RLE_SPRITE and struct FONT_GLYPH.
Strange enough gcc 2.95 accept terminating 0-length arrays at the end of 
structs and initializes these properly as long as not initilizing with string 
constants.
struct {char arr[0]; } x = {"foo"}; /* Data loss + warnings */
struct {char *arr[0];} y = {{0,0}}; /* OK */
hence the BITMAP struct gives no problem. This may raise the idea of an 
alternative solution for the FONT like:
struct {char arr[0]; } x = {0x66,0x6f,0x6f}; 
which would work...however only for the gcc implementation, it is still not 
ISO/ANSI compliant.
So, what do you suggest for the BITMAP, keep it as is or make an analogue 
solution as for the font? (I forgot the RLE stuct, bad me, it was in the 
orignal patch which was rejected a long time ago due to exporting of 
pointers).
/Christer






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/