From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 98FB7396E83B; Thu, 17 Nov 2022 10:23:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98FB7396E83B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668680618; bh=3j4CgS3RzlJT63Nexu+wXSwLwUWLFIxXpeXrzGOX5nY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i45lcezGeb6He1I4j2f8m5NxGuFPWg5LDCpoNlwnhueaFwmVpdFKsDZgUDNR3mdbn XDsFO2bjXV5WmIfcKhMfk5ttB36wHHAqq5kWYd1hgPTr0ohkEQl9pK0lLiwtz1zFeA MD2/9WfMm5cjG7qyQZQvl2WyvWfvYYrt/xouWgvc= From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101747] Two-argument version of attribute malloc does not perform overload resolution Date: Thu, 17 Nov 2022 10:23:30 +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: 11.2.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ro 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: cc 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=3D101747 Rainer Orth changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ro at gcc dot gnu.org --- Comment #2 from Rainer Orth --- I've recently run into what seems to be the same issue, cf. GDB PR build/29= 791 for details: all of gdbsupport fails to compile with gcc 12.2.0 on Solaris = like this: In file included from /usr/include/sys/time.h:448, from ../gnulib/import/sys/time.h:39, from /usr/include/sys/select.h:27, from ../gnulib/import/sys/select.h:36, from /usr/include/sys/types.h:665, from ../gnulib/import/sys/types.h:39, from ../gnulib/import/stdio.h:58, from /vol/src/gnu/gdb/hg/master/dist/gdbsupport/common-defs.h:86, from /vol/src/gnu/gdb/hg/master/dist/gdbsupport/ptid.cc:20: ../gnulib/config.h:1693:72: error: =E2=80=98malloc=E2=80=99 attribute argum= ent 1 is ambiguous 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ^ ../gnulib/config.h:1693:72: note: use a cast to the expected type to disambiguate ../gnulib/config.h:1693:72: error: =E2=80=98malloc=E2=80=99 attribute argum= ent 1 is ambiguous The preprocessed testcase (not reduced) is attached to that PR: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29791 Unfortunately, nobody has been able to determine yet where exactly the ambiguity lies, and unlike other cases, g++ doesn't show that. Any suggestions on ho= w to proceed?=