Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Apr 2026 01:45:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 294214] clang builtin functions break libm
Message-ID:  <bug-294214-227-BwuKxoij9k@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-294214-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294214

--- Comment #6 from Steve Kargl <kargl@FreeBSD.org> ---
Ugh*ugh.

The addition of '#pragma STDC FENV_ACCESS ON' changes
clang's to agree with fmax(3).


% cc -o z fmax.c -lm && ./z
fmax( 0,  0) =  0 expecting  0
fmax(-0,  0) = -0 expecting  0 <-- FAILED
fmax( 0, -0) =  0 expecting  0
fmax(-0, -0) = -0 expecting -0


% cc -o z fmax.c -DWITH_PRAGMA -lm && ./z
fmax( 0,  0) =  0 expecting  0
fmax(-0,  0) =  0 expecting  0
fmax( 0, -0) =  0 expecting  0
fmax(-0, -0) = -0 expecting -0

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-294214-227-BwuKxoij9k>