From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F0263857C4A; Sun, 9 Aug 2020 15:16:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F0263857C4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596986163; bh=aXbEGtFvZj/XoH2yXZsqF3MN77MN/H2l6bPr5xONK3I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m31tSF7lJLF8E9BYeVv53h+s791v6WnPdg0dsYp41JhOn+8WB8Az6Kz3+kxsg2gqK TpMuH+Ke8c5kCzwfXxGVHMdJJ4IXUiM8eqJQiHZNGaqGe5JHYdMHECih7UdsHJOFLU 8TwTpWsVvYTwQm0zj57XLHs1X5SGGSzCYL3o36Fs= From: "natattak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96533] ICE with -Wunused-parameter when using three-way comparison Date: Sun, 09 Aug 2020 15:16:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: natattak at gmail 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2020 15:16:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96533 --- Comment #1 from Nathaniel Shead --- On further investigation, I suspect this is more general than just `-Wunused-parameter`; the error looks to be caused by any error occurring within `operator<`. For example, #include #include struct S {}; auto operator<=3D>(S, S) =3D default; template auto operator<(Lhs&&, Rhs&& rhs) { return rhs.nonexistent; } int main() { return std::less{}(S{}, S{}); } produces the same issue. I also discovered that the issue is only when the templated `operator<` has deduced type.=