From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 49DFF3858C53; Tue, 9 May 2023 10:57:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49DFF3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683629847; bh=YlOnjp1V/N62a6M8w8WWV3cvlxLxTvW0Qil55rv1sAo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NAz8EMoKVvdhnIOFIpdha0l4mcUrxQrqbxPQKo55AZs3cPpbP2iNuwctVqtrX2c9P FxevdL3lMssA2huy65UloSIUV9ofW6YDCJwewVMFuoV+WthFjUvw9p0l35bUzc5ae5 Ui4kKF6iQf1a3//tOKFnrdzhWSYA3lgkL/qD0f7c= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60512] would be useful if gcc implemented __has_feature similarly to clang Date: Tue, 09 May 2023 10:57:26 +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: enhancement X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: acoplan 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=3D60512 --- Comment #19 from Iain Sandoe --- (In reply to Alex Coplan from comment #18) > (In reply to Iain Sandoe from comment #16) > >=20 > > AFAIR the main blocker to progress was trying to decide how to represen= t the > > target/language/language version dependencies of the features and exten= sions > > (there's a rudimentary scheme at the moment but it probably is not flex= ible > > enough) >=20 > Can you elaborate on this a little? In particular I'd be interested to he= ar > about cases where the target matters. the first commit in my WIP branch is "generic support" (i.e. features that = are [intended to be] common to all targets) the second commit identifies a set of features that (I would want to be) supported on Darwin, but maybe not relevant to other targets. Of course, we hope the first set to be the largest. Targets like Darwin and Windows are more likely to need such things - where compatibility with external ABI and system tools means we're trying to comp= ly with design decisions out of our control. However, it is presumably conceivable that (say) variable length vector features could be relevant to aarch64 and risc-v but not elsewhere (I'm speculating here, so no concrete example or evidence).=