Re: [Tinycc-devel] Variable declaration as first statement in a 'case' block gives error.

2024-01-18 Thread Herman ten Brugge via Tinycc-devel
On 1/18/24 22:08, grischka wrote: On 18.01.2024 17:38, Herman ten Brugge via Tinycc-devel wrote: That depends on the version of gcc / clang. Gcc 13.2.1 prints no error. Clang 17.0.6 prints "error: expected expression" Clang 18.0.0(not released yet) prints "warning: label followed by a

Re: [Tinycc-devel] Variable declaration as first statement in a 'case' block gives error.

2024-01-18 Thread Herman ten Brugge via Tinycc-devel
On 1/17/24 16:15, grischka wrote: On 15.01.2024 00:34, Brad Robinson via Tinycc-devel wrote: Hey All, First post here.  Firstly, thank you all for your work on this project.  I discovered tcc just a month or so ago and really enjoying using it as a back-end code generator for a custom

[Tinycc-devel] bug in preprocessor

2024-01-18 Thread Fred van Kempen via Tinycc-devel
This: #include #include int main(int argc, char **argv) { #ifdef FOO     printf("Foo: %s\n", argv[0]); #endif  bar     return argc; } should not compile, for obvious reasons, but it does.. Using 0.28rc. Fred ___ Tinycc-devel mailing list

Re: [Tinycc-devel] looking for documentation for porting

2024-01-18 Thread grischka via Tinycc-devel
On 16.01.2024 00:38, Michael Larson wrote: Hello, I have been tinkering around with TCC porting to a RISC cpu of my own design, I have my own C simulator and verilog targeted for a FPGA.. I have a lot of tests for functionality, but I need more so TCC looked like a good option to generate code

Re: [Tinycc-devel] Question about in-memory compilation target

2024-01-18 Thread grischka via Tinycc-devel
On 15.01.2024 00:51, Brad Robinson via Tinycc-devel wrote: Questions: 1. Is it possible to keep, use and then release the compiled code after the initial compiler instance has been deleted FYI below some version of libtcc_test.c to run without state. Note the LoadDll is needed only when the

Re: [Tinycc-devel] Variable declaration as first statement in a 'case' block gives error.

2024-01-18 Thread grischka via Tinycc-devel
On 18.01.2024 17:38, Herman ten Brugge via Tinycc-devel wrote: That depends on the version of gcc / clang. Gcc 13.2.1 prints no error. Clang 17.0.6 prints "error: expected expression" Clang 18.0.0(not released yet) prints "warning: label followed by a declaration is a C23 extension

Re: [Tinycc-devel] Question about in-memory compilation target

2024-01-18 Thread Brad Robinson via Tinycc-devel
Nice! Thank you... that's exactly what I needed. Brad On 2024-01-19 08:09, grischka via Tinycc-devel wrote: On 15.01.2024 00:51, Brad Robinson via Tinycc-devel wrote: Questions: 1. Is it possible to keep, use and then release the compiled code after the initial compiler instance has