-
-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Labels
BugSomething isn't workingSomething isn't workingFixed needs testingNeeds verification / testing that it now worksNeeds verification / testing that it now works
Milestone
Description
The compiler encountered an unexpected error with a two-dimensional array and [*] syntax
Minimal example
// char[1][*] a = { [0] = { [0] = 1 } }; // works as expected
// char[1][1] b = { [0] = { [0] = 1 } }; // works as expected
// char[*][*] c = { [0] = { [0] = 1 } }; // reports a cast error
char[*][1] d = { [0] = { [0] = 1 } }; // compiler encountered unreachable code
fn void main() {}This creates the following compiler error:
⚠️ The compiler encountered an unexpected error: "Should be unreachable".
- Function: type_size(...)
- Source file: /home/../c3c/src/compiler/types.c:433
🙏 Please consider taking the time to file an issue on GitHub, so that we can get it fixed:
https://github.com/c3lang/c3c/issues/new so that we can get it fixed.Compiler version
C3 Compiler Version: 0.7.6 (Pre-release, Sep 30 2025 14:22:39)
Git Hash: 281d4af464df15a677069d7eb10312a4128541f2
Backends: LLVM
LLVM version: 18.1.8
LLVM default target: x86_64-pc-linux-gnuMetadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingFixed needs testingNeeds verification / testing that it now worksNeeds verification / testing that it now works