Correctly diagnose prototype redeclaration errors in C
We did not implement C99 6.7.5.3p15 fully in that we missed the rule for compatible function types where a prior declaration has a prototype and a subsequent definition (not just declaration) has an empty identifier list or an identifier list with a mismatch in parameter arity. This addresses that situation by issuing an error on code like: void f(int); void f() {} // type conflicts with previous declaration (Note: we already diagnose the other type conflict situations appropriately, this was the only situation we hadn't covered that I could find.)
Loading
Please sign in to comment