diff options
| author | jiang <30155751@qq.com> | 2014-05-09 22:41:45 +0800 |
|---|---|---|
| committer | jiang <30155751@qq.com> | 2014-05-09 22:41:45 +0800 |
| commit | 03687729ecd22de41575f9f6404f107fbfe54b66 (patch) | |
| tree | 62bae6e72461b140738c149e8d8079d62b8f9cee /tccgen.c | |
| parent | 14d0aa450f9a926a852ea01fbdecf27425264d14 (diff) | |
| download | tinycc-03687729ecd22de41575f9f6404f107fbfe54b66.tar.gz tinycc-03687729ecd22de41575f9f6404f107fbfe54b66.tar.bz2 | |
Add warning 2
For example:
struct A {
int b: 16;
int c: 16
};
sizeof (struct A);
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3795,6 +3795,8 @@ ST_FUNC void unary(void) if (!(type.t & VT_VLA)) { if (size < 0) tcc_error("sizeof applied to an incomplete type"); + if(type.t & VT_BITFIELD) + tcc_error("'%s' applied to a bit-field", get_tok_str(t, NULL)); vpushs(size); } else { vla_runtime_type_size(&type, &align); |
