Bug 115453
Summary: | strtof is broken | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 2.1 | Reporter: | Ragnar Hojland Espinosa <ragnar> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 2.1 | CC: | fweimer |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-02-13 12:27:21 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ragnar Hojland Espinosa
2004-02-12 17:18:54 UTC
If you used -Wall option, GCC would tell you what's wrong: /tmp/x.c:3: warning: return type defaults to `int' /tmp/x.c: In function `main': /tmp/x.c:4: warning: implicit declaration of function `printf' /tmp/x.c:4: warning: implicit declaration of function `strtof' /tmp/x.c:4: warning: double format, different type arg (arg 2) The problem is that strtof, being ISO C99+ function, is not prototyped in ISO C90 compilations, as that would violate namespace rules. See info libc on Feature Set Macros. Compiling with -std=c99, -std=gnu99, -D_GNU_SOURCE or -D_ISOC99_SOURCE (and also #include <stdio.h> for printf while you're at it) will fix it up. |