Re: [Tinycc-devel] [Bug c/119170] Add operators _Widthof, _Minof, _Maxof

2025-03-15 Thread Alejandro Colomar via Tinycc-devel
Hi Jim, On Fri, Mar 14, 2025 at 10:29:42AM -0700, Jim Thompson wrote: > I don't think that's the right question. The question is, why add something > non-standard to the language that's easy enough for anyone who wants it to > just add as a macro? It's not that easy. If you want to make it work

Re: [Tinycc-devel] [Bug c/119170] Add operators _Widthof, _Minof, _Maxof

2025-03-14 Thread Alejandro Colomar via Tinycc-devel
Hi, On Fri, Mar 14, 2025 at 03:54:45PM +0100, grischka wrote: > On 12.03.2025 13:00, Alejandro Colomar via Tinycc-devel wrote: > > Hi! > > > > I'm proposing a set of operators for ISO C2y: _Widthof, _Minof, _Maxof. > > Someone wondered if it might be more w

Re: [Tinycc-devel] [Bug c/119170] Add operators _Widthof, _Minof, _Maxof

2025-03-14 Thread Alejandro Colomar via Tinycc-devel
Hi Jim, On Fri, Mar 14, 2025 at 12:18:09PM -0700, Jim Thompson wrote: > Simple: one person adds a feature to one compiler, another adds the same > feature in a different way on another compiler, and now programs written > for one compiler won't compile on the other. The feature is being proposed

Re: [Tinycc-devel] [Bug c/119170] Add operators _Widthof, _Minof, _Maxof

2025-03-12 Thread Alejandro Colomar via Tinycc-devel
Hi Thiago, On Wed, Mar 12, 2025 at 10:46:41AM -0300, Thiago Adams wrote: > Not sure if this was considered in this proposal, but operators have the > limitation of not > working with #if blocks. I considered it, but the main use case of the operators is in C code, not in preprocessor conditionals

Re: [Tinycc-devel] [Bug c/119170] Add operators _Widthof, _Minof, _Maxof

2025-03-12 Thread Alejandro Colomar via Tinycc-devel
Hi! I'm proposing a set of operators for ISO C2y: _Widthof, _Minof, _Maxof. Someone wondered if it might be more work for small compilers like TCC, for little benefit. So I'd like you to read the GCC bug linked below and comment if you want. Have a lovely day! Alex On Wed, Mar 12, 2025 at 10:2