Re: [PATCH] newlib: change static to __fenv_static for fe{enable,disable,get}except

"Richard Earnshaw (lists)" <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On 03/07/2025 15:48, Radek Barton wrote:
> Hello.
> 
> Thank you for your suggestion.
> 
> BTW, what is the current semantics and use case for the __fenv_static macro?
> 
> Radek

Outside of building newlib I think it's always expected to expand to 'static', so that users get a 'static inline' function (never creates a globally visible symbol, even if not inlined).  When building newlib (specifically libm/machine/*/fenv.c) it's defined to be empty so the functions are marked simply 'inline'; the lines in that file like 

extern inline int feclearexcept(int __excepts);

then cause a real function to be generated for export from the library.

The functions your working on remain static so never get a real instance within the library, so on ELF based platforms they simply do not exist unless _BSD_SOURCE has been defined.

R.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.