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

2024-01-21 Thread Herman ten Brugge via Tinycc-devel
On 1/20/24 09:30, grischka wrote: On 19.01.2024 07:18, Herman ten Brugge via Tinycc-devel wrote: I wanted to avoid an extra check for ';' because I found code like: case xxx: ; } Instead of writing 'break;' they used ';'. Without checking for ';' a warning was printed: Always same

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

2024-01-20 Thread grischka via Tinycc-devel
On 19.01.2024 07:18, Herman ten Brugge via Tinycc-devel wrote: I wanted to avoid an extra check for ';' because I found code like: case xxx: ; } Instead of writing 'break;' they used ';'. Without checking for ';' a warning was printed: Always same problem: we want something and do

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 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] 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

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

2024-01-17 Thread Brad Robinson via Tinycc-devel
Oh, interesting - that didn't even occur to me. Out of curiosity I just tried the same in msvc... the intellisense in Visual Studio highlights it as an error, but it builds and runs fine. Brad On 2024-01-18 02:15, grischka via Tinycc-devel wrote: On 15.01.2024 00:34, Brad Robinson via

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

2024-01-17 Thread grischka via Tinycc-devel
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 scripting language I'm working on.

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

2024-01-15 Thread Herman ten Brugge via Tinycc-devel
On 1/15/24 00:34, b...@toptensoftware.com 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 scripting language I'm working on. Anyway, I