From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0B4C93858C53; Sat, 27 May 2023 10:39:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B4C93858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685183983; bh=6IvFdrNwVl77nwgLqHurRaqKTlDxHN6oLdEkuQKrYVw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=J0w7KvbJeYml57dN50Hj4FxbBide19k/1o0HN3xkzGzvmDkSqruXr5dsGGeocsX3o 9IOB6xIXpHzHe6Kd4PYXp5TRgSgtKq2m17N6EsPdcpPULN8xq81btkAx8rN1yJmNpy 955MFPUHfIlVT+zOztOyCseMS44dLcQtqS0QXtGc= From: "fw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110000] GCC should implement exclude_from_explicit_instantiation Date: Sat, 27 May 2023 10:39:42 +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: fw 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: 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=3D110000 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fw at gcc dot gnu.org --- Comment #5 from Florian Weimer --- How hard is this to use in practice? With current Clang, this: =E2=80=9C template class S { __attribute__ ((visibility ("hidden"), exclude_from_explicit_instantiatio= n)) int f1 (); int f2 (); }; template int S::f1 () { return 1; } template int S::f2 () { return f1 (); } template class S; =E2=80=9D still inlines S::f1 into S::f2. This may not threaten future evolution of the implementation in this particular case, but it would certa= inly be helpful to have some guides similar to . Clang's attribute documentation describes what happens, but it doesn't comm= ent on the actual implications for ABI compatibility.=