On Fri, 10 Jul 2026, Jacek Caban wrote:

On 7/10/26 08:45, Martin Storsjö wrote:
On Fri, 10 Jul 2026, Jacek Caban via Mingw-w64-public wrote:

---
mingw-w64-crt/math/fabsf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-crt/math/fabsf.c b/mingw-w64-crt/math/fabsf.c
index e7e9d8fa7..702b9d02c 100644
--- a/mingw-w64-crt/math/fabsf.c
+++ b/mingw-w64-crt/math/fabsf.c
@@ -8,11 +8,11 @@ float fabsf (float x);
float
fabsf (float x)
{
-#if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
-  return __builtin_fabsf (x);
-#elif defined(__i386__) || defined(_X86_)
+#if defined(__i386__) || defined(_X86_)
  float res = 0.0F;
  asm volatile ("fabs;" : "=t" (res) : "0" (x));
  return res;
-#endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) */
+#else
+  return __builtin_fabsf(x);
+#endif
}

This change does look ok from a technical point of view, as it simplifies the list of ifdefs. But is this a non-functional change, or is there any build configuration where it makes a difference? Even for arm64ec, it would hit the __x86_64__ case before. It would be good to clarify this, either what it changes, or that it indeed is only a cosmetic change.


It's a non-functional change, which I think is already clear from the commit message. I'd really rather keep the message for a simple four-line change simple.

Right, sure.

FWIW, I looked into it because without it, my other patch makes the check for defined(__aarch64__) redundant, but that doesn't seem like useful information to include.

Ah yes, you're right. With that context in mind I understand the intent of the patch, and the brief commit message as you have right now is good enough.

It was just when viewed in the context of the other change, without having all the details in memory when viewing it, that I wondered exactly what the motive was here.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to