Article View: gnu.gcc.help
Article #51649Can't compile function using sin as variable
From: David E. Jones
Date: Thu, 29 Apr 1993 16:53
Date: Thu, 29 Apr 1993 16:53
29 lines
1543 bytes
1543 bytes
I am having trouble compiling the following small ANSI compliant program: /* start of program */ #include <sys/socket.h> struct sockaddr_in sin; /* end of program */ The problem is that I get the following error message: sin.c:3: built-in function `sin' declared as non-function sin.c:3: storage size of `sin' isn't known Doing gcc -v gives: Reading specs from /usr/lib/gcc-lib/i386-linux/2.3.3/specs gcc version 2.3.3 It appears that GCC wants to provide an inline 387 coprocessor instruction for the sin function. However, I have not included <math.h>, nor have I indicated that sin is a function in any way. According to the ANSI standard, I should be able to replace a library object with something of my own choosing. gcc -ansi -pedantic doesn't seem to help things. Is there a solution to this problem? Mail only please; I do not usually read this newsgroup. Any help is appreciated.
Technical Details
Message-ID:
<1993Apr29.165324.13649@gandalf.ca>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!torn!nott!hobbit.gandalf.ca!dejonesShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,9c92c2f89d937243,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-04-29 14:12:53 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!torn!nott!hobbit.gandalf.ca!dejones From: dejones@gandalf.ca (David E. Jones) Subject: Can't compile function using sin as variable Message-ID: <1993Apr29.165324.13649@gandalf.ca> Summary: GNU CC rejects sin used as variable. How can I fix? Keywords: sin,builtin,gcc Organization: Gandalf Data Ltd. Date: Thu, 29 Apr 1993 16:53:24 GMT Lines: 30