NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

standards/53393: rint isn't visible in some circumstances



>Number:         53393
>Category:       standards
>Synopsis:       rint isn't visible in some circumstances
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 24 20:30:00 +0000 2018
>Originator:     coypu
>Release:        NetBSD 8.99.19
>Organization:
>Environment:
NetBSD planets 8.99.19 NetBSD 8.99.19 (GENERIC) #0: Sat Jun 23 06:52:51 IDT 2018  fly@planets:/tmp/build/sys/arch/amd64/compile/GENERIC amd64

>Description:
fly@planets ~> cat test.c
#define _POSIX_C_SOURCE 200112L
#include <math.h>

int main() {
	double x = 1.2;
	(void)rint(x);
	return 0;
}


fly@planets ~> gcc test.c -lm
test.c: In function ?main?:
test.c:6:8: warning: implicit declaration of function ?rint? [-Wimplicit-function-declaration]
  (void)rint(x);
        ^~~~
test.c:6:8: warning: incompatible implicit declaration of built-in function ?rint?
test.c:6:8: note: include ?<math.h>? or provide a declaration of ?rint?



rint is standard C, so I think it shouldn't warn.
>How-To-Repeat:
Build pkgsrc/graphics/babl, get warning from gggl.c, investigate.
>Fix:



Home | Main Index | Thread Index | Old Index