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: 1709747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=nohlgard.se header.i=@nohlgard.se header.a=rsa-sha256 header.s=google header.b=gYUo7LzW; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NLRyD58Rkz23nQ for ; Tue, 29 Nov 2022 01:03:16 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53C9038451A3 for ; Mon, 28 Nov 2022 14:03:14 +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-Google-Smtp-Source: AA0mqf71FZYnH4Fkh/sZhvVyo/V2WuYJ9xmAeDXC7Kib19V5O4UU5H6SuKPH7S7697U4P1jBSE/i1g== 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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