This commit is contained in:
gingerBill
2018-03-23 15:23:31 +00:00
4 changed files with 173 additions and 65 deletions

View File

@@ -1603,11 +1603,12 @@ void check_decl_attributes(Checker *c, Array<AstNode *> attributes, DeclAttribut
if (value != nullptr) {
Operand op = {};
check_expr(c, &op, value);
if (op.mode )
if (op.mode != Addressing_Constant) {
error(value, "An attribute element must be constant");
} else {
ev = op.value;
if (op.mode) {
if (op.mode != Addressing_Constant) {
error(value, "An attribute element must be constant");
} else {
ev = op.value;
}
}
}