glibc/sysdeps/ieee754
Joseph Myers dee2bea048 C2x scanf binary constant handling
C2x adds binary integer constants starting with 0b or 0B, and supports
those constants for the %i scanf format (in addition to the %b format,
which isn't yet implemented for scanf in glibc).  Implement that scanf
support for glibc.

As with the strtol support, this is incompatible with previous C
standard versions, in that such an input string starting with 0b or 0B
was previously required to be parsed as 0 (with the rest of the input
potentially matching subsequent parts of the scanf format string).
Thus this patch adds 12 new __isoc23_* functions per long double
format (12, 24 or 36 depending on how many long double formats the
glibc configuration supports), with appropriate header redirection
support (generally very closely following that for the __isoc99_*
scanf functions - note that __GLIBC_USE (DEPRECATED_SCANF) takes
precedence over __GLIBC_USE (C2X_STRTOL), so the case of GNU
extensions to C89 continues to get old-style GNU %a and does not get
this new feature).  The function names would remain as __isoc23_* even
if C2x ends up published in 2024 rather than 2023.

When scanf %b support is added, I think it will be appropriate for all
versions of scanf to follow C2x rules for inputs to the %b format
(given that there are no compatibility concerns for a new format).

Tested for x86_64 (full glibc testsuite).  The first version was also
tested for powerpc (32-bit) and powerpc64le (stdio-common/ and wcsmbs/
tests), and with build-many-glibcs.py.
2023-03-02 19:10:37 +00:00
..
dbl-64 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
float128 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
flt-32 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ldbl-64-128 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ldbl-96 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ldbl-128 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ldbl-128ibm Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ldbl-128ibm-compat C2x scanf binary constant handling 2023-03-02 19:10:37 +00:00
ldbl-opt C2x scanf binary constant handling 2023-03-02 19:10:37 +00:00
soft-fp math: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444] 2023-01-11 17:50:51 -03:00
ieee754.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
k_standardl.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libm-alias-finite.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00