mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-25 06:00:11 +08:00
Remove a bit-field TODO
Checked the lcc testsuite for bitfield stuff (in cq.c and fields.c), fixed one more error in initializing unnamed members (which have to be skipped), removed the TODO.
This commit is contained in:
parent
28084420fe
commit
f775d68725
1
TODO
1
TODO
@ -13,7 +13,6 @@ Bugs:
|
||||
- transform functions to function pointers in function parameters
|
||||
(net/ipv4/ip_output.c)
|
||||
- fix function pointer type display
|
||||
- check lcc test suite -> fix bitfield binary operations
|
||||
- check section alignment in C
|
||||
- fix invalid cast in comparison 'if (v == (int8_t)v)'
|
||||
- finish varargs.h support (gcc 3.2 testsuite issue)
|
||||
|
2
tccgen.c
2
tccgen.c
@ -6075,6 +6075,8 @@ static void decl_designator(CType *type, Section *sec, unsigned long c,
|
||||
c += index * type_size(type, &align);
|
||||
} else {
|
||||
f = *cur_field;
|
||||
while (f && (f->v & SYM_FIRST_ANOM))
|
||||
*cur_field = f = f->next;
|
||||
if (!f)
|
||||
tcc_error("too many field init");
|
||||
/* XXX: fix this mess by using explicit storage field */
|
||||
|
@ -2075,6 +2075,13 @@ void bitfield_test(void)
|
||||
} st4;
|
||||
st4.y = 1;
|
||||
printf("st4.y == %d\n", st4.y);
|
||||
struct sbf5 {
|
||||
int a;
|
||||
char b;
|
||||
int x : 12, y : 4, : 0, : 4, z : 3;
|
||||
char c;
|
||||
} st5 = { 1, 2, 3, 4, -3, 6 };
|
||||
printf("st5 = %d %d %d %d %d %d\n", st5.a, st5.b, st5.x, st5.y, st5.z, st5.c);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
Loading…
Reference in New Issue
Block a user