Skip to content

Error while compiling the compiler #63

@FardaleM

Description

@FardaleM

I was curious to try this version of the compiler. Unfortunately, I am getting the following error when I try to compile it:

prims.h:29:23: error: too many arguments to function ‘(value (*)(void))*(caml_prim_table.contents + (sizetype)((long unsigned int)*pc * 8))’; expected 0, have 1
   29 | #define Primitive(n) ((c_primitive)(caml_prim_table.contents[n]))
      |                      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
interp.c:893:14: note: in expansion of macro ‘Primitive’
  893 |       accu = Primitive(*pc)(accu);
      |              ^~~~~~~~~
prims.h:29:23: error: too many arguments to function ‘(value (*)(void))*(caml_prim_table.contents + (sizetype)((long unsigned int)*pc * 8))’; expected 0, have 2
   29 | #define Primitive(n) ((c_primitive)(caml_prim_table.contents[n]))
      |                      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
interp.c:899:14: note: in expansion of macro ‘Primitive’
  899 |       accu = Primitive(*pc)(accu, sp[1]);

I must admit my knowledge in C is far too low to understand the problem here.
The version of GCC on my system is: gcc (Debian 15.2.0-4) 15.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions