| Message ID | 20260804085640.90357-1-iain@sandoe.co.uk |
|---|---|
| State | New |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE74A4BB24EF for <patchwork@sourceware.org>; Tue, 4 Aug 2026 08:57:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE74A4BB24EF Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sJEa36Uv X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 49FC04BAE7CC for <gcc-patches@gcc.gnu.org>; Tue, 4 Aug 2026 08:56:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 49FC04BAE7CC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 49FC04BAE7CC Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785833806; cv=none; b=AM6+mkR1UgOiHFTlVwe/xTcZCD0YF0dAKtZkrRJOrWWwm9etnYms5k1KruzxfUc+KlFQ3k+rOijwhLlRcouIggESUEsh1F2O6wlja18tIlyGGOCB0uEyGHa6qmu7UEAy+RY/0xKa5hSviZe4dvA6HW1+67rQltLvv1cesR4a/W4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785833806; c=relaxed/simple; bh=7yuO8GcG9SfvJnP3mUYh4m5LNi5dfEiaPUkObNIHI0I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ul6xDSknA+hWtNtiCNVVvefAnZ2pAL9dFjNHPJaKa2snsF7ceSGuc7Coc2sjtv21bSTG+FuOfFfrfd479I1Od4/Foz+Zh6GwaTjxp+rTP6eoYsTgNvmO58GVDNaBwUB4xfQ/3vB2kpGnu4n1xtDRGFKayhIZgX0FETgiH1IQE10= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sJEa36Uv DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49FC04BAE7CC Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-47f7854678cso2187224f8f.1 for <gcc-patches@gcc.gnu.org>; Tue, 04 Aug 2026 01:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785833805; x=1786438605; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=99IWvshhVfuanItZwGvxzGlPL9QhiiIqh1Lnv5BQJC0=; b=sJEa36Uv3lPqJE0Wc9MU0tIqMPzx1L+QS+YyaUsQmjCDHD0L/Gwb+cnN3LRtmLhzol jN6cGUQLaczudf+XBGCBpVMwHskQVd0oOZKngqnXiwv39QnW6JX9RBw4Fn0LAhWDpmlG QeIfg+kdE643Gt+Yyfv5r+YSqhIv0SjKlbt9cVQ38C6okz9fXv8BjG915mo7ZxCdH8dd 5orbPHBxnxHwCoeibV5NrXGeK6Fw4wyMcAKKx1cf49NbfN3LpoOVHd5lWj3zFhedLoKr eyJsVhP5yibLUkZWKRH4EoPA2FnYycQ19tIPtxJCM7geTMfAkzM6kVJviOA716slb+tX OhXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785833805; x=1786438605; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=99IWvshhVfuanItZwGvxzGlPL9QhiiIqh1Lnv5BQJC0=; b=fEqVlJyQIgfk8TEiJyOvhqJGwH8zUnYpgBlJVPljHV9Ctt0x7KlI7p+UKm/OHhsM9X gxvnjhaQ337y7jRYI5y0KU2jxB8T8Wj4bHZtbvoZxwTLmGb3Z4YCjmANId+296HkPNi0 PLToZzxGYQNqJxoP1FVTuEUJ8W0NHTb07Wc16rVatMTeu7Jkuy0lXDVZDQNCpOcScZyi xBWxXnyhFeNfDoFKKt6X9znOoHSbTEoMyNLOrq1HoGX7TvLoJDFX33fHMhjnRAXp2Zy7 MY/4Xv5Wlh+H3bze1/jp5Lyns5uh1bmKqWjTuGnaewlqO8ajPt+26FzyPyXhmQCYW3Db 28zA== X-Forwarded-Encrypted: i=1; AHgh+Rpin8Qu5bpRCD1aTYp+JhYtnMGDByLpXJoh4w8oii5H6FF/i4bteHYXuAjNmN8a2A7rLt3+A/nEdpuLXg==@gcc.gnu.org X-Gm-Message-State: AOJu0YyFpgqKec/B5UajSfYhTbj/aBiXF/Cm/XIhh4HwO2UZF7Hdj0E0 AFzotQvc/41m4lFUcZZE7/UZPnM03tQKfrEXXuMn88lil/kcWsVhK6MZ X-Gm-Gg: AR+sD11guLtok9OfXL118BlctA2LOdfPaFbCIiI9psqo7iyDp1K11KIZ0KwpyEYWb4c kfcc0i73F6r2ZnGI2CV1giWH1vrLTVNG4NO12afwNyOUw6Nw6YyKw1vM3wphTrU/HMmXcqzaLcg AMqbolq6ZlH7HO+ViSdAibG5jodO+wmEUixeaxG3P1DnbbJbhsVKrCwu6Lsnv1G8wXIyMgFq68K qSRlmQLTp/ZRFNeLBF7gINBZ8EotrmZ/6O5ENxUqh0e7jaEN4rXF3kRq4ol3SLVkCI6mZdhaxef xwLkfpdUPgTKKkVCHMOtjOUOjeheufk4rsrZkdcdXmvZpoSo8/lySqVsPaHFFhIkFrXrKbOXOg8 Ptaz2PMvgswug86CHzJs0MGUGsn38JnjiFi/igdXzuf4Bt0heJuOtcq/+lnkRCVZ3bstNqDbIZy O0+TCBsQqkIyUvg5NSq5OX/iP6qxUCN8WK6RZ2PxwoY+68mW4TA9RmBdjkyiWcitWAtUQ3rMWy+ HXGWJs0CKPSrCKJkTe6znoYeptlhhMN7HEOrT0a8zOP0utu X-Received: by 2002:a05:6000:41c4:b0:47f:838c:4256 with SMTP id ffacd0b85a97d-47fda48c067mr35205648f8f.16.1785833805007; Tue, 04 Aug 2026 01:56:45 -0700 (PDT) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd41e2961sm45553327f8f.13.2026.08.04.01.56.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Aug 2026 01:56:44 -0700 (PDT) From: Iain Sandoe <iains.gcc@gmail.com> X-Google-Original-From: Iain Sandoe <iain@sandoe.co.uk> To: jason@redhat.com, alex.coplan@arm.com, gcc-patches@gcc.gnu.org Subject: [PATCH] c++/objective-c++; Do not claim feature(modules), it is clang-specific. Date: Tue, 4 Aug 2026 09:56:30 +0100 Message-ID: <20260804085640.90357-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, CLAIM_SUBJECT, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: iain@sandoe.co.uk Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
c++/objective-c++; Do not claim feature(modules), it is clang-specific.
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_gcc_build--master-arm | success | Build passed |
Commit Message
Iain Sandoe
Aug. 4, 2026, 8:56 a.m. UTC
Tested on x86_64 darwin24 where we now correctly create the std module
sources and gcms. OK for trunk and relevant backports? thanks,
Iain
--- 8< ---
It appears that we misinterpreted the modules feature and that it is intended
to signal that the compiler supports "clang modules". These are a similar
approach to PCH and tightly coupled to clang AST - so not something that we
are realistically likely to implement.
Unfortunately, the macOS SDKs use this feature test to decide on some
header declaration ordering where it needs to change for clang modules.
This causes a fail to build the std. module sources on macOS meaning that we
get an empty std.cc. Our intention should be parity with/without -fmodules.
The solution is not to claim feature(modules) - C++20 modules are gated on
__cpp_module and so do not need it.
gcc/cp/ChangeLog:
* cp-objcp-common.cc: Remove claim to support clang modules.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
---
gcc/cp/cp-objcp-common.cc | 1 -
1 file changed, 1 deletion(-)
Comments
On 8/4/26 4:56 AM, Iain Sandoe wrote: > Tested on x86_64 darwin24 where we now correctly create the std module > sources and gcms. OK for trunk and relevant backports? thanks, OK. > --- 8< --- > > It appears that we misinterpreted the modules feature and that it is intended > to signal that the compiler supports "clang modules". These are a similar > approach to PCH and tightly coupled to clang AST - so not something that we > are realistically likely to implement. > > Unfortunately, the macOS SDKs use this feature test to decide on some > header declaration ordering where it needs to change for clang modules. > > This causes a fail to build the std. module sources on macOS meaning that we > get an empty std.cc. Our intention should be parity with/without -fmodules. > > The solution is not to claim feature(modules) - C++20 modules are gated on > __cpp_module and so do not need it. > > gcc/cp/ChangeLog: > > * cp-objcp-common.cc: Remove claim to support clang modules. > > Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> > --- > gcc/cp/cp-objcp-common.cc | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc > index 0a67aa8ce14..8c9930bb2f3 100644 > --- a/gcc/cp/cp-objcp-common.cc > +++ b/gcc/cp/cp-objcp-common.cc > @@ -148,7 +148,6 @@ static constexpr cp_feature_info cp_feature_table[] = > { "cxx_relaxed_constexpr", cxx14 }, > { "cxx_return_type_deduction", cxx14 }, > { "cxx_variable_templates", cxx14 }, > - { "modules", &flag_modules }, > }; > > /* Register C++ language features for __has_{feature,extension}. */
diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc index 0a67aa8ce14..8c9930bb2f3 100644 --- a/gcc/cp/cp-objcp-common.cc +++ b/gcc/cp/cp-objcp-common.cc @@ -148,7 +148,6 @@ static constexpr cp_feature_info cp_feature_table[] = { "cxx_relaxed_constexpr", cxx14 }, { "cxx_return_type_deduction", cxx14 }, { "cxx_variable_templates", cxx14 }, - { "modules", &flag_modules }, }; /* Register C++ language features for __has_{feature,extension}. */