public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2] Support C2X printf %b, %B
Date: Wed, 20 Oct 2021 21:27:54 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2110202107230.1319306@digraph.polyomino.org.uk> (raw)
In-Reply-To: <CAMe9rOouhOJW-0jq7V6JTgGHqqPphm=5K44VKgd6ONQM2apiFA@mail.gmail.com>

On Wed, 20 Oct 2021, H.J. Lu via Libc-alpha wrote:

> Binaries using such C2X specifiers should have a dependency on
> the glibc version which supports them.  Ideally this dependency
> should be added only when C2X specifiers are used.

That's not what we've ever done before when adding new format specifiers.  
(In recent years it's been strftime and strptime getting new features more 
than printf and scanf.)  Or for supporting new values of enum or flags 
arguments to functions taking such arguments (in the cases where it's the 
glibc function rather than the kernel processing the argument).  Symbol 
versions should never be considered a guarantee that a program will work 
with a given glibc version older than the one it was built against (it 
could have been built based on the results of a configure check for a 
recently fixed bug, for example), just a shortcut to diagnose the most 
common cases where it definitely won't work on older glibc.

Although technically we could add new symbol versions as aliases for the 
old ones (for 56 printf-like functions per long double variant, so 168 in 
the powerpc64le case, I think), that definitely does not fit existing 
practice (and then you'd keep adding new versions for each new feature not 
added in the same glibc version - there are also %wN length modifiers for 
intN_t / int_leastN_t and %wfN for int_fastN_t in C2X, and a proposal for 
%wbN for _BitInt (N)).

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2021-10-20 21:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 23:15 Joseph Myers
2021-10-13  0:37 ` [PATCH v2] " Joseph Myers
2021-10-18 16:05   ` Ping " Joseph Myers
2021-10-26 20:49     ` Ping^2 " Joseph Myers
2021-11-01 16:56       ` Ping^3 " Joseph Myers
2021-11-08 15:03         ` Ping^4 " Joseph Myers
2021-11-08 15:38           ` Paul Zimmermann
2021-10-20 21:00   ` H.J. Lu
2021-10-20 21:27     ` Joseph Myers [this message]
2021-11-10  9:27   ` Florian Weimer
2021-11-10 15:30     ` Joseph Myers
2021-11-10 15:37       ` Florian Weimer

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=alpine.DEB.2.22.394.2110202107230.1319306@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=hjl.tools@gmail.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).