stormalf / chibicc

A small C compiler from rui314
MIT License
6 stars 1 forks source link

ISS-157 chibicc failed to compile openwrt with error "expected an expression" #50

Closed stormalf closed 2 months ago

stormalf commented 10 months ago

./chibicc -c -o ./issues/issue157.exe ./issues/issue157.c ./issues/issue157.c:1035: union string_value lval = {}, rval = {}; ^ parse.c: in primary : expected an expression

it was caused by empty value, if we add 0 like lval = {0}, it compiles fine. Need to manage empty initializer for union. gcc compiles fine empty union.

stormalf commented 2 months ago

fixed by pull request 1.0.22 #65