I have the following code and I am getting an error that says the parameter map
has an incomplete type. The variable strings
is an smap
declared as an extern in one of the header files included where the following code resides.
How can I fix this, or what does the error mean, or what are common causes for this error?
void print_strings(smap map);
void emit_strings(AST *ast) {
/* TODO: Implement me. */
printf(".data\n");
print_strings(strings);
}
void print_strings(smap map){
for (size_t i = 0; i < map -> num_buckets; i += 1) {
for (size_t j = 0; j < map -> buckets[i].num_pairs; j+=1) {
printf("str%d: .asciiz %c\n",label_count,map ->buckets[i].pairs[j].key);
label_count ++;
}
}
label_count = 0;
}