Re: [PATCH] Various pages: SYNOPSIS: Use VLA syntax in function parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/29/22 18:19, Alex Colomar wrote:
Hi Martin, Joseph,

On 11/29/22 18:00, Martin Uecker wrote:
Am Dienstag, dem 29.11.2022 um 16:53 +0000 schrieb Jonathan Wakely:
On Tue, 29 Nov 2022 at 16:49, Joseph Myers wrote:

On Tue, 29 Nov 2022, Michael Matz via Gcc wrote:

like.  But I'm generally doubtful of this whole feature within C
itself.
It serves a purpose in documentation, so in man-pages it seems
fine enough
(but then still could use a different puncuator to not be
confusable with
C syntax).

In man-pages you don't need to invent syntax at all.  You can write

int f(char buf[n], int n);

and in the context of a man page it will be clear to readers what
is
meant,

Considerably more clear than new invented syntax IMHO.

True, but I think it would be a mistake to use code in
man pages which then does not work as expected (or even
is subtle wrong) in actual code.

Exactly.  Using your

s/your/Joseph's/

proposed syntax (which was my first draft) would have probably been the source of hidden bugs, since it might work (read compile) in some cases, but with wrong results.

I prefer this hypothetical syntax, which at most will cause compile errors.

Cheers,

Alex


Martin





--
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux