public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Zack Weinberg" <zack@owlfolio.org>
To: "GNU libc development" <libc-alpha@sourceware.org>
Cc: "Eric Blake" <eblake@redhat.com>
Subject: Re: [PATCH] sockaddr.3type: Document that sockaddr_storage is the API to be used
Date: Thu, 06 Apr 2023 14:05:15 -0400	[thread overview]
Message-ID: <6fdadcff-95a2-44fe-9453-d0200822e01e@app.fastmail.com> (raw)
In-Reply-To: <7396024c-62d4-a19c-b7bc-e24a9d4bcb31@gmail.com>

On Thu, Apr 6, 2023, at 12:31 PM, Alejandro Colomar via Libc-alpha wrote:
> On 4/6/23 18:24, Eric Blake wrote:
>> here's the updated wording that the Austin Group tried today (and we
>> plan on starting a 30-day interpretation feedback window if there are
>> still adjustments to be made to the POSIX wording):
>>
>> https://austingroupbugs.net/view.php?id=1641#c6255
>
> Thanks!  That wording (both paragraphs) LGTM.

If I could suggest an additional change, the focus on aliasing
_diagnostics_ rather misses the point IMHO.  We don't just want the
compiler to _not complain_ about accesses to sa_family_t, we want it to
treat the accesses as _legitimate_.  So, instead of

# Additionally, the structures shall be defined in such a way that
# these casts do not cause the compiler to produce diagnostics about
# aliasing issues in accessing the sa_family_t member of these
# structures when compiling conforming application (xref to XBD section
# 2.2) source files.

may I suggest wording along the lines of

# Additionally, the structures shall be defined in such a way that
# the compiler treats an access to the stored value of the sa_family_t
# member of any of these structures, via an lvalue expression whose type
# involves any other one of these structures, as permissible, despite the
# more restrictive rules listed in ISO C section 6.5p7.

zw

  reply	other threads:[~2023-04-06 18:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 17:13 Alejandro Colomar
2023-03-30 19:11 ` Eric Blake
2023-04-05  0:42   ` Alejandro Colomar
2023-04-06 16:24     ` Eric Blake
2023-04-06 16:31       ` Alejandro Colomar
2023-04-06 18:05         ` Zack Weinberg [this message]
2023-04-06 19:37           ` Eric Blake
2023-04-14 16:08             ` Zack Weinberg
2023-04-21 14:58               ` Alejandro Colomar
2023-04-21 15:00                 ` Alejandro Colomar
2023-04-21 15:27                   ` Eric Blake
2023-04-21 20:27                     ` [PATCH v3] sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types Alejandro Colomar
2023-04-21 20:35                       ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6fdadcff-95a2-44fe-9453-d0200822e01e@app.fastmail.com \
    --to=zack@owlfolio.org \
    --cc=eblake@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).