While issuing a diagnostic related to a bitfield, it's useful to display the bitfield's name. Unfortunately, this name is not stored in the symbol and thus is only available during parsing. Fix this by adding the ident to the symbol initialization. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- parse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/parse.c b/parse.c index 6db3cba738bc..efd8c5de1b6d 100644 --- a/parse.c +++ b/parse.c @@ -1972,6 +1972,7 @@ static struct token *handle_bitfield(struct token *token, struct decl_state *ctx } bitfield->bit_size = width; bitfield->endpos = token->pos; + bitfield->ident = *ctx->ident; return token; } -- 2.24.0