public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gerald Pfeifer <gerald@pfeifer.com>
To: Martin Jambor <mjambor@suse.cz>
Cc: Jakub Jelinek <jakub@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	 Michal Jires <mjires@suse.cz>
Subject: Re: [wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior
Date: Wed, 1 May 2024 16:05:30 +0200 (CEST)	[thread overview]
Message-ID: <1d9a90f2-399d-ddbb-8e76-09382eaae264@pfeifer.com> (raw)
In-Reply-To: <ri65xvyzha9.fsf@virgil.suse.cz>

On Tue, 30 Apr 2024, Martin Jambor wrote:
> +<h3 id="gcc-targte-pragma">Pragma GCC Target now affects preprocessor symbols</h4>

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 <code>#pragma GCC target</code>."

> +macros has changed in GCC 14.  In GCC 13 and older, the <code>GCC
> +target</code> 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 <code>-save-temps</code>, or better "the <code>-save-temps</code> 
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?

> +<p>
> +The fix in this case would be to remember
> +whether <code>pop_options</code> needs to be performed in a new
> +user-defined macro.

"The fix in this case is to remember" (or "...remembering...")

Gerald

  parent reply	other threads:[~2024-05-01 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 12:34 Martin Jambor
2024-04-25 12:41 ` Jakub Jelinek
2024-04-30 21:12   ` Martin Jambor
2024-04-30 21:30     ` Jakub Jelinek
2024-05-01 14:05     ` Gerald Pfeifer [this message]
2024-05-02 21:39       ` Martin Jambor
2024-05-03 23:37         ` Gerald Pfeifer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d9a90f2-399d-ddbb-8e76-09382eaae264@pfeifer.com \
    --to=gerald@pfeifer.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=mjambor@suse.cz \
    --cc=mjires@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).