From patchwork Wed Jun 12 20:36:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1947121 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DI6CvEIF; dkim-atps=neutral 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=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vzy936BhHz1yXv for ; Thu, 13 Jun 2024 06:40:23 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EA9643882ACF for ; Wed, 12 Jun 2024 20:40:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C88423882100 for ; Wed, 12 Jun 2024 20:39:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C88423882100 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C88423882100 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718224800; cv=none; b=I0LQlnI7NSYgEGh46UzTfn2Uy8PFtRkBhdvpcnh0VGZBe1JEKoMdBX3aMyyYZ7sScad5d7s+qiUJIMauUFByJNyzosArqE20CJE8THEro3q6klfIXbjlz8usDyJv1eX1EzLTCiCmxVYY0cXZQfRylPMxfJvhbS5JSSwyQn9Lw5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718224800; c=relaxed/simple; bh=pDVsurPhi+UxWmLdzF0Dj1gZUrIeErHDKxxpGw4OBs8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IN+9dR+UxwckresDL5Gs1bQ74ZathTBxFZ34/PsU3zQ+yJhdC4s66f2j8ciCCISHrWTyouJ11AOalirTs9gIi0NFFFxIuHWRROu9SnqATjYalWlFt1u/Y7y7XzFNGBHx/JBH+lwT5IhBspVgXJ5Yc6fcz43xqo+HfqYvM8d+sDE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718224798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sPS1ghiPDG+GlhvzDHORCpy2ASCf/wPE2hZQuLbskos=; b=DI6CvEIFWZjlJD3OstxOij0WpA2OvhlkCFTBWnvHayj2i3/UKYi7w5CmafbtCimCV/3DJe jAtrzjdbb7c/jVbW/pqQLjcma31YEZHrZ5cmL6hIcWX8VNkfBlRBD6rG2YlT3bo0zs+3B8 LgfzvefBlMqFvQINjuz0PqmwFns95W0= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-i0Vm9FzoNoGPyW8gQt04bQ-1; Wed, 12 Jun 2024 16:39:55 -0400 X-MC-Unique: i0Vm9FzoNoGPyW8gQt04bQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 321F419560AD; Wed, 12 Jun 2024 20:39:54 +0000 (UTC) Received: from localhost (unknown [10.39.192.128]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9EC3119560AA; Wed, 12 Jun 2024 20:39:52 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Fix unwanted #pragma messages from PSTL headers [PR113376] Date: Wed, 12 Jun 2024 21:36:17 +0100 Message-ID: <20240612203951.879750-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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.30 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 This is enough to fix the regression for now. I think we should revert more of the upstream change that switched #if to #ifdef everywhere, as much of it was unnecessary and causes issues for people combining our pstl headers with the one's in Intel oneAPI (which share the same names for pstl_config.h and the config macros, but don't agree on whether to test them with #if or #ifdef). Tested x64_64-debug. -- >8 -- When we rebased the PSTL on upstream, in r14-2109-g3162ca09dbdc2e, a change to how _PSTL_USAGE_WARNINGS is set was missed out, but the change to how it's tested was included. This means that the macro is always defined, so testing it with #ifdef (instead of using #if to test its value) doesn't work as intended. Revert the test to use #if again, since that part of the upstream change was unnecessary in the first place (the macro is always defined, so there's no need to use #ifdef to avoid -Wundef warnings). libstdc++-v3/ChangeLog: PR libstdc++/113376 * include/pstl/pstl_config.h: Use #if instead of #ifdef to test the _PSTL_USAGE_WARNINGS macro. --- libstdc++-v3/include/pstl/pstl_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/pstl/pstl_config.h b/libstdc++-v3/include/pstl/pstl_config.h index 7157a8a492e..6fae15460ea 100644 --- a/libstdc++-v3/include/pstl/pstl_config.h +++ b/libstdc++-v3/include/pstl/pstl_config.h @@ -177,7 +177,7 @@ #define _PSTL_PRAGMA_MESSAGE_IMPL(x) _PSTL_PRAGMA(message(_PSTL_STRING_CONCAT(_PSTL_PRAGMA_LOCATION, x))) -#if defined(_PSTL_USAGE_WARNINGS) +#if _PSTL_USAGE_WARNINGS # define _PSTL_PRAGMA_MESSAGE(x) _PSTL_PRAGMA_MESSAGE_IMPL(x) # define _PSTL_PRAGMA_MESSAGE_POLICIES(x) _PSTL_PRAGMA_MESSAGE_IMPL(x) #else