I get the following error on powerpc-apple-darwin7.5.0 with gambc40b11:
> gcc -I../include -I. -no-cpp-precomp -Wall -W -Wno-unused -O1
> -fno-math-errno -fschedule-insns2 -fno-trapping-math
> -fno-strict-aliasing -fomit-frame-pointer -fPIC -fno-common
> -DHAVE_CONFIG_H -D___PRIMAL -D___LIBRARY
> -D___GAMBCDIR=\"/usr/local/Gambit-C\" -c os_tty.c
> gcc: unrecognized option `-no-cpp-precomp'
> In file included from os.h:185,
> from os_base.h:8,
> from os_tty.c:14:
> /usr/include/dlfcn.h:35:2: warning: #warning "You are using dlopen(),
> a legacy API. Please use the Mach-O dylib loading APIs if at all
> possible"
> os_tty.c: In function 'lineeditor_output':
> os_tty.c:2075: error: invalid storage class for function
> 'lineeditor_output_terminal_emulate'
> make[1]: *** [os_tty.o] Error 1
> make: *** [all] Error 1
> [descartes:~/programs/gambc40b11] lucier% gcc -v
> Reading specs from
> /pkgs/gcc-mainline/lib/gcc/powerpc-apple-darwin7.5.0/4.0.0/specs
> Configured with: ../configure --prefix=/pkgs/gcc-mainline
> --with-gmp=/pkgs/gmp-4.1.3 --with-mpfr=/pkgs/gmp-4.1.3
> Thread model: posix
> gcc version 4.0.0 20041019 (experimental)
This is in this strange code:
if (d->emulate_terminal)
{
/* forward declaration needed because lineeditor_output is
recursive */
___HIDDEN ___SCMOBJ lineeditor_output_terminal_emulate
___P((___device_tty *self,
___C *buf,
int len),
());
d->emulate_terminal = 0;
e = lineeditor_output_terminal_emulate (d, buf, len);
d->emulate_terminal = 1;
}
else
e = extensible_string_insert
(&d->output_char,
d->output_char.length,
len,
buf);
Can you even have a forward declaration here? Why not make
declarations for all functions at the top of the file and not worry
about it. (It works when I move the declaration to the top level and
leave out the local "declaration".)
Brad