History

Add warning 2 For example: struct A { int b: 16; int c: 16 }; sizeof (struct A);

jiang committed 12 years ago

Commit 03687721 parent 14d0aa41 file · +2 −0Browse files

Unified · Split

tccgen.c+2−0
@@ -3795,6 +3795,8 @@ ST_FUNC void unary(void) · 3794 unmodified lines
3795 if (!(type.t & VT_VLA)) {3795 if (!(type.t & VT_VLA)) {
3796 if (size < 0)3796 if (size < 0)
3797 tcc_error("sizeof applied to an incomplete type");3797 tcc_error("sizeof applied to an incomplete type");
3798 if(type.t & VT_BITFIELD)
3799 tcc_error("'%s' applied to a bit-field", get_tok_str(t, NULL));
3798 vpushs(size);3800 vpushs(size);
3799 } else {3801 } else {
3800 vla_runtime_type_size(&type, &align);3802 vla_runtime_type_size(&type, &align);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t