From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 42C353858CDA; Tue, 26 Mar 2024 17:39:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42C353858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711474767; bh=FFv+LQAnpA0SLwJAGsogZqcmlTa5DQHiOB2q4KBvRrM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=olMkV+K38MdkRvkupcYUJfWpFHEiaxL5xisCKAwG0PPfauGtfTRLJ616lk0V/zqgO QrO3YIEKfRa/LCOVZogxjuUriCjT7YV0ohMBsOjTL+kosrMXv/e1b6RyFtsOZ7aEHU xO+PBOxLSI6QJS3RNzuaRWdmu0+IoX33gAmq8CaU= From: "vincenzo.innocente at cern dot ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114484] #include changes ::abs in std::abs Date: Tue, 26 Mar 2024 17:39:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vincenzo.innocente at cern dot ch X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114484 --- Comment #9 from vincenzo Innocente = --- 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)"=20 If everybody on GCC side is confortable with this situation we will just ta= ke note and try to be more strict with code visual inspection.=