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: unassig...@gcc.gnu.org ReportedBy: gli...@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.