Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: technology discussion =?utf-8?Q?=E2=86=92?= does the world need a "new" C ? Date: Sat, 06 Jul 2024 15:45:40 -0700 Organization: None to speak of Lines: 27 Message-ID: <87cynquokr.fsf@nosuchdomain.example.com> References: <871q48w98e.fsf@nosuchdomain.example.com> <87wmlzvfqp.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 07 Jul 2024 00:45:41 +0200 (CEST) Injection-Info: dont-email.me; posting-host="31bef4326a7de5d231f958bc2ab73da5"; logging-data="4185240"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LFds7Hpe4TG0GT8t3nj8R" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:mYcPtN+HVEVkT+A1K4AV2nkAT5k= sha1:mk9IhYPLl6jVxwsyN6JFNFERO8k= Bytes: 2552 James Kuyper writes: [...] > The key point is that an expression of array type does not always get > converted into a pointer to the first element of that array. The clause > above starts out with four exceptions, and an array behaves quite > differently from a pointer when any of those exceptions apply. There are three exceptions, not four. The N1570 draft of C11 incorrectly says: Except when it is the operand of the sizeof operator, the _Alignof operator, or the unary & operator, or is a string literal used to initialize an array, an expression that has type ‘‘array of type’’ is converted to an expression with type ‘‘pointer to type’’ that points to the initial element of the array object and is not an lvalue. If the array object has register storage class, the behavior is undefined. There error is that the _Alignof operator (which was added in C11) can only be applied to a parenthesized type name, not to an expression (I'm not sure why that is). The C11 standard corrects the error, showing just the usual three exceptions. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */