From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F3483858C98; Sat, 23 Dec 2023 09:37:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F3483858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703324228; bh=pnx3SyU3domX8iE69LHpi37yLTDcZNrr7/qk208TnXM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S567yyX5EaXwK5IKdy47Wnj5mWX2dgsgI9FeMwa2xFDrw59424I1Vuhlc0ML1ULpK bjxqBK6k1Nsj2Qp08+W+illoM3Z/SnNgvV9mrJe2pDluydat9oBhRuSW5fZGnloomy GyttZi95Nr1JAPiis30j5Ao/BEalmaeMbT4CjcS0= From: "andysem at mail dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2 Date: Sat, 23 Dec 2023 09:37:01 +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: 11.4.0 X-Bugzilla-Keywords: ABI, documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: andysem at mail dot ru 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=3D113099 --- Comment #3 from andysem at mail dot ru --- I think, a failing dynamic_cast would not be useful as this would make std::use_facet unusable with -fno-rtti. Re. ODR violation in the latest code, while it is true that the dynamic/static_cast is not reachable for the standard facets, it is still p= art of the function definition and the compiler is free to generate code that t= akes it into account. Note that the shortcuts for the standard facets are implemented with conditional if-constexpr, which will turn into regular ifs= if libstdc++ is compiled in pre-C++17 mode. Which, I think, is the default, is= n't it? I think, the ODR violation is still worth fixing.=