Fix windows main

This commit is contained in:
Christoffer Lerno
2026-02-09 10:15:49 +01:00
parent 565b08846f
commit 67e224c62f

View File

@@ -4224,7 +4224,7 @@ static inline bool sema_analyse_main_function(SemaContext *context, Decl *decl)
RETURN_SEMA_ERROR(rtype_info, "Int return is required for a C style main.");
}
if ((type == MAIN_TYPE_RAW || type == MAIN_TYPE_NO_ARGS) && is_int_return && !is_win32)
if ((type == MAIN_TYPE_RAW || (type == MAIN_TYPE_NO_ARGS && !is_win32)) && is_int_return)
{
// Int return is pass-through at the moment.
decl->is_export = true;