From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF3A9388A831; Tue, 9 Jun 2020 13:43:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF3A9388A831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591710213; bh=jiOdOE9065nwm9DBAZWdKUxKIS0ZgapnNAVa+oOypHA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r3iQAHnNE8z+EgsRkpxePsQsI9m1wczCxbojVDvqhQUV01U7HOOaTJiv22Q62XWqZ FIbg4MtVdRX1yyxIragDB/57wj9c9OBbu8D6WnXSoHo1Sis0ArNgzpnE0owDsuhywi MjGePaG3d9eP0UmUCDQof/xrbjNWYBTqNLbxHRxQ= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95596] string literal wrong overload resolution (char* vs std::string) Date: Tue, 09 Jun 2020 13:43:33 +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: 10.0 X-Bugzilla-Keywords: wrong-code 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: bug_status everconfirmed cf_reconfirmed_on 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: Tue, 09 Jun 2020 13:43:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95596 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2020-06-09 --- Comment #2 from Jonathan Wakely --- Confirmed. Even with -std=3Dc++14 -pedantic-errors we still choose the wrong overload (and then give an error that the conversion is not allowed). There seems to be no way to disable the conversion from string literals to char* that has been deprecated for years.=