poke-devel
[Top][All Lists]
Advanced

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

Re: poke-1.0 and GCC < 4.6


From: Jose E. Marchesi
Subject: Re: poke-1.0 and GCC < 4.6
Date: Mon, 01 Mar 2021 18:03:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Bruno.

I am not a big fan on the cpp solution, but since I can't think on a
better one, lets put it in for now.

OK for both master and maint/poke-1.
Thanks!

> I'm trying to compile poke-1.0 on Linux/ia64. The compiler is GCC 4.1.2. It
> produces these compilation errors:
>
> In file included from ../../libpoke/libpoke.c:26:
> ../../libpoke/pkl.h:63: error: redefinition of typedef 'pkl_compiler'
> ../../libpoke/pvm.h:676: error: previous declaration of 'pkl_compiler' was 
> here
> In file included from ../../libpoke/libpoke.c:28:
> ../../libpoke/pkl-env.h:58: error: redefinition of typedef 'pkl_env'
> ../../libpoke/pkl.h:143: error: previous declaration of 'pkl_env' was here
> In file included from ../../libpoke/libpoke.c:30:
> ../../libpoke/pvm-val.h:503: error: redefinition of typedef 'pvm_program'
> ../../libpoke/pvm.h:61: error: previous declaration of 'pvm_program' was here
> make[2]: *** [libpoke_la-libpoke.lo] Error 1
>
> Yes, in GCC versions < 4.6, a type must not be defined twice. Input such as
> =======================
> typedef int foo;
> typedef int foo;
> =======================
> gives a compilation error.
>
> Once the errors above are fixed, there is another one:
>
> ../../libpoke/pkl-env.c:47: error: redefinition of typedef 'pkl_hash'
> ../../libpoke/pkl-ast.h:1939: error: previous declaration of 'pkl_hash' was 
> here
> make[2]: *** [libpoke_la-pkl-env.lo] Error 1
>
> And then another one:
>
> ../../libpoke/pvm-program.h:24: error: redefinition of typedef 
> 'pvm_program_program_point'
> ../../libpoke/pvm-val.h:507: error: previous declaration of 
> 'pvm_program_program_point' was here
> make[2]: *** [libpoke_la-pvm.lo] Error 1
>
> Here's a proposed fix. Alternatively, you could move these definitions that 
> are
> needed by multiple header files to specialized header files, like the 
> <bits/*.h>
> header files of glibc.



reply via email to

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