From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0919F3858D32; Fri, 4 Nov 2022 20:39:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0919F3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667594385; bh=62ty94+j9tZR2zPoVUz8XS0LlpKR/2Z/CLuhjjfBvHA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ib3NmXnpYc4dDr3BE9gIYPKHkt16OZXXMWzb9Ri/AAZ795IccYSX1KBUWb1m36euQ SnVe7DukMcIueFgeI3uwMuhuhmI26N0OKK1fGJZ1bieqD4Ee6Z6iMgks1k5jsUsHMP woP/3RliqaddLs83O12Mg7ZzyNtlT44csGdm9WPw= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107466] [12/13 Regression] invalid -Wnarrowing error with std::subtract_with_carry_engine Date: Fri, 04 Nov 2022 20:39:43 +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: 12.2.0 X-Bugzilla-Keywords: diagnostic, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_reconfirmed_on bug_status component everconfirmed 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=3D107466 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-11-04 Status|UNCONFIRMED |NEW Component|c++ |libstdc++ Ever confirmed|0 |1 --- Comment #4 from Jonathan Wakely --- That's not the standard. That text comes from a general requirement in [rand.req.gen] that applies to all engines and adaptors. The more specific requirements for subtract_with_carry_engine say it uses a specialization of linear_congruential_engine that is ill-formed. More specific requirements overrule more general ones. I've created a new LWG issue so this will get fixed in the standard. The be= st suggestion so far is that it should use linear_congruential_engine instead of using its own result_type. Reassigning to component:libstdc++.=