Closed iphydf closed 7 months ago
#11 3.571 parser.c:3303:56: error: passing 'const struct struct_or_union_specifier *' to parameter of type 'struct struct_or_union_specifier *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] #11 3.571 3303 | p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); #11 3.571 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ #11 3.571 ./parser.h:844:110: note: passing argument to parameter here #11 3.571 844 | struct member_declaration* owner member_declaration(struct parser_ctx* ctx, struct struct_or_union_specifier*); #11 3.571 | ^ #11 3.572 parser.c:3311:60: error: passing 'const struct struct_or_union_specifier *' to parameter of type 'struct struct_or_union_specifier *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] #11 3.572 3311 | p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); #11 3.572 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ #11 3.572 ./parser.h:844:110: note: passing argument to parameter here #11 3.572 844 | struct member_declaration* owner member_declaration(struct parser_ctx* ctx, struct struct_or_union_specifier*); #11 3.572 | ^ #11 3.659 2 errors generated.
Is this the current branch?
Yes, but I've added -Werror, and I'm compiling with clang.
const fixed