From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F6363857C43; Wed, 3 Jan 2024 21:58:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F6363857C43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704319131; bh=TIvfLMqrk/10zZc8ynzZXLgAG/HhmBJduori2ueQCqg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=l8lvRfqfNqDI7yxdaQ35uJ8suo2pLOYnjgoRPn6fT8EmuzbBbXxgAEKSjzNIK7K2U VEiOtygViKxIwGtrEjeW5BsnaGl2AODPuhL5+A27dNnLMpBlnOoL0p2beMnRdRVde1 DNVpMnVwldLUDKCcYdbuBNHeXzVKtQCvidrPM1j0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113219] Overloaded ref-qualified conversion operator triggers bogus -Wconversion Date: Wed, 03 Jan 2024 21:58:51 +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: 13.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: bug_status resolution 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=3D113219 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski --- This is documented this way too: https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Warning-Options.html#index-Wc= onversion ``` For C++, also warn for confusing overload resolution for user-defined conversions; and conversions that never use a type conversion operator: conversions to void, the same type, a base class or a reference to them. Warnings about conversions between signed and unsigned integers are disable= d by default in C++ unless -Wsign-conversion is explicitly enabled. ``` Don't use -Wconversion if you don't wan this warning ... Note this warning was originally not part of -Wconversion but always on (in= GCC 2.95.3) and then in GCC 3.4.0 was moved to part of -Wconversion; this was PR 10784 was about even.=