Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Wed, 09 Apr 2025 14:56:47 -0700 Organization: None to speak of Lines: 25 Message-ID: <87ecy1q9r4.fsf@nosuchdomain.example.com> References: <87y0wjaysg.fsf@gmail.com> <20250402220614.431@kylheku.com> <85mscxlqnb.fsf@nosuchdomain.example.com> <20250403121946.134@kylheku.com> <20250409124900.00000fa1@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Wed, 09 Apr 2025 23:56:48 +0200 (CEST) Injection-Info: dont-email.me; posting-host="da68f73767d3cb351ac0b16ea7c85d0b"; logging-data="1572800"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+iIlsLZfKO7L0RydAkGfwH" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:mpnPCgrkN5C63AzvH7p/f0jriIU= sha1:apQm07nCQ7G2KHwrr+14/JykUwo= Bytes: 2494 David Brown writes: > On 09/04/2025 11:49, Michael S wrote: [...] >> 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 : [...] Yes, but also no. A trailing comma in an argument list in a function call is a syntax error, but the standard doesn't require syntax errors (or constraint violations) to be fatal. Rejection is required only for #error. In most cases, most compilers do treat syntax errors as fatal, but for example a compiler that accepts trailing commas as an extension might produce a non-fatal warning even in conforming mode. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */