[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Void expressions in variadic argument lists
From: |
Elijah Stone |
Subject: |
[Tinycc-devel] Void expressions in variadic argument lists |
Date: |
Fri, 18 Jun 2021 03:42:33 -0700 (PDT) |
Tcc currently accepts the following erroneous code:
void v();
void f(int, ...);
int main() {
f(0, v());
}
And a variation:
struct incomplete v();
void f(int, ...);
int main() {
f(0, v());
}
Slightly more fun one:
struct incomplete f();
void g(struct incomplete);
int main() {
f(g());
}
There's also this, which looks ok but will break on ABIs with callee
stack cleanup:
struct incomplete f();
int main() {
f();
}
Attached trivial patch fixes both of these issues.
Cheers,
-E
void.diff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] Void expressions in variadic argument lists,
Elijah Stone <=