Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
| Newsgroups | comp.std.c |
| Subject | Re: Footnote in section on Address-Of Operator |
| Date | Thu, 24 Nov 2022 13:26:13 +0000 |
| Organization | A noiseless patient Spider |
| Lines | 33 |
| Message-ID | <8735a8iive.fsf@bsb.me.uk> (permalink) |
| References | <3aa216b0-365a-42b0-aceb-959cf5a1a747n@googlegroups.com> <87pmddi5e7.fsf@bsb.me.uk> <86o7sx83uf.fsf@linuxsc.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader01.eternal-september.org; posting-host="66cc716c1d8e20186aec3fe895a20c78"; logging-data="707126"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4XtkAvShH3c5ZviDYu/qN9PyMVxVOsJE=" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
| Cancel-Lock | sha1:3dNDXm+Jp7qBganyOzU3R1afDj4= sha1:3RvHh54Jr7Q9rSKeqOKupBs/Q1g= |
| X-BSB-Auth | 1.5e11572890e10577949b.20221124132613GMT.8735a8iive.fsf@bsb.me.uk |
| Xref | csiph.com comp.std.c:6458 |
Show key headers only | View raw
Tim Rentsch <tr.17687@z991.linuxsc.com> writes: > Ben Bacarisse <ben.usenet@bsb.me.uk> writes: > >> JoJoModding <jojohostert@gmail.com> writes: >> >>> in the paragraph on address and indirection operators (6.5.3.2 in the >>> C23 draft N3047), there is a footnote (footnote 117 in that draft), >>> which says that >>> >>>> &*E is equivalent to E (even if E is a null pointer) >> >> This seems to be a case where a footnote might add confusion rather than >> clarity. The normative text makes it clear that &*E can't be equivalent >> to E in every way because &*E is not an lvalue. And &*E has type >> constraints that E does not have. >> >>> This seems to imply that sizeof(&*E) == sizeof(E), which is unexpected >>> if E is an array. >> >> There are much simpler examples if the apparent non-equivalence. If p >> is a pointer object, p can be assigned to by &*p can't be. And due to >> the clause about constraints. &*(void *)0 is a constraint violation, >> but (void *)0 is obviously fine. > > What makes you say &*(void*)0 is a constraint violation? I > don't see any constraints that are violated. Isn't * applied to a pointer to an incomplete type a constraint? Let me go look... ah, no it is not! Thanks. -- Ben.
Back to comp.std.c | Previous | Next — Previous in thread | Find similar
Footnote in section on Address-Of Operator JoJoModding <jojohostert@gmail.com> - 2022-11-23 14:40 -0800
Re: Footnote in section on Address-Of Operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-11-24 00:05 +0000
Re: Footnote in section on Address-Of Operator Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-11-23 18:48 -0800
Re: Footnote in section on Address-Of Operator Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-11-24 13:26 +0000
csiph-web