From patchwork Mon Nov 28 14:02:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Joakim_Nohlg=C3=A5rd?= X-Patchwork-Id: 26782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5688559wrr; Mon, 28 Nov 2022 06:03:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf4gRGnoxhZ112T2UavyfAptg+AQTlIkGEL5bID35eZluC8U2iFp0qhqgPxoS/QRXarud2q+ X-Received: by 2002:aa7:c759:0:b0:46a:b8e0:f73a with SMTP id c25-20020aa7c759000000b0046ab8e0f73amr15492887eds.425.1669644214048; Mon, 28 Nov 2022 06:03:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669644214; cv=none; d=google.com; s=arc-20160816; b=QELBxczN8sklX3b2wNuIawbuW6+Jkf2EsbYSej9in5DnxR3GBjUmm9AP697Yry3d56 xJs4Vyu8FOonwfiqjPewH5lqBJud8AqYbob7/pDsfpm54D9JcAjC8zZ2qfdrYZqYunG7 GWRsyLmGEqbelyNIeLk0ILg/i4tKX+E5kwfdpY1nms4K4w5Xew0d+/ebuFKtgFf6+diJ B9skJsJRf6Rj73yKHLNskjnVXDTeavXVVVOlSf2cz6OI8c32X0W2D4hDoorNQPVkD8TQ iKyTaDTZLpkWSNmvPFV6MEglZDmNX5KfFelY9dllrqQ8k9AFTfO6pAR6AY5rqo54yhuE US/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=+o3RnDzNImjxcxqBWMFhNAgQsIhuZHmhBCsXvxRKxMQ=; b=bSY5Q38W1oMALnG1ILXU2K+gKHYvLduX8t6AF0HAMIPZIbsiZ1o9EYVmDhpc7/Ykro wadOWXstGJSNn4TgSNW+aTwlNNG6fPOW7LYVPN/U8hwJmxMDqkIz6MaLwhOvht9dmJb5 kfUOZoqIhyIp6bl+zidiQMI8QNESGcUnQ04UGm+kPFyNTyw9TXI/c8970lWLu/zdtlLA Nwa1VU7Jj51vUkfO/K73Rpl4f0Ix1k6AyRjZ+aFqfGSbdsvSyqkMfDP9HA9goN7gmxaR JGQeZ0xyAAgtsSzB1w2gtLUTjTHwfQve3o7tuFDii6faPS6HXsdbT7KpvZxf9cp9FPjN uKPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nohlgard.se header.s=google header.b=gYUo7LzW; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id eq9-20020a056402298900b00459060fce1bsi8987900edb.574.2022.11.28.06.03.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 06:03:34 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@nohlgard.se header.s=google header.b=gYUo7LzW; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A071738432F0 for ; Mon, 28 Nov 2022 14:03:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by sourceware.org (Postfix) with ESMTPS id 7A633384F6DA for ; Mon, 28 Nov 2022 14:03:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A633384F6DA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nohlgard.se Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nohlgard.se Received: by mail-lf1-x12e.google.com with SMTP id p8so17472491lfu.11 for ; Mon, 28 Nov 2022 06:03:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nohlgard.se; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+o3RnDzNImjxcxqBWMFhNAgQsIhuZHmhBCsXvxRKxMQ=; b=gYUo7LzWKzgUUg+mBmVUVS1IUTi9p7mJFNDwBNQCCfbN5t75WcACpHec3YA4ywLywU TzKeVVGwpOIH4Ct33G1I/IPynQnfRuaaZ6Fy4BwLgdDK33edS4zxGJF1Kf/Q6Upkrfji nvcgpamwCCw4y9s90DeZf6nR+BqB+awo5Gh7k5Y2MQscrvtysLKDWzp34e5TBMnzR2sg OB4yU/6YWTO9aZ5kyhHxEz2M/nVzfDlo/Vm0TSEejGD8UjlDVD41/TXzgHG8+gQU1/T7 7ush5vknj5Lq4jyLBAv51T2vipcgnx5ovsq6pfT4xuW+PzpZx1RkbDiqoZaTfqN658Nq Y68Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+o3RnDzNImjxcxqBWMFhNAgQsIhuZHmhBCsXvxRKxMQ=; b=VXzKGduBDB+Jat2QQe6i2FjmHzJblBDrAbeKqNA/5PQOmJVVOSvmiI9kDVl3LUP1Me 5YVvXP+R0o26SfGpTzNoxRGg2PTnDTYB6CdlpqEUKBIey1kazU3Q7rwvlSnyR9M2k0PL bvydmYhZ8LBfwblcs809uqeIObzQkmlI+ajA8KPwldZgtClpTlSxmVlbSwC17PJolGQm ALafI25tAPGGRavFfuyU2dET3UaaymtwSMDt9Jq/wANdMFWS4YM+u+IwfQwyxzsu/+X9 G2QqyuDDs0CIiJQXpK8WhY/DMeNgo3fkla6sdQVy8Uo7kQ2sm0C+anFCiGEbYzJ1Imky jwKA== X-Gm-Message-State: ANoB5pmswgIoZ2QIWxgeHkZj7kNqhcYKUJnn6b4cSE7DFiqSBccT/YtO ZlZreRlO23KtNB595qX9vp71QdyBFrVU0Q== X-Received: by 2002:a19:4f56:0:b0:4af:cd2:f8df with SMTP id a22-20020a194f56000000b004af0cd2f8dfmr16670938lfk.586.1669644179337; Mon, 28 Nov 2022 06:02:59 -0800 (PST) Received: from cppdev.jnohlgard-laptop (81-26-241-118.customers.ownit.se. [81.26.241.118]) by smtp.gmail.com with ESMTPSA id a21-20020ac25e75000000b004ab4ebb5d92sm1734561lfr.5.2022.11.28.06.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 06:02:58 -0800 (PST) From: =?utf-8?q?Joakim_Nohlg=C3=A5rd?= To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Joakim_Nohlg=C3=A5rd?= Subject: [PATCH] c++: Fall back to global cpp spec if CPLUSPLUS_CPP_SPEC is not defined Date: Mon, 28 Nov 2022 15:02:51 +0100 Message-Id: <20221128140251.4076484-1-joakim@nohlgard.se> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750748851303745697?= X-GMAIL-MSGID: =?utf-8?q?1750748851303745697?= When CPLUSPLUS_CPP_SPEC is set to a string literal it is not possible to modify it through external spec files by renaming the original cpp spec and replacing it because the compiler cpp_spec will still point to the original, renamed cpp spec. Not defining CPLUSPLUS_CPP_SPEC makes gcc.cc fall back to using the same cpp spec as the C compiler when substituting %C in spec strings. gcc/ChangeLog: * defaults.h (CPLUSPLUS_CPP_SPEC): Remove default definition. Signed-off-by: Joakim NohlgÄrd --- gcc/defaults.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gcc/defaults.h b/gcc/defaults.h index 376687d91b1..223460ef239 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -783,14 +783,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif #endif -/* By default, the preprocessor should be invoked the same way in C++ - as in C. */ -#ifndef CPLUSPLUS_CPP_SPEC -#ifdef CPP_SPEC -#define CPLUSPLUS_CPP_SPEC CPP_SPEC -#endif -#endif - #ifndef ACCUMULATE_OUTGOING_ARGS #define ACCUMULATE_OUTGOING_ARGS 0 #endif