mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 01:44:36 +00:00
Reserve the link_name main
This commit is contained in:
@@ -525,6 +525,8 @@ void check_proc_decl(Checker *c, Entity *e, DeclInfo *d) {
|
||||
"\tat %.*s(%td:%td)",
|
||||
LIT(name), LIT(pos.file), pos.line, pos.column);
|
||||
}
|
||||
} else if (name == "main") {
|
||||
error(d->proc_lit, "The link name `main` is reserved for internal use");
|
||||
} else {
|
||||
map_set(fp, key, e);
|
||||
}
|
||||
@@ -549,6 +551,8 @@ void check_proc_decl(Checker *c, Entity *e, DeclInfo *d) {
|
||||
"Non unique linking name for procedure `%.*s`\n"
|
||||
"\tother at %.*s(%td:%td)",
|
||||
LIT(name), LIT(pos.file), pos.line, pos.column);
|
||||
} else if (name == "main") {
|
||||
error(d->proc_lit, "The link name `main` is reserved for internal use");
|
||||
} else {
|
||||
map_set(fp, key, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user