From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 98246385DC0C; Sat, 22 Jul 2023 01:12:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98246385DC0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689988359; bh=Gt7tlSTqOAiDP1XFaFukvrXpStovpt80j1GbyNCuexE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qbxdypNAHFA6NVqNs5iNsezC+EBvzRBQYO6oej9KVjIgx4Zp5VsJIrFBtMFA5F8NO SBuDRstEWtP8zSPXq3q1VAFCZUNPLREXOG5mgyv1wPR6Cf25W3+HePMCVu885XPJXq DVmUAQHKZTHZfVtXJFY8nN0QbyKcPg2xuzgMCafI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110774] Ambiguous partial ordering with non-dependent function parameter type Date: Sat, 22 Jul 2023 01:12:38 +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.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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=3D110774 --- Comment #3 from Andrew Pinski --- Take: ``` template struct A { typedef char* type; }; template char* f1(T, char*); // #1 template long* f1(T*, typename A::type*); // #2 char *t; char **t1; long* p0; long *p1 =3D f1(p0, t1); // choses #2 char* p2 =3D f1(p0, t); // choses #1 ``` GCC, MSVC, and clang all compile the above. So is it only an issue with nullptr where it could chose either?=