diff options
| author | bellard <bellard> | 2003-10-17 20:59:15 +0000 |
|---|---|---|
| committer | bellard <bellard> | 2003-10-17 20:59:15 +0000 |
| commit | fe203057c26031b556bbdd2f965a25e42fb18baa (patch) | |
| tree | d204fea7d85cb9747f59699c988c10f0ea6166af /tcc.c | |
| parent | 114883e078f2137d6e44f6449a79eb5e5417fd60 (diff) | |
| download | tinycc-fe203057c26031b556bbdd2f965a25e42fb18baa.tar.gz tinycc-fe203057c26031b556bbdd2f965a25e42fb18baa.tar.bz2 | |
fixed assignment of const struct in struct
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -5856,7 +5856,11 @@ static void gen_assign_cast(CType *dt) /* XXX: more tests */ break; case VT_STRUCT: - if (!is_compatible_types(dt, st)) { + tmp_type1 = *dt; + tmp_type2 = *st; + tmp_type1.t &= ~(VT_CONSTANT | VT_VOLATILE); + tmp_type2.t &= ~(VT_CONSTANT | VT_VOLATILE); + if (!is_compatible_types(&tmp_type1, &tmp_type2)) { error: type_to_str(buf1, sizeof(buf1), st, NULL); type_to_str(buf2, sizeof(buf2), dt, NULL); |
