Skip to content

Conversation

@ssyram
Copy link
Contributor

@ssyram ssyram commented Nov 27, 2025

Added a new pass to resolve the type dependencies problem as mentioned in #357. The algorithm is generally as described but could be explained in more detail as that the type declarations come in the following order:

  • All internal type forward declarations for structs and unions (but not enum, not type alias);
  • All additional forward type declarations (will this happen? not sure, just for robustness);
  • All enum type definitions --- as enum types are translated as alias of uint8_t, they have the property that: (1) they cannot be forward declared; and (2) they are standalone;
  • All type alias in topological order: the above three should contain all possible types that can be referenced in type alias definitions;
  • All struct/union type definitions in topological order: at this point all types that can be referenced in struct/union fields should be there;

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.

1 participant