This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


#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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]