Skip to content

Compiler error: conflicting types for ‘reserved_word’ #698

Description

@ffaf1

When building TSC-2.1.0 on Debian stable (bullseye), I get this error:

f@extensa:~/download/TSC-2.1.0/tsc/build$ make
[  1%] Built target podparser
[  2%] Performing build step for 'mruby'
(in /home/f/download/TSC-2.1.0/tsc/build/mruby)
CC    build/host/mrbgems/mruby-compiler/core/y.tab.c -> build/host/mrbgems/mruby-compiler/core/y.tab.o
In file included from /home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/parse.y:4446:
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:5:37: error: conflicting types for ‘reserved_word’
    5 | #define mrb_reserved_word(str, len) reserved_word(str, len)
      |                                     ^~~~~~~~~~~~~
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:72:1: note: in expansion of macro ‘mrb_reserved_word’
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:4:30: note: previous declaration of ‘reserved_word’ was here
    4 | static const struct kwtable *reserved_word(const char *, unsigned int);
      |                              ^~~~~~~~~~~~~
In file included from /home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/parse.y:4446:
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:5:37: error: conflicting types for ‘reserved_word’
    5 | #define mrb_reserved_word(str, len) reserved_word(str, len)
      |                                     ^~~~~~~~~~~~~
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:72:1: note: in expansion of macro ‘mrb_reserved_word’
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:4:30: note: previous declaration of ‘reserved_word’ was here
    4 | static const struct kwtable *reserved_word(const char *, unsigned int);
      |                              ^~~~~~~~~~~~~
rake aborted!
Command Failed: [gcc -g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings -DMRB_UTF8_STRING -DMRBGEM_MRUBY_COMPILER_VERSION=0.0.0 -I"/home/f/download/TSC-2.1.0/tsc/build/mruby/include" -I"/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core" -MMD -o "/home/f/download/TSC-2.1.0/tsc/build/mruby/build/host/mrbgems/mruby-compiler/core/y.tab.o" -c "/home/f/download/TSC-2.1.0/tsc/build/mruby/build/host/mrbgems/mruby-compiler/core/y.tab.c"]

make[2]: *** [CMakeFiles/mruby.dir/build.make:130: mruby-prefix/src/mruby-stamp/mruby-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:135: CMakeFiles/mruby.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions