public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <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 16:36:42 +0000 [thread overview] Message-ID: <bug-114484-4-5fNNK4CMVG@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 #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- But <xmmintrin.h> is not a standard C++ header, there's no guarantee it doesn't include <stdlib.h> (or any other header). For the specific case of <cstdlib>, you know that includes <stdlib.h> and always adds abs(int) to the global namespace, right? It's actually a bug that <cstdlib> doesn't always add abs(long) and abs(long long) to the global namespace too, see PR 89855. The standard says <cstdlib> might add the names to the global namespace, so you seem to be asking for something that is not required by the standard, and very difficult to implement (without replacing all libc headers).
next prev parent reply other threads:[~2024-03-26 16:36 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 [this message] 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 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-5fNNK4CMVG@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).