aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-01-08 20:24:12 +0000
committerGinger Bill <bill@gingerbill.org>2017-01-08 20:24:12 +0000
commitff473e83425c74bae2cee4c9d68435c7b346533e (patch)
tree746fbe47711e1d00ef09214136e53f2a140b9241 /src/check_decl.c
parent659e5359b2399927ffdd44d441d41a8a6e96228a (diff)
"Old style" enums
name and value information `count`, `min_value`, `max_value` constants
Diffstat (limited to 'src/check_decl.c')
-rw-r--r--src/check_decl.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/check_decl.c b/src/check_decl.c
index 9f683cf29..1c5cc1b06 100644
--- a/src/check_decl.c
+++ b/src/check_decl.c
@@ -249,9 +249,6 @@ void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init,
}
e->flags |= EntityFlag_Visited;
- c->context.iota = e->Constant.value;
- e->Constant.value = (ExactValue){0};
-
if (type_expr) {
Type *t = check_type(c, type_expr);
if (!is_type_constant_type(t)) {
@@ -259,7 +256,6 @@ void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init,
error_node(type_expr, "Invalid constant type `%s`", str);
gb_string_free(str);
e->type = t_invalid;
- c->context.iota = (ExactValue){0};
return;
}
e->type = t;
@@ -270,9 +266,6 @@ void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init,
check_expr_or_type(c, &operand, init);
}
if (operand.mode == Addressing_Type) {
- c->context.iota = (ExactValue){0};
-
- e->Constant.value = (ExactValue){0};
e->kind = Entity_TypeName;
DeclInfo *d = c->context.decl;
@@ -282,7 +275,6 @@ void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init,
}
check_init_constant(c, e, &operand);
- c->context.iota = (ExactValue){0};
if (operand.mode == Addressing_Invalid) {
error(e->token, "Illegal cyclic declaration");