mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Eager evaluation of macro arguments would break inferred arrays on some platforms. #2771.
This commit is contained in:
@@ -85,6 +85,7 @@
|
|||||||
- Comparing an uint and int[<4>] was incorrectly assumed to be uint compared to int, causing a crash instead of an error. #2771
|
- Comparing an uint and int[<4>] was incorrectly assumed to be uint compared to int, causing a crash instead of an error. #2771
|
||||||
- When an `int[*][6]` was given too few values, the compiler would assert instead of giving an error. #2771
|
- When an `int[*][6]` was given too few values, the compiler would assert instead of giving an error. #2771
|
||||||
- Inferring length from a slice was accidentally not an error.
|
- Inferring length from a slice was accidentally not an error.
|
||||||
|
- Eager evaluation of macro arguments would break inferred arrays on some platforms. #2771.
|
||||||
|
|
||||||
### Stdlib changes
|
### Stdlib changes
|
||||||
- Add `ThreadPool` join function to wait for all threads to finish in the pool without destroying the threads.
|
- Add `ThreadPool` join function to wait for all threads to finish in the pool without destroying the threads.
|
||||||
|
|||||||
@@ -6278,6 +6278,7 @@ static inline void llvm_emit_macro_block(GenContext *c, BEValue *be_value, Expr
|
|||||||
BEValue value;
|
BEValue value;
|
||||||
c->debug.block_stack = old_inline_location;
|
c->debug.block_stack = old_inline_location;
|
||||||
llvm_emit_expr(c, &value, init_expr);
|
llvm_emit_expr(c, &value, init_expr);
|
||||||
|
if (!val->alignment) val->alignment = type_abi_alignment(val->type);
|
||||||
if (llvm_value_is_addr(&value) || val->var.is_written || val->var.is_addr || llvm_use_accurate_debug_info(c))
|
if (llvm_value_is_addr(&value) || val->var.is_written || val->var.is_addr || llvm_use_accurate_debug_info(c))
|
||||||
{
|
{
|
||||||
c->debug.block_stack = inline_location;
|
c->debug.block_stack = inline_location;
|
||||||
|
|||||||
@@ -1451,7 +1451,7 @@ static inline bool sema_analyse_signature(SemaContext *context, Signature *sig,
|
|||||||
{
|
{
|
||||||
if (!sema_deep_resolve_function_ptr(context, type_info)) return false;
|
if (!sema_deep_resolve_function_ptr(context, type_info)) return false;
|
||||||
param->type = type_info->type;
|
param->type = type_info->type;
|
||||||
if (!sema_set_alignment(context, param->type, ¶m->alignment, true)) return false;
|
if (!is_macro && !sema_set_alignment(context, param->type, ¶m->alignment, true)) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (param->var.init_expr)
|
if (param->var.init_expr)
|
||||||
|
|||||||
Reference in New Issue
Block a user