NetBSD Problem Report #9052
Received: (qmail 28711 invoked from network); 25 Dec 1999 10:18:43 -0000
Message-Id: <199912251018.TAA04975@edge.sky.yamashina.kyoto.jp>
Date: Sat, 25 Dec 1999 19:18:41 +0900 (JST)
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
Reply-To: taca@sky.yamashina.kyoto.jp
To: gnats-bugs@gnats.netbsd.org
Subject: cc(1) can't compile a file using <math.h> only.
X-Send-Pr-Version: 3.95
>Number: 9052
>Category: lib
>Synopsis: cc(1) can't compile a file using <math.h> only.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Dec 25 02:20:58 +0000 1999
>Closed-Date: Tue Jan 04 14:19:36 +0000 2000
>Last-Modified: Tue Jan 04 14:20:42 +0000 2000
>Originator: Takahiro Kambe
>Release: NetBSD-current 1999/12/24
>Organization:
>Environment:
System: NetBSD edge.sky.yamashina.kyoto.jp 1.4P NetBSD 1.4P (CF-M33) #69: Sat Dec 25 12:39:01 JST 1999 taca@edge.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/CF-M33 i386
>Description:
cc(1) can't compile a file using <math.h> only.
>How-To-Repeat:
o Sample file, sample.c:
#include <math.h>
double
a(n)
double n;
{
return sqrt(n);
}
o Compile result:
% cc -traditional -fno-builtin -c sample.c
taca@edge[65]:cc -traditional -fno-builtin -c sample.c
In file included from /usr/include/math.h:22,
from sample.c:1:
/usr/include/machine/math.h:8: syntax error before `char'
In file included from sample.c:1:
/usr/include/math.h:27: syntax error before `char'
/usr/include/machine/math.h:8: warning: array `__nanf' assumed to have one element
/usr/include/math.h:27: warning: array `__infinity' assumed to have one element
>Fix:
Include <sys/cdefs.h> somewhere in <math.h> with checking
definition of _SYS_CDEFS_H_.
The same problem may exist in other header files.
>Release-Note:
>Audit-Trail:
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
To: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: lib/9052: cc(1) can't compile a file using <math.h> only.
Date: Mon, 27 Dec 1999 23:35:08 +0100 (MET)
On Sat, 25 Dec 1999, Takahiro Kambe wrote:
> >Synopsis: cc(1) can't compile a file using <math.h> only.
A _lot_ of our header files have this problem, that they can't be compiled
without any other headers included.
(Sorry, I'm not in a position to change this.)
- Hubert
--
What, no .sig on my notebook?!?
State-Changed-From-To: open->closed
State-Changed-By: kleink
State-Changed-When: Tue Jan 4 06:19:36 PST 2000
State-Changed-Why:
Fixed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.