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

Handle structs (unions?) with no fields #18

Open
hainest opened this issue Sep 21, 2021 · 1 comment
Open

Handle structs (unions?) with no fields #18

hainest opened this issue Sep 21, 2021 · 1 comment
Labels

Comments

@hainest
Copy link
Collaborator

hainest commented Sep 21, 2021

struct Foo {};
void foo(Foo f) {}

terminate called after throwing an instance of 'std::runtime_error'
what(): Can't allocate a {NO_CLASS, *}

Empty struct/class types are fairly common in C++. I think the solution is to not call the allocator when there are no fields in a structure.

@vsoch
Copy link
Member

vsoch commented Sep 21, 2021

That makes sense - I can do a PR after we finish the current work we are doing.

@mplegendre mplegendre added the low label Jan 13, 2022
@vsoch vsoch transferred this issue from buildsi/Smeagle Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants