This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54130] Recognize builtins with bool return type
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 Jul 2012 22:12:51 +0000
- Subject: [Bug c++/54130] Recognize builtins with bool return type
- Auto-submitted: auto-generated
- References: <bug-54130-4@http.gcc.gnu.org/bugzilla/>
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.