From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hamza.pair.com (hamza.pair.com [209.68.5.143]) by sourceware.org (Postfix) with ESMTPS id BCE603858D20 for ; Wed, 1 May 2024 14:05:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BCE603858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=pfeifer.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=pfeifer.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BCE603858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.68.5.143 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714572340; cv=none; b=CTIjErh/AOGB/GUu2IdycW7ofm+vGR65ZzlZVNoDI3f6rOIQaofuueXHSXAc1kUjEMWI8hGy4dUk3v/xizCGSIibi//QZ0mgkSsBz7eN2DxS+6T+A/mgvqkdQqrnpLAb5FTSbZrOVCaKUCCvuQ/gQRbzpkmnmJnq52MLoIPT+SA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714572340; c=relaxed/simple; bh=4+kraOugnXw0o8PYLATPioeNUAQ0j6SPbqn95Aq+HDs=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=K+Q5rA432QOTBbD4vQHLmp9giPbGucLWYu4C1E3J/avQxku9Iz3CWTZa3B4ZPQ9Pil3AE3ExUtmvn1LGuaBtXnuTTxES/QIm8a2I/Td2ZRkD/ySVd0Ck5vQM/kGLJDhxBdJ8fzMMjQJzgRjTLp/4k7UOW7MshFL45oaPnvyl2P4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from hamza.pair.com (localhost [127.0.0.1]) by hamza.pair.com (Postfix) with ESMTP id EF21933E74; Wed, 1 May 2024 10:05:32 -0400 (EDT) Received: from daya.localdomain (188-23-56-169.adsl.highway.telekom.at [188.23.56.169]) (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 hamza.pair.com (Postfix) with ESMTPSA id 3DF8233E73; Wed, 1 May 2024 10:05:32 -0400 (EDT) Date: Wed, 1 May 2024 16:05:30 +0200 (CEST) From: Gerald Pfeifer To: Martin Jambor cc: Jakub Jelinek , GCC Patches , Michal Jires Subject: Re: [wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior In-Reply-To: Message-ID: <1d9a90f2-399d-ddbb-8e76-09382eaae264@pfeifer.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: mailmunge 3.11 on 209.68.5.143 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 30 Apr 2024, Martin Jambor wrote: > +

Pragma GCC Target now affects preprocessor symbols

Note the id: should be "gcc-target-pragma", though I even suggest to simplify and say "target-pragma". > +The behavior of pragma GCC Target and specifically how it affects ISA Seconding Jakub's "And here as well, perhaps even #pragma GCC target." > +macros has changed in GCC 14. In GCC 13 and older, the GCC > +target pragma defined and undefined corresponding ISA macros in > +C when using integrated preprocessor during compilation but not when "...the integrated preprocessor..." > +preprocessor was invoked as a separate step or when using -save-temps. "...the preprocessor..." and -save-temps, or better "the -save-temps option". > +This can lead to different behavior, especially in C++. For example, > +functions the C++ snippet below will be (silently) compiled for an > +incorrect instruction set by GCC 14. "functions" above looks like it's extraneous and should be skipped? > + /* With GCC 14, __AVX2__ here will always be defined and pop_options > + never called. */ > + #if ! __AVX2__ > + #pragma GCC pop_options > + #endif Maybe a bit subtle, I would not say a #pragma is called; how about invoked or activated? > +

> +The fix in this case would be to remember > +whether pop_options needs to be performed in a new > +user-defined macro. "The fix in this case is to remember" (or "...remembering...") Gerald