| Deutsch English Français Italiano |
|
<vt5r34$inuo$7@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Wed, 9 Apr 2025 15:01:24 +0200 Organization: A noiseless patient Spider Lines: 48 Message-ID: <vt5r34$inuo$7@dont-email.me> References: <87y0wjaysg.fsf@gmail.com> <vsj1m8$1f8h2$1@dont-email.me> <vsj2l9$1j0as$1@dont-email.me> <vsjef3$1u4nk$1@dont-email.me> <vsjg6t$20pdb$1@dont-email.me> <vsjgjn$1v1n4$1@dont-email.me> <vsjk4k$24q5m$1@dont-email.me> <vsjlcp$230a5$1@dont-email.me> <vsjmdl$277bk$1@dont-email.me> <VsdHP.1828827$TBhc.1078002@fx16.iad> <vskjlo$34st8$1@dont-email.me> <20250402220614.431@kylheku.com> <85mscxlqnb.fsf@nosuchdomain.example.com> <vsl9sn$3vdjj$2@dont-email.me> <20250403121946.134@kylheku.com> <vsms75$1i8ud$1@dont-email.me> <vsnhq6$291i3$4@dont-email.me> <20250409124900.00000fa1@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 09 Apr 2025 15:01:24 +0200 (CEST) Injection-Info: dont-email.me; posting-host="39048323a720df50869558e92437b3ec"; logging-data="614360"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180q07WgPzRKxIJy4jaEXcSDzaahAeDZsM=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:qmYpNbzaCadS1GfSZBjDK1bmF8I= In-Reply-To: <20250409124900.00000fa1@yahoo.com> Content-Language: en-GB On 09/04/2025 11:49, Michael S wrote: > On Fri, 4 Apr 2025 02:57:10 -0000 (UTC) > Lawrence D'Oliveiro <ldo@nz.invalid> wrote: > >> On Thu, 3 Apr 2025 21:48:40 +0100, bart wrote: >> >>> Commas are overwhelmingly used to separate list elements in >>> programming languages. >> >> Not just separate, but terminate. > > I disagree. I am in favor of optional trailing commas rather than > mandatory ones. I am certainly in favour of them for things like initialiser lists and enum declarations. > >> All the reasonable languages allow >> trailing commas. > > Are your sure that C Standard does not allow trailing commas? > That is, they are obviously legal in initializer lists. > All compilers that I tried reject trailing comma in function calls. > .... > But is it (rejection) really required by the Standard? I don't know. > > Yes. The syntax (in 6.5.2p1) is : postfix-expression: ... postfix-expression ( argument-expression-list opt ) ... argument-expression-list : argument-expression argument-expression-list , argument-expression I don't think it is unreasonable to suggest that it might be nice to allow a trailing comma, at least in variadic function calls, but the syntax of C does not allow it.