fix another static struct init issue (arrays with unknown size at end)

This commit is contained in:
Jaroslav Kysela
2011-02-22 11:26:45 +01:00
parent dbefae52b0
commit ab73c9bc4e
3 changed files with 64 additions and 31 deletions

4
tcc.h
View File

@ -282,7 +282,8 @@ typedef struct AttributeDef {
func_args : 5,
mode : 4,
weak : 1,
fill : 11;
resize : 1,
fill : 10;
struct Section *section;
} AttributeDef;
@ -293,6 +294,7 @@ typedef struct AttributeDef {
#define FUNC_ARGS(r) (((AttributeDef*)&(r))->func_args)
#define FUNC_ALIGN(r) (((AttributeDef*)&(r))->aligned)
#define FUNC_PACKED(r) (((AttributeDef*)&(r))->packed)
#define ARRAY_RESIZE(r) (((AttributeDef*)&(r))->resize)
#define ATTR_MODE(r) (((AttributeDef*)&(r))->mode)
#define INT_ATTR(ad) (*(int*)(ad))