[tlbuild] lcdf-typetools-2.85 doesn't compile with gcc-3.4.2 on old FreeBSD-5

Peter Breitenlohner peb at mppmu.mpg.de
Mon Feb 7 15:45:29 CET 2011


On Mon, 7 Feb 2011, Eddie Kohler wrote:

> Does the following work on both platforms?
>
> ...
> 	char real_data[0];	// but it is almost certainly more
>    };
>
>    enum {
> 	MEMO_SPACE = sizeof(memo_t)
>    };
>
> Note different number of characters in real_data

Hi Eddie,

this works with both g++-3.4.6 (linux-x86) and g++-3.4.5 (mingw32 cross
compilation on linux).  Because I vaguely remember some problems with
size-zero arrays, I have also tried

    ...
 	char real_data[1];	// but it is almost certainly more
    };

    enum {
 	MEMO_SPACE = sizeof(memo_t) - 1
    };

which succeeds as well (and I hope yields the same result, i.e., no padding
at the end).

Regards
Peter Breitenlohner <peb at mppmu.mpg.de>


More information about the tlbuild mailing list