[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Missing compiler error for ambiguous anon structs
From: |
Pitr Kaye |
Subject: |
[Tinycc-devel] Missing compiler error for ambiguous anon structs |
Date: |
Wed, 1 May 2019 14:02:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
Hello,
struct a1 {
int x;
};
struct a2 {
int x;
};
struct b { // ambiguous
int y;
struct a1;
struct a2;
} p1;
struct c { // ambiguous
int x;
struct a1;
} p2;
int main() {
p1 = (struct b){ 1, 2, 3};
p2 = (struct c){ 1, 2};
}
These ambiguous anon structs compile without error.
A compiler error message would make debugging much easier.
- [Tinycc-devel] Missing compiler error for ambiguous anon structs,
Pitr Kaye <=