Re: [C2x] Disallow function attributes after function identifier

2022-06-13 Thread Jonathan Wakely via Gcc
On Sat, 11 Jun 2022 at 21:17, Alejandro Colomar wrote: > P.S.: Please consider deprecating 'auto' some day. It would be nice to > see C++'s auto in ISO C some day, even if it's 2060. I'm not entirely > happy doing `#define auto __auto_type` (of course it's UB, but it's nice) ;) There's a proposa

Re: [C2x] Disallow function attributes after function identifier

2022-06-11 Thread Alejandro Colomar via Gcc
On 6/11/22 14:08, Gabriel Ravier wrote: > Do we want to add a completely unnecessary feature, just for symmetry with C++, even if it poses a danger of breaking (both human and script) readability of function declarations/definitions, especially when hidden in macros? I actually don't get th

Re: [C2x] Disallow function attributes after function identifier

2022-06-11 Thread Jonathan Wakely via Gcc
On Sat, 11 Jun 2022, 10:00 Alejandro Colomar, wrote: > Hi Jonathan, > > On 6/11/22 00:47, Jonathan Wakely wrote: > > Well, I'd argue the same reasons to remove it from C++. Don't know > how > > useful that feature is for C++, though. I bet not much, but am not > an > > expert in the

Re: [C2x] Disallow function attributes after function identifier

2022-06-11 Thread Gabriel Ravier via Gcc
On 6/11/22 11:03, Alejandro Colomar via Gcc wrote: > Hi Jonathan, > > On 6/11/22 00:47, Jonathan Wakely wrote: >> Well, I'd argue the same reasons to remove it from C++.  Don't know how >> useful that feature is for C++, though.  I bet not much, but am not an >> expert in the langua

Re: [C2x] Disallow function attributes after function identifier

2022-06-11 Thread Alejandro Colomar via Gcc
Hi Jonathan, On 6/11/22 00:47, Jonathan Wakely wrote: Well, I'd argue the same reasons to remove it from C++.  Don't know how useful that feature is for C++, though.  I bet not much, but am not an expert in the language. It's used in libstdc++ because I couldn't get an attribute to

Re: [C2x] Disallow function attributes after function identifier

2022-06-10 Thread Jonathan Wakely via Gcc
On Fri, 10 Jun 2022, 22:29 Alejandro Colomar via Gcc, wrote: > [I reordered some of your answers, to better answer] > > Hi Jakub, > > On 6/10/22 23:16, Jakub Jelinek wrote: > > On Fri, Jun 10, 2022 at 10:40:15PM +0200, Alejandro Colomar via Gcc > wrote: > >> So, could you please drop that from C2

Re: [C2x] Disallow function attributes after function identifier

2022-06-10 Thread Alejandro Colomar via Gcc
Hi Joseph, On 6/10/22 23:09, Joseph Myers wrote: P.S.: The latest draft that I know of is N2731. I guess there are newer ones. Could you please name the latest one? It's N2912 (June 8 version - the version originally published on June 7 had various problems; there are still some issues, espec

Re: [C2x] Disallow function attributes after function identifier

2022-06-10 Thread Alejandro Colomar via Gcc
[I reordered some of your answers, to better answer] Hi Jakub, On 6/10/22 23:16, Jakub Jelinek wrote: On Fri, Jun 10, 2022 at 10:40:15PM +0200, Alejandro Colomar via Gcc wrote: So, could you please drop that from C2x? No! [[attr0]] void foo (void), bar (void); appertains to both declara

Re: [C2x] Disallow function attributes after function identifier

2022-06-10 Thread Jakub Jelinek via Gcc
On Fri, Jun 10, 2022 at 10:40:15PM +0200, Alejandro Colomar via Gcc wrote: > So, could you please drop that from C2x? No! For one it diverges from C++, but also it means something different at the different locations. [[attr0]] void foo (void), bar (void); appertains to both declarations, while v

Re: [C2x] Disallow function attributes after function identifier

2022-06-10 Thread Joseph Myers
On Fri, 10 Jun 2022, Alejandro Colomar via Gcc wrote: > I'd like to suggest a change in C2x regarding attributes. The attribute syntax is supposed to accept attributes in exactly the places they are accepted in C++ (and appertaining to the same entity, for each such place), for constructs prese

[C2x] Disallow function attributes after function identifier

2022-06-10 Thread Alejandro Colomar via Gcc
Hi, Joseph! I'd like to suggest a change in C2x regarding attributes. Right now, the draft allows function attributes to go right at the beginning of a function prototype, or just before the opening parenthesis: [[attr]] type f(params); type f [[attr]](params); I'd argue against the second o