enhance default hashing strategy for basic types (#1758)

* enhance default hashing strategy for basic types

* fix

* `$defined` in a global scope should accept testing normal macros.

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
Francesco Alemanno
2025-01-02 20:44:33 +01:00
committed by GitHub
parent 14d8e93004
commit a16316d7b4
7 changed files with 99 additions and 29 deletions

View File

@@ -3962,7 +3962,7 @@ bool sema_analyse_var_decl(SemaContext *context, Decl *decl, bool local)
}
else
{
if (context->call_env.kind == CALL_ENV_GLOBAL_INIT)
if (context->call_env.kind == CALL_ENV_GLOBAL_INIT && !context->call_env.in_no_eval)
{
if (context->current_macro)
{