Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Jens Gustedt
Am 14. August 2024 16:47:32 MESZ schrieb Alejandro Colomar : > On Wed, Aug 14, 2024 at 03:50:21PM GMT, Jens Gustedt wrote: > > > > > > > > > > That said, I suspect WG14 would not be keen on standardizing > > > > > `lengthof` without an ugly keyword given that there are plenty of > > > > > other u

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Martin Uecker
Am Mittwoch, dem 14.08.2024 um 14:52 + schrieb Ballman, Aaron: > > I would love to see a proposal for adding this GNU extension to ISO C. > > Did nobody do it yet? I could try to, if I find some time. (But I'll take > > a longish time for that; if anyone else > > does it, it would be > great

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
Hi Aaron, On Wed, Aug 14, 2024 at 02:07:16PM GMT, Ballman, Aaron wrote: > > Ahh, context:global seems to be what I wanted. Where is that documented? > > For me it is the default when I go to https://sourcegraph.com/search but > there's documentation at > https://sourcegraph.com/docs/code-searc

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Ballman, Aaron
David Brown ; Florian Weimer ; Andreas Schwab ; Timm Baeder ; A. Jiang ; Eugene Zelenko Subject: Re: v2.1 Draft for a lengthof paper On Wed, Aug 14, 2024 at 03:50:21PM GMT, Jens Gustedt wrote: > > > > > > > > That said, I suspect WG14 would not be keen on standardiz

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
On Wed, Aug 14, 2024 at 03:50:21PM GMT, Jens Gustedt wrote: > > > > > > > > That said, I suspect WG14 would not be keen on standardizing > > > > `lengthof` without an ugly keyword given that there are plenty of other > > > > uses of it that would break: > > > > > > > > https://sourcegraph.com/g

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Martin Uecker
Am Mittwoch, dem 14.08.2024 um 16:12 +0200 schrieb Alejandro Colomar: > Hi Martin, > > On Wed, Aug 14, 2024 at 03:50:00PM GMT, Martin Uecker wrote: > > An operator that returns an array with all dimensions of a multi-dimensional > > array would make a a lot of sense to me. > > > > > > double ar

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
Hi Aaron, On Wed, Aug 14, 2024 at 01:59:58PM GMT, Ballman, Aaron wrote: > > Why would you be looping? lengthof only addresses the outer dimension > > sizeof would need a loop, no ? > > Due to poor reading comprehension, I missed in the paper that lengthof > works on the outer dimension. 😉 I thin

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
Hi Martin, On Wed, Aug 14, 2024 at 03:50:00PM GMT, Martin Uecker wrote: > An operator that returns an array with all dimensions of a multi-dimensional > array would make a a lot of sense to me. > > > double array[4][3][2]; > > // array_dims(array) = (constexpr size_t[3]){ 4, 3, 2 } And what i

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Ballman, Aaron
er Del Campo Romero ; Gcc Patches ; Daniel Plakosh ; Martin Uecker ; Joseph Myers ; Gabriel Ravier ; Jakub Jelinek ; Kees Cook ; Qing Zhao ; David Brown ; Florian Weimer ; Andreas Schwab ; Timm Baeder ; A. Jiang ; Eugene Zelenko Subject: Re: v2.1 Draft for a lengthof paper Hi Aaron, On

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Ballman, Aaron
ar ; Xavier Del Campo Romero Cc: Gcc Patches ; Daniel Plakosh ; Martin Uecker ; Joseph Myers ; Gabriel Ravier ; Jakub Jelinek ; Kees Cook ; Qing Zhao ; David Brown ; Florian Weimer ; Andreas Schwab ; Timm Baeder ; A. Jiang ; Eugene Zelenko Subject: RE: v2.1 Draft for a lengthof paper Am 14

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
Hi Aaron, On Wed, Aug 14, 2024 at 01:21:18PM GMT, Ballman, Aaron wrote: > > What regex did you use for searching? > > I went cheap and easy rather than trying to narrow down: > https://sourcegraph.com/search?q=context:global+lang:C+lengthof&patternType=regexp&sm=0 Ahh, context:global seems to be

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Jens Gustedt
Am 14. August 2024 14:58:16 MESZ schrieb Alejandro Colomar : > Hi Aaron, Jens, > > On Wed, Aug 14, 2024 at 02:17:52PM GMT, Jens Gustedt wrote: > > Am 14. August 2024 13:31:19 MESZ schrieb "Ballman, Aaron" > > : > > > Sorry for top-posting, my work account is stuck on Outlook. :-/ > > > > > > > F

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Martin Uecker
e language where doing it in a > header can be completely sufficient. > > Plus, implementing as a macro in a header (probably ) makes also a > feature test, for those applications that > already have something similar. > this was basically what we did for `unreachable` and I think

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Jens Gustedt
o Colomar > ; Xavier Del Campo Romero > Cc: Gcc Patches ; Daniel Plakosh > ; Martin Uecker ; Joseph Myers > ; Gabriel Ravier ; Jakub Jelinek > ; Kees Cook ; Qing Zhao > ; David Brown ; Florian > Weimer ; Andreas Schwab ; Timm > Baeder ; A. Jiang ; Eugene Zelenko >

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Ballman, Aaron
024 8:58 AM To: Jens Gustedt ; Ballman, Aaron Cc: Xavier Del Campo Romero ; Gcc Patches ; Daniel Plakosh ; Martin Uecker ; Joseph Myers ; Gabriel Ravier ; Jakub Jelinek ; Kees Cook ; Qing Zhao ; David Brown ; Florian Weimer ; Andreas Schwab ; Timm Baeder ; A. Jiang ; Eugene Zelenko Subject:

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
Hi Aaron, On Wed, Aug 14, 2024 at 12:40:41PM GMT, Ballman, Aaron wrote: > > We should not impose an implementation in the language where doing > > it in a header can be completely sufficient. > > But can doing this in a header be completely sufficient in practice? > e.g., the user who passes a po

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
Hi Aaron, Jens, On Wed, Aug 14, 2024 at 02:17:52PM GMT, Jens Gustedt wrote: > Am 14. August 2024 13:31:19 MESZ schrieb "Ballman, Aaron" > : > > Sorry for top-posting, my work account is stuck on Outlook. :-/ > > > > > For a WG14 paper you should add these findings to support that choice. > > > A

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Ballman, Aaron
s Cook ; Qing Zhao ; David Brown ; Florian Weimer ; Andreas Schwab ; Timm Baeder ; A. Jiang ; Eugene Zelenko Subject: RE: v2.1 Draft for a lengthof paper Hi Aaron, Am 14. August 2024 13:31:19 MESZ schrieb "Ballman, Aaron" : > Sorry for top-posting, my work account is stuck on

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Jens Gustedt
rked out fine. Jens > ~Aaron > > -Original Message- > From: Jens Gustedt > Sent: Wednesday, August 14, 2024 2:11 AM > To: Alejandro Colomar ; Xavier Del Campo Romero > > Cc: Gcc Patches ; Daniel Plakosh > ; Martin Uecker ; Joseph Myers > ; Gabriel Ravier

RE: v2.1 Draft for a lengthof paper

2024-08-14 Thread Ballman, Aaron
ook ; Qing Zhao ; David Brown ; Florian Weimer ; Andreas Schwab ; Timm Baeder ; A. Jiang ; Eugene Zelenko ; Ballman, Aaron Subject: Re: v2.1 Draft for a lengthof paper Am 14. August 2024 01:27:33 MESZ schrieb Alejandro Colomar : > Hi Xavier, > > On Wed, Aug 14, 2024 at 12:38:53AM GMT,

Re: v2.1 Draft for a lengthof paper

2024-08-14 Thread Alejandro Colomar
Hi Jens, Martin, On Wed, Aug 14, 2024 at 08:11:20AM GMT, Jens Gustedt wrote: > > Checking , I see that while several > > projects have a lengthof() macro, all of them use it with semantics > > compatible with this keyword, so it shouldn't break too much. Maybe > > t

Re: v2.1 Draft for a lengthof paper

2024-08-13 Thread Jens Gustedt
Am 14. August 2024 01:27:33 MESZ schrieb Alejandro Colomar : > Hi Xavier, > > On Wed, Aug 14, 2024 at 12:38:53AM GMT, Xavier Del Campo Romero wrote: > > I have been overseeing these last emails - > > Ahhh, good to know; thanks! :) > > > thank you very much for your > > efforts, Alex! > > :-) >

Re: v2.1 Draft for a lengthof paper

2024-08-13 Thread Jens Gustedt
Hi, Am 14. August 2024 00:38:53 MESZ schrieb Xavier Del Campo Romero : > I have been overseeing these last emails - thank you very much for your > efforts, Alex! I did not reply until now because I do not have prior > experience with gcc internals, so my feedback would probably have not > been t

Re: v2.1 Draft for a lengthof paper

2024-08-13 Thread Alejandro Colomar
Hi Xavier, On Wed, Aug 14, 2024 at 12:38:53AM GMT, Xavier Del Campo Romero wrote: > I have been overseeing these last emails - Ahhh, good to know; thanks! :) > thank you very much for your > efforts, Alex! :-) > I did not reply until now because I do not have prior > experience with gcc inter

Re: v2.1 Draft for a lengthof paper

2024-08-13 Thread Xavier Del Campo Romero
I have been overseeing these last emails - thank you very much for your efforts, Alex! I did not reply until now because I do not have prior experience with gcc internals, so my feedback would probably have not been that useful. Those emails from 2020 were in fact discussing two completely differe