Fix alignment and size bug of enums; Remove #ordered and make the default #ordered.

This commit is contained in:
Ginger Bill
2017-05-02 21:16:09 +01:00
parent 206a3e093c
commit cc6282a6e3
10 changed files with 45 additions and 41 deletions
+5 -5
View File
@@ -2745,11 +2745,11 @@ AstNode *parse_type_or_ident(AstFile *f) {
syntax_error(tag, "Duplicate struct tag `#%.*s`", LIT(tag.string));
}
is_packed = true;
} else if (str_eq(tag.string, str_lit("ordered"))) {
if (is_ordered) {
syntax_error(tag, "Duplicate struct tag `#%.*s`", LIT(tag.string));
}
is_ordered = true;
// } else if (str_eq(tag.string, str_lit("ordered"))) {
// if (is_ordered) {
// syntax_error(tag, "Duplicate struct tag `#%.*s`", LIT(tag.string));
// }
// is_ordered = true;
} else if (str_eq(tag.string, str_lit("align"))) {
if (align) {
syntax_error(tag, "Duplicate struct tag `#%.*s`", LIT(tag.string));