This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8c54a11755f279bc43bffad74ea210d6fa1e86b0
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Nov 11 14:32:02 2026 +0100

    libs/libm/libm/lib_gamma.c: Rename sinpi() to sin_pi().
    
    GCC 16 has sinpi() of C23 as a built-in function.  The static helper
    sinpi() of lib_gamma.c shadows it, and the build with -Werror stops:
    "declaration of 'sinpi' shadows a built-in function [-Werror=shadow]".
    
    Rename the helper to sin_pi(), the name of the same helper in
    lib_lgamma.c.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 libs/libm/libm/lib_gamma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libs/libm/libm/lib_gamma.c b/libs/libm/libm/lib_gamma.c
index 4549e243db4..4b3c66992c6 100644
--- a/libs/libm/libm/lib_gamma.c
+++ b/libs/libm/libm/lib_gamma.c
@@ -151,7 +151,7 @@ static const double g_fact[] =
 
 /* sin(pi x) with x > 0x1p-100, if sin(pi*x)==0 the sign is arbitrary */
 
-static double sinpi(double x)
+static double sin_pi(double x)
 {
   int n;
 
@@ -315,9 +315,9 @@ double tgamma(double x)
     {
       /* reflection formula for negative x */
 
-      /* sinpi(absx) is not 0, integers are already handled */
+      /* sin_pi(absx) is not 0, integers are already handled */
 
-      r = -pi / (sinpi(absx) * absx * r);
+      r = -pi / (sin_pi(absx) * absx * r);
       dy = -dy;
       z = -z;
     }

Reply via email to