Re: [Tinycc-devel] Segfault on arm64 when making a function call with many arguments

2021-06-18 Thread Christian Jullien
Hi just quickly tested on my RPi arm64. I don't know if it works, i.e. all arguments go to the right parameter with the right value but, at least it no longer segfault. I'll make more tests today. C. From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf

Re: [Tinycc-devel] Segfault on arm64 when making a function call with many arguments

2021-06-18 Thread pursuer2 via Tinycc-devel
This bug may caused by "vpushv" SValue with VT_CMP flag. There should be only one VT_CMP SValue on vstack.  I make below patch to fix it, then the compilation exit normally. But I have no arm64 device with GNU/Linux to verify the test.  diff --git a/arm64-gen.c b/arm64-gen.c index 6389409..a9cb

Re: [Tinycc-devel] TinyCC -std=c2x support?

2021-06-18 Thread Christian Jullien
Hi Elijah, I'm not a maintainer but as far as I see, I vote a big YES for your patch. -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Elijah Stone Sent: Friday, June 18, 2021 12:24 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc

[Tinycc-devel] Void expressions in variadic argument lists

2021-06-18 Thread Elijah Stone
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() {

Re: [Tinycc-devel] TinyCC -std=c2x support?

2021-06-18 Thread Elijah Stone
On Fri, 18 Jun 2021, Christian Jullien wrote: C evolves and supports new features over the time. Do we want to support upcoming features like prototypes without parameters (as in C++)? I think it would be a good idea. As far as I can tell, the current c2x draft (http://www.open-std.org/jt

[Tinycc-devel] TinyCC -std=c2x support?

2021-06-18 Thread Christian Jullien
Hi, C evolves and supports new features over the time. Do we want to support upcoming features like prototypes without parameters (as in C++)? See below: jullien@fedora:~ $ cat foo.c void foo(int) {} jullien@fedora:~ $ tcc -c foo.c foo.c:1: error: identifier expected It is otherw

Re: [Tinycc-devel] Segfault on arm64 when making a function call with many arguments

2021-06-18 Thread Christian Jullien
I confirm it fails on arm64 (but works on arm 32bits). It also fails with complete prototype: void map_add(int a, int b, int c, int d, int e, int f, int g, int h, int i) {} C. From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Arthur Williams Se