guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile 1.8.2 Compile Error [GAH]


From: Ludovic Courtès
Subject: Re: Guile 1.8.2 Compile Error [GAH]
Date: Tue, 13 Nov 2007 00:51:18 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Hi,

"Kevin Brott" <address@hidden> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]