From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A3B523858C60; Sat, 13 Jul 2024 13:08:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3B523858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1720876112; bh=lwyJ9uLtF2Vd7fMnX0HTLiY1tbTiLh/6rR5y9T/++44=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ydu2LdmN9bODNu/nVF94sEDl6mgtq17/+vtk0HRuK6sjWbrdmmlryeN2uPjhel8Sw WSE6DRjikeykRebkiV7ynlWCX0VtiQktJCusPi66Bt6lDBJY0fvG/ebMFkLtQ88PNO cCA4X2QyIg3xgM0CF0Ue3isMamaWWb/PFl8O70sk= From: "unlvsur at live dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/115907] Libstdc++ and GCC itself should avoid glibc above 2.34 dependency Date: Sat, 13 Jul 2024 13:08:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: unlvsur at live dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115907 --- Comment #12 from cqwrteur --- (In reply to Andrew Pinski from comment #6) > There is NO fix inside gcc/libstdc++. > THe only fix is your build of GCC (which includes the target libraries) > needs to be build against the oldest version of glibc you support. This is > something which GCC cannot control. > THIS IS HOW linking and backwards compatibility works. Also if you don't think this is a bug. Explain this to me. Why C++ will use __isoc23_sscanf but C does not? #include #include int main() { const char *input =3D "42 Alice"; int number; int result =3D sscanf(input, "%d", &number); printf("Parsed number: %d\n", number); } g++ -S hello.cc -std=3Dc++11 g++ -S hello.cc -std=3Dc++14 g++ -S hello.cc -std=3Dc++17 g++ -S hello.cc -std=3Dc++20 g++ -S hello.cc -std=3Dc++23 Why they all use __isoc23_sscanf in the latest glibc 2.40. If we compile it with gcc gcc -S hello.c -std=3Dc11 gcc -S hello.c -std=3Dc14 gcc -S hello.c -std=3Dc18 gcc -S hello.c -std=3Dc23 Only C23 uses __isoc23_sscanf. It does not make any sense tbh.=