0.6.5 compilation problem with gcc 4.0.3
sqweek <[email protected]> Thu, 1 Jun 2006 00:12:28 +0800
| Newsgroups | gmane.lisp.scheme.scsh |
|---|---|
| Message-ID | <[email protected]> |
gcc -c -DHAVE_CONFIG_H -I./c -I./cig -O -march=i386 -pipe -DPIC -fPIC
-O2 -o c/unix/io.o c/unix/io.c
c/unix/io.c: In function 'ps_write_integer':
c/unix/io.c:154: error: invalid storage class for function 'write_integer'
c/unix/io.c: At top level:
c/unix/io.c:171: error: conflicting types for 'write_integer'
c/unix/io.c:160: error: previous implicit declaration of
'write_integer' was here
make: *** [c/unix/io.o] Error 1
149 long
150 ps_write_integer(long n, FILE *port)
151 {
152 int status;
153
154 static long write_integer(unsigned long n, FILE *port);
155
156 if (n == 0) {
157 WRITE_CHAR('0', port, status);
158 return status; }
159 else if (n > 0)
I moved the write_integer prototype outside the ps_write_integer
function body and it went and compile happily. Best guess is that gcc
is misinterpreting the intent of the static keyword in this context as
a persistant variable instead of a symbol local to the compilation
unit?