gravity: Unable to compile the gravity_parser.c
Hi!
I am having some issues compiling the parser. Before I start, I should mention I am using an IBM i C compiler - you can read more about its standards here, although I believe it is up to C99. This environment does not have make, so I am having to manually compile all the modules in order to create the ending object/program.
When I try compile gravity_parser.c, I am getting 5 compile errors when I which all relate to the same thing:
CZM0117: Operand must be a scalar type.
Cause . . . . . : Valid scalar types include: signed and unsigned char;
signed and unsigned short, long, long long, and int; enum, float, double,
long double, and pointers.
Recovery . . . : Change the type of the operand, or use a different
operator.
All errors are pointing to (gtoken_s)NO_TOKEN
Line 1164: enum_value = (gnode_base_t *)gnode_literal_int_expr_create((gtoken_s)NO_TOKEN, enum_autoint);
Line 1365: gnode_t *outer_var = gnode_variable_create((gtoken_s)NO_TOKEN, string_dup(OUTER_IVAR_NAME), NULL, 0, NULL);
Line 1368: gnode_t *outer_decl = gnode_variable_decl_create((gtoken_s)NO_TOKEN, TOK_KEY_VAR, TOK_KEY_PRIVATE, 0, decls);
Line 2070: gnode_t *node= gnode_block_stat_create(NODE_LIST_STAT, (gtoken_s)NO_TOKEN, parser->statements);
Line 2138: return gnode_block_stat_create(NODE_LIST_STAT, (gtoken_s)NO_TOKEN, parser->statements);
The error is surely related to this systems compiler. I am not a C pro, so I was wondering if anyone could give me some pointers to what I should do to fix this.
Thanks, Liam
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 31 (11 by maintainers)
@marcobambini I will make a PR after some testing 😃
Relic build file for future use:
For bzero: #ifndef HAVE_BZERO #define bzero(ptr,n) memset(ptr, 0, n) #endif
Seems like computed goto are not supported. In gravity_value.h set macro GRAVITY_COMPUTED_GOTO to 0
@marcobambini Not yet. It’s currently being investigated, but I am just storing notes here for future reference.