aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-12-12 18:21:40 +0000
committergingerBill <bill@gingerbill.org>2017-12-12 18:21:40 +0000
commitf7e9649be466ea03f556e2918063c5a4d0d28e2e (patch)
tree254ccca62132e5fae8af7bbf03ffe7fc5b75f0a4 /src/check_decl.cpp
parentfd1f6ec75cf7e26e2e87f84885e4166cd25cf376 (diff)
Disable struct field reordering (for the time being)
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 97acc20cd..351a8d0a0 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -265,7 +265,6 @@ void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init,
}
// NOTE(bill): Check to see if the expression it to be aliases
- #if 1
case Addressing_Builtin:
if (e->type != nullptr) {
error(type_expr, "A constant alias of a built-in procedure may not have a type initializer");
@@ -275,18 +274,16 @@ void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init,
e->type = t_invalid;
return;
- case Addressing_ProcGroup: {
+ case Addressing_ProcGroup:
GB_ASSERT(operand.proc_group != nullptr);
GB_ASSERT(operand.proc_group->kind == Entity_ProcGroup);
e->kind = Entity_ProcGroup;
e->type = t_invalid;
- gb_memcopy(&e->ProcGroup, &operand.proc_group->ProcGroup, gb_size_of(e->ProcGroup));
+ gb_memmove(&e->ProcGroup, &operand.proc_group->ProcGroup, gb_size_of(e->ProcGroup));
return;
}
- #endif
- }
- #if 1
+
if (entity != nullptr) {
switch (entity->kind) {
case Entity_Alias:
@@ -316,7 +313,6 @@ void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init,
return;
}
}
- #endif
}
if (init != nullptr) {
@@ -858,7 +854,6 @@ void check_entity_decl(Checker *c, Entity *e, DeclInfo *d, Type *named_type) {
case Entity_Procedure:
check_proc_decl(c, e, d);
break;
-
case Entity_ProcGroup:
check_proc_group_decl(c, e, d);
break;