public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Andreas Schwab <schwab@suse.de>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
	<libc-alpha@sourceware.org>
Subject: Re: [v3] C2x scanf binary constant handling
Date: Wed, 22 Feb 2023 21:36:10 +0000	[thread overview]
Message-ID: <a96cba53-8c4-2ac1-cd85-b087f15f101@codesourcery.com> (raw)
In-Reply-To: <mvm356zs7h1.fsf@suse.de>

On Tue, 21 Feb 2023, Andreas Schwab via Libc-alpha wrote:

> On Feb 21 2023, Joseph Myers wrote:
> 
> >> Should we also add test for ill formatted inputs?
> >
> > I don't think there's a real difference here between "ill formatted
> > for %i with the new feature" and "ill formatted for %i without the
> > feature" - some new cases become accepted with the feature, but
> > nothing is an ill formatted input that wasn't already.
> 
> Perhaps add a test with a lone "0b" which at least triggers a new code
> path.

I tried adding tests for that, but they fail (in C2x mode) because of a 
pre-existing bug (see bugs 12701 and 18246) with how scanf functions 
handle input strings that are a prefix of a matching string, but not a 
matching string themselves (such as "0x" for %i or "1e" for %f, before the 
addition of this feature, or "0b" in C2x mode after the addition of this 
feature).

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2023-02-22 21:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 23:40 [v2] " Joseph Myers
2023-02-20 20:03 ` Adhemerval Zanella Netto
2023-02-21  2:20   ` [v3] " Joseph Myers
2023-02-21  9:17     ` Andreas Schwab
2023-02-22 21:36       ` Joseph Myers [this message]
2023-03-02 16:43         ` Adhemerval Zanella Netto

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=a96cba53-8c4-2ac1-cd85-b087f15f101@codesourcery.com \
    --to=joseph@codesourcery.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    /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).