Unified · Split
| @@ -3266,9 +3266,11 @@ static void unary(void) · 3265 unmodified lines | |||
| 3266 | inc(1, tok); | 3266 | inc(1, tok); |
| 3267 | next(); | 3267 | next(); |
| 3268 | } else if (tok == '.' || tok == TOK_ARROW) { | 3268 | } else if (tok == '.' || tok == TOK_ARROW) { |
| 3269 | int qualifiers; | ||
| 3269 | /* field */ | 3270 | /* field */ |
| 3270 | if (tok == TOK_ARROW) | 3271 | if (tok == TOK_ARROW) |
| 3271 | indir(); | 3272 | indir(); |
| 3273 | qualifiers = vtop->type.t & (VT_CONSTANT | VT_VOLATILE); | ||
| 3272 | test_lvalue(); | 3274 | test_lvalue(); |
| 3273 | gaddrof(); | 3275 | gaddrof(); |
| 3274 | next(); | 3276 | next(); |
| @@ -3290,6 +3292,7 @@ static void unary(void) · 15 unmodified lines | |||
| 3290 | gen_op('+'); | 3292 | gen_op('+'); |
| 3291 | /* change type to field type, and set to lvalue */ | 3293 | /* change type to field type, and set to lvalue */ |
| 3292 | vtop->type = s->type; | 3294 | vtop->type = s->type; |
| 3295 | vtop->type.t |= qualifiers; | ||
| 3293 | /* an array is never an lvalue */ | 3296 | /* an array is never an lvalue */ |
| 3294 | if (!(vtop->type.t & VT_ARRAY)) { | 3297 | if (!(vtop->type.t & VT_ARRAY)) { |
| 3295 | vtop->r |= lvalue_type(vtop->type.t); | 3298 | vtop->r |= lvalue_type(vtop->type.t); |