Re: [Tinycc-devel] Miscompilation of __attribute__((cleanup))

2025-05-28 Thread Herman ten Brugge via Tinycc-devel
On 5/29/25 02:35, Lino Mastrodomenico wrote: Thanks to both of you. The semantics of __attribute__((cleanup)) require that the entire return expression is evaluated before the cleanup functions are called. So saving the cleanup symbol solves most common cases but not all of them. E.g. this

Re: [Tinycc-devel] Miscompilation of __attribute__((cleanup))

2025-05-28 Thread Lino Mastrodomenico
Thanks to both of you. The semantics of __attribute__((cleanup)) require that the entire return expression is evaluated before the cleanup functions are called. So saving the cleanup symbol solves most common cases but not all of them. E.g. this slightly modified test case returns 42 on GCC and C

Re: [Tinycc-devel] TCC Bug

2025-05-28 Thread Steffen Nurpmeso
Vincent Lefevre wrote in <20250527155503.gf128...@qaa.vinc17.org>: |On 2025-05-26 19:39:03 +0800, Jackson Helie G wrote: |> In this case (long double xx=0xf.001p0L;) tcc will lose the |> last 3 digits. If p0 is changed to p-2000, all bits will be 0. However, \ |> gcc |> and clang

Re: [Tinycc-devel] TCC Bug

2025-05-28 Thread Herman ten Brugge via Tinycc-devel
On 5/26/25 13:39, Jackson Helie G wrote: In this case (long double xx=0xf.001p0L;) tcc will lose the last 3 digits. If p0 is changed to p-2000, all bits will be 0. However, gcc and clang do not have this error. Note that my current hardware system is a 16-byte long double type, with

Re: [Tinycc-devel] Questions: how to use libtcc on an embedded ARM 32bits micro-controller?

2025-05-28 Thread Lilian Besson
Hello, Just to let you know, I've worked on this on my own last Saturday, and I've almost managed to port TCC to the NumWorks: https://github.com/Naereen/A-C-Compiler-for-the-NumWorks-calculator I've had to modify a bit the source code of tinycc.git/ to build a arm-eabihf-libtcc.a static librar