mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
When a global const has invalid attributes, handling is incorrect, leading to a crash #2785.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
- Failed to reject void compile time variables, leading to crash. #2781
|
||||
- Inferring the size of a slice with an inner inferred array using {} isn't detected as error #2783
|
||||
- Bug in sysv abi when passing union in with floats #2784
|
||||
- When a global const has invalid attributes, handling is incorrect, leading to a crash #2785.
|
||||
|
||||
### Fixes
|
||||
- Regression with npot vector in struct triggering an assert #2219.
|
||||
|
||||
@@ -1007,7 +1007,7 @@ Decl *parse_const_declaration(ParseContext *c, bool is_global, bool is_extern)
|
||||
// Differentiate between global and local attributes, global have visibility
|
||||
if (is_global)
|
||||
{
|
||||
if (!parse_attributes_for_global(c, decl)) return false;
|
||||
if (!parse_attributes_for_global(c, decl)) return poisoned_decl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
1
test/test_suite/constants/const_unfinished_parse.c3
Normal file
1
test/test_suite/constants/const_unfinished_parse.c3
Normal file
@@ -0,0 +1 @@
|
||||
const A @if(; // #error: An expression was expected.
|
||||
Reference in New Issue
Block a user