public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54130] New: Recognize builtins with bool return type
@ 2012-07-30 20:43 glisse at gcc dot gnu.org
  2012-07-31  9:32 ` [Bug c++/54130] " rguenth at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-07-30 20:43 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-08-01 16:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-30 20:43 [Bug c++/54130] New: Recognize builtins with bool return type glisse at gcc dot gnu.org
2012-07-31  9:32 ` [Bug c++/54130] " rguenth at gcc dot gnu.org
2012-07-31  9:38 ` glisse at gcc dot gnu.org
2012-07-31 14:43 ` joseph at codesourcery dot com
2012-07-31 19:20 ` glisse at gcc dot gnu.org
2012-07-31 20:00 ` joseph at codesourcery dot com
2012-07-31 20:13 ` glisse at gcc dot gnu.org
2012-07-31 22:13 ` joseph at codesourcery dot com
2012-08-01  5:51 ` glisse at gcc dot gnu.org
2012-08-01  9:23 ` glisse at gcc dot gnu.org
2012-08-01  9:27 ` rguenth at gcc dot gnu.org
2012-08-01  9:29 ` rguenth at gcc dot gnu.org
2012-08-01  9:49 ` glisse at gcc dot gnu.org
2012-08-01  9:52 ` glisse at gcc dot gnu.org
2012-08-01 15:41 ` joseph at codesourcery dot com
2012-08-01 16:31 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).