History

Add warning For example: struct A { int b []; };

jiang committed 12 years ago

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

Unified · Split

tccgen.c+2−0
@@ -3030,6 +3030,8 @@ static void struct_decl(CType *type, int u, int tdef) · 3029 unmodified lines
3030 skip(';');3030 skip(';');
3031 }3031 }
3032 skip('}');3032 skip('}');
3033 if (!c && flexible)
3034 tcc_error("flexible array member '%s' in otherwise empty struct", get_tok_str(v, NULL));
3033 /* store size and alignment */3035 /* store size and alignment */
3034 s->c = (c + maxalign - 1) & -maxalign; 3036 s->c = (c + maxalign - 1) & -maxalign;
3035 s->r = maxalign;3037 s->r = maxalign;

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