@@ -1586,7 +1586,6 @@ static struct token *declaration_specifiers(struct token *token, struct decl_sta
}
type = alloc_symbol(token->pos, SYM_BASETYPE);
*type = *ctx->ctype.base_type;
- type->ctype.modifiers &= ~MOD_SPECIFIER;
type->ctype.base_type = ctx->ctype.base_type;
type->type = SYM_RESTRICT;
ctx->ctype.base_type = type;
@@ -318,7 +318,7 @@ deeper:
if (as)
prepend(name, "%s ", show_as(as));
- if (sym && (sym->type == SYM_BASETYPE || sym->type == SYM_ENUM))
+ if (sym && (sym->type == SYM_BASETYPE || sym->type == SYM_ENUM || sym->type == SYM_RESTRICT))
mod &= ~MOD_SPECIFIER;
s = modifier_string(mod);
len = strlen(s);
@@ -8,7 +8,6 @@ static int gtu(bu32 x, bu32 y) { return (x > y); }
/*
* check-name: bitwise-cmpu
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: setlt\\.
When bitwise types were added [1] the signedness modifiers were removed from them. More exactly, it was MOD_SPECIFIER which was removed. I suppose this was done because then MOD_SPECIFIER contained the signedness bits but also MOD_CHAR, MOD_LONG, ... and those had to be removed. But currently MOD_SPECIFIER contains only MOD_SIGNEDNESS and the signedness info can be useful for bitwise types too. So, do not removed anymore MOD_SPECIFIER from the bitwise types' modifiers. [1] commit 032f492af0ac ("[PATCH] __attribute__((bitwise))") Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- parse.c | 1 - show-parse.c | 2 +- validation/linear/bitwise-cmpu.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-)