wgtdkp / wgtcc

A small C11 compiler
MIT License
765 stars 130 forks source link

wrong error report for array declaration #21

Closed huangguiyang closed 7 years ago

huangguiyang commented 7 years ago
static char *array[] = {"abc", NULL};
static char *array[];

wgtcc: conflicting types for 'array'

but it's indeed correct.

wgtdkp commented 7 years ago

bug: two array type were considered not compatible if one of them is not complete, but the other do. fixed: https://github.com/wgtdkp/wgtcc/commit/685aabe444e596ab299c6c853e373153383684d9 test added.

thx :)