This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54130] New: Recognize builtins with bool return type
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Jul 2012 20:43:24 +0000
- Subject: [Bug c++/54130] New: Recognize builtins with bool return type
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54130
Bug #: 54130
Summary: Recognize builtins with bool return type
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: glisse@gcc.gnu.org
Hello,
extern "C" int isnan(double);
int f(){return isnan(3);}
is optimized to "return 0;" because isnan is recognized as a builtin. However,
if I change the program to:
extern "C" bool isnan(double);
int f(){return isnan(3);}
the optimization is not done. I haven't seen any example in gcc sources of a
builtin that may be declared with several different prototypes.