On Wed, 14 May 2025, Yuao Ma wrote:

> Hi all,
> 
> This patch adds trigonometric pi-based functions as gcc builtins: acospi, 
> asinpi, atan2pi,
> atanpi, cospi, sinpi, and tanpi. Latest glibc already provides support for
> these functions, which we plan to leverage in future gfortran implementations.
> 
> The patch includes two test cases to verify both correct code generation and
> function definition.
> 
> If approved, I suggest committing this foundational change first. Constant
> folding for these builtins will be addressed in subsequent patches.

Note that either this change, or a subsequent one that makes the built-in 
functions do something useful, should also update extend.texi, "Library 
Builtins", to mention the new functions.  (The text there doesn't 
distinguish existing C23 built-in functions, such as exp10 or roundeven, 
from those that are pure extensions, but addressing that is independent of 
adding new functions to the list.  Also, I'm not sure these sentences with 
very long lists of functions are really the optimal way of presenting the 
information about such built-in functions; maybe Sandra has better ideas 
about how to document this, but again that's independent of adding new 
functions.)

The commit message should reference PR c/118592 (it's not a full fix, but 
it's partial progress towards the full set of built-in functions / 
constant folding).

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to