This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TR1 Math Special Functions


Gabriel Dos Reis wrote:
On Thu, 8 Feb 2007, Ian Lance Taylor wrote:

| Paolo Carlini <pcarlini@suse.de> writes:
|
| > >  Or is there a __builtin_isnan to use?
| > >
| > Maybe that will just work! ;) I just tried and in mainline apparently
| > we are able to fully expand it without library calls. I would ask Ed
| > to try simply use the builtin and regtest on as many targets he
| > can. It would be nice if a compiler guy could confirm that such
| > library calls are never issued for __builtin_isnan irrespective of the
| > target. I'm CC-ing Ian... Apparently the documentation is a little
| > weak about such builtins..
|
| __builtin_isnan will always be fully expanded.  It may generate a
| library call to, e.g., __nedf2, but it will never generate a call to
| isnan.

Sweet!

-- Gaby

So, would it be better for me to put these __builtin_isnan (actually behind a function that wraps this)
Or we could find all the functions wrapped in the C99_MATH guards for which we have such intrinsics and provide alternate implementations.


I think I'll start the former with a comment to replace it with just the std::isnan if/when we do the second option.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]