[Bug middle-end/25279] New: [4.0/4.1/4.2 Regression] Invalid diagnostic about implicitly defined built-in

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Dec 6 17:51:00 GMT 2005


#include <math.h>

int foo(double x)
{
  return round(x);
}

causes

$ gcc -c t.c
t.c: In function 'foo':
t.c:5: warning: incompatible implicit declaration of built-in function 'round'

the transformation of round to lround here done in convert_to_integer is
likely the cause for this.  Compiling with -std=c99 makes the warning
go away.


-- 
           Summary: [4.0/4.1/4.2 Regression] Invalid diagnostic about
                    implicitly defined built-in
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25279



More information about the Gcc-bugs mailing list