Skip to content

Fix Global initialization and designators order in def_glob macro#358

Open
abelstuker wants to merge 2 commits intoTOPLLab:mainfrom
abelstuker:fix/global-designator-order
Open

Fix Global initialization and designators order in def_glob macro#358
abelstuker wants to merge 2 commits intoTOPLLab:mainfrom
abelstuker:fix/global-designator-order

Conversation

@abelstuker
Copy link
Copy Markdown
Contributor

Closes #357.

The def_glob macros of all platforms don't correctly initialize the Global struct, resulting in a compiler error and breaking CI when globals are defined:

  • the previous StackValue initialization used a combination of designated (.value_type = ...) and positional initializers, which is invalid
  • fields in the Global struct were initialized out of declaration order
  • some fields of the Global Struct (export_name, import_module) were not initialized

This PR fixes these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global primitive definition macro uses incorrect designator order

1 participant