[libc-commits] [libc] [libc][stdfix] Add abs functions for signed fixed point types. (PR #81823)

via libc-commits libc-commits at lists.llvm.org
Thu Feb 15 15:06:32 PST 2024


================
@@ -7,6 +7,13 @@ def StdcExt : StandardSpec<"stdc_ext"> {
       [],  // types
       [],  // enums
       [    // functions
+          GuardedFunctionSpec<"abshr", RetValSpec<ShortFractType>, [ArgSpec<ShortFractType>], "LIBC_COMPILER_HAS_FIXED_POINT">,
----------------
lntue wrote:

I don't think we need to add that, because right now, if users try to use fixed point types / functions / macros without the compile flag, it will be a hard compile error.  And if we add the warnings, users will keep seeing them even if they don't use it and got it transitively.  And in a worse scenario, where they try to build with `-Werror`, those warnings will become hard errors.

https://github.com/llvm/llvm-project/pull/81823


More information about the libc-commits mailing list