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 struct "inheritance" (extension) #22

Open
agg23 opened this issue Dec 27, 2019 · 0 comments
Open

Support struct "inheritance" (extension) #22

agg23 opened this issue Dec 27, 2019 · 0 comments

Comments

@agg23
Copy link
Contributor

agg23 commented Dec 27, 2019

C11 supports struct extension, such that:

struct Foo {
   byte foo1
}

struct Bar {
   byte bar1
}

struct Foo_bar {
   struct Foo
   struct Bar
}

Produces the final struct:

struct Foo_bar {
   byte foo1
   byte bar1
}

While not a make or break feature, this allows some convenience in allowing composition without nesting, which is already represented by the memory structure.

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

No branches or pull requests

2 participants