mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Parse error in $defined was not handled correctly, leading to an assertion.
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
- Compiler assert when passing returning CT failure immediately rethrown #2689.
|
- Compiler assert when passing returning CT failure immediately rethrown #2689.
|
||||||
- Converting between simd/non-simd bool vector would hit a compiler assert. #2691
|
- Converting between simd/non-simd bool vector would hit a compiler assert. #2691
|
||||||
- `i<n>` suffixes were not caught when n < 8, causing an assert.
|
- `i<n>` suffixes were not caught when n < 8, causing an assert.
|
||||||
|
- Parse error in `$defined` was not handled correctly, leading to an assertion.
|
||||||
|
|
||||||
### 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.
|
||||||
|
|||||||
@@ -1209,7 +1209,7 @@ static Expr *parse_ct_defined(ParseContext *c, Expr *left, SourceSpan lhs_start
|
|||||||
vec_add(defined->expression_list, expr);
|
vec_add(defined->expression_list, expr);
|
||||||
if (!try_consume(c, TOKEN_COMMA))
|
if (!try_consume(c, TOKEN_COMMA))
|
||||||
{
|
{
|
||||||
CONSUME_OR_RET(TOKEN_RPAREN, false);
|
CONSUME_OR_RET(TOKEN_RPAREN, poisoned_expr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
test/test_suite/compile_time/defined_parse_error.c3
Normal file
4
test/test_suite/compile_time/defined_parse_error.c3
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
fn void main()
|
||||||
|
{
|
||||||
|
$defined(usz a*); // #error: Expected ')'
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user