[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
poke-1.0 and GCC < 4.6
From: |
Bruno Haible |
Subject: |
poke-1.0 and GCC < 4.6 |
Date: |
Sat, 27 Feb 2021 23:56:09 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-201-generic; KDE/5.18.0; x86_64; ; ) |
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.
0001-Fix-compilation-errors-with-GCC-4.6.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- poke-1.0 and GCC < 4.6,
Bruno Haible <=