From owner-freebsd-bugs Sun Jun 24 18:20: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id ED57B37B405 for ; Sun, 24 Jun 2001 18:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5P1K1j36322; Sun, 24 Jun 2001 18:20:01 -0700 (PDT) (envelope-from gnats) Date: Sun, 24 Jun 2001 18:20:01 -0700 (PDT) Message-Id: <200106250120.f5P1K1j36322@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Gregory Bond Subject: Re: bin/28390: atof incorrect when stdlib.h not #include'd Reply-To: Gregory Bond Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/28390; it has been noted by GNATS. From: Gregory Bond To: Tom Garcia Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/28390: atof incorrect when stdlib.h not #include'd Date: Mon, 25 Jun 2001 11:10:31 +1000 > atof returns random odd numbers when stdlib.h not #include'd, otherwise seems > to work fine. Calling std library functions (especially those returning anything except "int") without the appropriate header include is a bug in your program, and has nothing to do with FreeBSD or any other OS. You would get similar errors from a Windows C compiler. This particular instance is documented in the SYNOPSIS section of the man page for atof. This bug would also have been picked up by compiling with the "-Wall" flag. This PR can be closed. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message