https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115907
cqwrteur <unlvsur at live dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |---
Status|RESOLVED |UNCONFIRMED
--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #3)
> Note while glibc is backwards compatibility, it is not forward compatible.
> So if you build against the newest version of glibc, it will always use the
> newest symbols and that is by design.
I am pretty sure this is a bug in glibc.
https://sourceware.org/bugzilla/show_bug.cgi?id=31974
#include <features.h>
#include <stdio.h>
int main() {
const char *input = "42 Alice";
int number;
int result = sscanf(input, "%d", &number);
printf("Parsed number: %d\n", number);
}
This will always generate __isoc23_sscanf for g++ no matter what standard it is
while for C it only generates __isoc23_sscanf when user passes -std=c23.
Considering C++ does not even support 0B 0b for sscanf yet. It is perfectly
reasonable to say it is a bug in glibc.
However, libstdc++ should get rid of arc4random dependency.