Hello,
I tried to compile JWasm with PellesC. Almost everything compiles without errors, with one exception. The issue is the initialization of a structure which contains 2 bitfields and a character array of "unknown" size:
#include <stdio.h>
typedef unsigned int uint_32;
typedef unsigned char uint_8;
typedef struct line_item {
struct line_item *next;
uint_32 lineno:20, srcfile:12;
uint_32 list_pos; /* position .LST file */
uint_8 macrolevel; /* just a bit (macrolevel > 0?) is needed */
char line[];
} line_item;
line_item endl = { NULL, 0, 0, 0, 0, "END" };
pocc complains:
main3.c(15): warning #2213: Multiple initializers for the same element (at offset 13).
main3.c(15): error #2139: Too many initializers.
while MSVC, OW and gcc don't see a problem.
How is this supposed to be defined in Pelles C ?