Hi,
"Kevin Brott" <[EMAIL PROTECTED]> writes:
> I'd agree - except this is the only code it's broken on, and I went
> through freshly compiled versions of gcc 3.3.6, 3.4.6, 4.0.4, 4.1.2, and
> 4.2.2 - and all of them have the same basic problem. FWIW - I couldn't
> get 1.6.8 to compile until I had a working gcc 4.0.4, and was using
> 1.4.1 - which has always compiled/worked fine.
OK.
> ---cut---
> main()
> {
> extern void make_foo (void *x, foo_t function);
> }
> ---cut---
>
> # gcc -o evt evt.c
> evt.c: In function 'main':
> evt.c:3: error: expected declaration specifiers or '...' before 'foo_t'
It's better to put the declaration outside (to avoid cumulating
potential problems). You could try this:
typedef void * (* foo_t) (void *, void *);
foo_t
doit (foo_t x)
{
return x;
}
Or this:
typedef void * (* foo_t) (void *, void *);
extern void make_foo (void *x, foo_t function);
int
stuff (int x)
{
return x;
}
Then just "gcc -c the-file.c".
> Was wondering if it's a bad/missing fixincludes action in gcc ... but if
> that were the case then I'd think a lot more stuff wouldn't compile
> besides just guile 1.8.
Right.
Thanks,
Ludovic.
_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user