[PATCH v3 07/10] stdio-common: Also reject exp char w/o significand in i18n scanf [BZ #13988]

Maciej W. Rozycki macro@redhat.com
Fri Mar 28 12:46:57 GMT 2025


On Tue, 25 Mar 2025, Joseph Myers wrote:

> > This is needed to prevent a localedata/tst-sscanf regression with 10/10,
> > but it is of course a fix for a bug on its own.  I don't know why GCC is 
> > unhappy with the 'I' modifier, this doesn't appear documented anywhere.
> 
> I added GCC format checking support for the 'I' scanf flag in 2000 (GCC 
> commit 4831bc8477cc012c0be6c8da357537016877cd6a).  At that time, it was 
> only supported for integer formats in glibc; support for 'I' with 
> floating-point formats was added in 2007 (glibc commit 
> ecb72bd5b640497474ceae8d5e991b88c0c032e2, so glibc 2.6 and later).

 Thanks for the clarification.

> Please file a GCC bug report for adding format checking support for 'I' 
> with decimal floating scanf formats, and add a comment giving that bug 
> number on the DIAG_PUSH_NEEDS_COMMENT call.  With that comment giving the 
> GCC bug number added, this patch is OK:
> 
> Reviewed-by: Joseph Myers <josmyers@redhat.com>

 Thank you for your review.  I've added:

  /* Avoid: "warning: 'I' flag used with '%f' gnu_scanf format [-Wformat=]";
     cf. GCC PR c/119514.  */

  Maciej



More information about the Libc-alpha mailing list