Page MenuHomeFreeBSD

fenv: Use slow path in C++
ClosedPublic

Authored by aokblast on Jun 4 2026, 5:48 PM.
Tags
None
Referenced Files
F163421932: D57450.id179226.diff
Thu, Jul 23, 2:02 AM
Unknown Object (File)
Tue, Jul 21, 1:58 PM
Unknown Object (File)
Mon, Jul 20, 11:52 AM
Unknown Object (File)
Wed, Jul 15, 7:25 AM
Unknown Object (File)
Wed, Jul 15, 7:25 AM
Unknown Object (File)
Thu, Jul 9, 10:09 PM
Unknown Object (File)
Tue, Jul 7, 7:12 PM
Unknown Object (File)
Mon, Jul 6, 5:44 AM
Subscribers

Details

Summary

C++ exposes cfenv functions svia using ::func. Our name-mangling
mechanism rewrites all function calls causing symbols such as
std::feclearexcept to be transformed into std::__feclearexcept_int.
Since no such function exists, compilation fails.

The using ::feclearexpect declarations themselves are unaffected because
they are not function calls, which further exposes the mispatch

As a result, enable the fast path only for C and fall back to the slow
path in C++.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable