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 19:59:50 +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 #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-07-31 19:59:50 UTC ---
On Tue, 31 Jul 2012, glisse at gcc dot gnu.org wrote:
> I understand your comments, but I don't know what conclusion to take from them
> about whether gcc should recognize int/bool isnan(double) as a builtin...
Even for C, declaring library functions yourself is very much a legacy
possibility, not good coding practice. GCC matches builtins to declared
functions primarily to optimize code using the standard headers, not code
declaring them directly, and the cases where the type matching is fuzzy
are for the sake of some old system headers.
If your system headers declare isnan with bool return type I advise making
fixincludes fix them. If the declaration doesn't come from system headers
I don't think it's worth GCC optimizing for it.