Re: [AD] Allegro 4.1.8 WIP, dat2c

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


> 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.

Yep, I saw that too.

> 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.

Yes, I don't like it very much.

> 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).

I think applying everywhere the same tweak is the best solution.

-- 
Eric Botcazou




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