diff options
| author | Colin Davidson <colrdavidson@gmail.com> | 2024-02-26 12:17:53 -0500 |
|---|---|---|
| committer | Colin Davidson <colrdavidson@gmail.com> | 2024-02-26 12:17:53 -0500 |
| commit | deb89221812fd5306a778daf9f48f34c6d13073a (patch) | |
| tree | ee75d606d1b07aa2b8986ffbbf7f92aa1980f62d /src/check_decl.cpp | |
| parent | f93f2dfd5cf56383e33f3eb7d2773c4646b37e2f (diff) | |
| parent | cba8cb2201cfb321dd627fb1c67a5a61267465ea (diff) | |
Merge branch 'master' into basic_egl
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index ed3a109c2..2c0f7a7b8 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -210,6 +210,7 @@ gb_internal bool is_type_distinct(Ast *node) { case Ast_UnionType: case Ast_EnumType: case Ast_ProcType: + case Ast_BitFieldType: return true; case Ast_PointerType: @@ -1143,7 +1144,7 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { "\tat %s", LIT(name), token_pos_to_string(pos)); } - } else if (!are_types_identical(this_type, other_type)) { + } else if (!signature_parameter_similar_enough(this_type, other_type)) { error(d->proc_lit, "Foreign entity '%.*s' previously declared elsewhere with a different type\n" "\tat %s", @@ -1284,7 +1285,7 @@ gb_internal void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast TokenPos pos = f->token.pos; Type *this_type = base_type(e->type); Type *other_type = base_type(f->type); - if (!are_types_identical(this_type, other_type)) { + if (!signature_parameter_similar_enough(this_type, other_type)) { error(e->token, "Foreign entity '%.*s' previously declared elsewhere with a different type\n" "\tat %s", |