tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Patch: Allow declared arrays to be initialized without an


From: Arthur Williams
Subject: [Tinycc-devel] Patch: Allow declared arrays to be initialized without an explicit size
Date: Sat, 13 Feb 2021 19:31:37 -0800

The following example used to not compile (error: incompatible types for redefinition of 'array')
```
    extern int array[2];
    int array[] = {1};
```
Now it will compile as if `int array[2] = {1};` was used.
Unit tests were added to cover this case and also to ensure that `int array[] = {1,2,3};` would still be invalid with the initial declaration.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]