Closed FriedrichGretz closed 3 years ago
Describe the bug The compiler allows to define empty structures.
To Reproduce struct T end
struct T end
Expected behaviour The type checker should flag an error
Additional context The corresponding documentation mandates this, see grammar in https://www.blech-lang.org/docs/user-manual/types/#structure-types
Furthermore standard C (unlike C++) also requires at least one field. Empty structures induce compiler dependent behaviour.
Describe the bug The compiler allows to define empty structures.
To Reproduce
struct T end
Expected behaviour The type checker should flag an error
Additional context The corresponding documentation mandates this, see grammar in https://www.blech-lang.org/docs/user-manual/types/#structure-types
Furthermore standard C (unlike C++) also requires at least one field. Empty structures induce compiler dependent behaviour.