Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support unnamed/anonymous structs and unions #5

Merged
merged 4 commits into from
Dec 30, 2024

Conversation

cadmic
Copy link
Contributor

@cadmic cadmic commented Dec 30, 2024

Stuff like this is used all over in the OoT repo:

struct Foo {
  int a;
  union {
    int b;
    float c;
  };
  struct {
    int d;
    float e;
  };
};

Modern GCC supports this, so perhaps it's easier to patch in those changes (see the individual commits for the sources). Thanks to @Thar0 for the idea here.

This required changing the syntax, so I used https://github.com/pixel-stuck/andrew-bison to regenerate the parse tables.

Copy link
Collaborator

@AngheloAlf AngheloAlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look at the code too closely, but drmario still matches 👍

@AngheloAlf AngheloAlf merged commit 78b40f3 into decompals:master Dec 30, 2024
2 checks passed
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.

2 participants