This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/54130] Recognize builtins with bool return type


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54130

--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-07-31 22:12:51 UTC ---
On Tue, 31 Jul 2012, glisse at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54130
> 
> --- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> 2012-07-31 20:13:38 UTC ---
> (In reply to comment #5)
> > If your system headers declare isnan with bool return type I advise making 
> > fixincludes fix them.
> 
> But the C++ standard requires a bool return type, using fixinclude to replace a
> standard prototype with a non-standard one is strange...

C++ may also require functions rather than macros in various cases.  It's 
the job of the libstdc++ headers, provided by GCC, to provide a (probably 
inline) isnan function meeting the C++ requirements, replacing the C 
library's macro when building for C++.  Likewise all the other cases where 
C++ and C requirements for standard headers differ: the fix is in headers 
in one form or another rather than built in to the compiler.


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