public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114484] #include <xmmintrin.h> changes ::abs in std::abs Date: Tue, 26 Mar 2024 17:39:26 +0000 [thread overview] Message-ID: <bug-114484-4-Hgmq4ZjdXv@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114484-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114484 --- Comment #9 from vincenzo Innocente <vincenzo.innocente at cern dot ch> --- We observe that including xmmintrin.h the behaviour of some code, notably abs(x), when x is float or double changes. And this depends on the platform as xmmintrin.h is x86_64 specific. Yes, is 20 years that is like that and people always wandered why abs(x) was behaving differently in different parts of the code and now asking why it behaves differently on x86_64 and ARM. The workaround is obvious: use std::abs. I personally find very unconfortable that including (even through cascade) xmmintrin.h changes the behaviour of "abs(x)" If everybody on GCC side is confortable with this situation we will just take note and try to be more strict with code visual inspection.
next prev parent reply other threads:[~2024-03-26 17:39 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-26 14:44 [Bug c++/114484] New: " vincenzo.innocente at cern dot ch 2024-03-26 14:50 ` [Bug c++/114484] " vincenzo.innocente at cern dot ch 2024-03-26 14:59 ` vincenzo.innocente at cern dot ch 2024-03-26 15:30 ` [Bug target/114484] " pinskia at gcc dot gnu.org 2024-03-26 16:22 ` vincenzo.innocente at cern dot ch 2024-03-26 16:28 ` pinskia at gcc dot gnu.org 2024-03-26 16:36 ` redi at gcc dot gnu.org 2024-03-26 16:49 ` redi at gcc dot gnu.org 2024-03-26 17:02 ` pinskia at gcc dot gnu.org 2024-03-26 17:39 ` vincenzo.innocente at cern dot ch [this message] 2024-03-26 17:52 ` pinskia at gcc dot gnu.org 2024-03-26 19:37 ` redi at gcc dot gnu.org
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=bug-114484-4-Hgmq4ZjdXv@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).