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

Compilation Error: offset of on non-standard layout type #2

Open
theduke opened this issue Sep 27, 2021 · 1 comment
Open

Compilation Error: offset of on non-standard layout type #2

theduke opened this issue Sep 27, 2021 · 1 comment

Comments

@theduke
Copy link

theduke commented Sep 27, 2021

I'm trying to compile a simple example using the pre-built code, but I'm stumbling over a compilation error.

Environment:
wasi-sdk 12.0
CXX and LD flags are taken directly from the Fastly runtime Makefile.

/host/spidermonkey/include/js/HeapAPI.h:251:38: error: offset of on non-standard-layout type 'js::gc::TenuredChunkBase' [-Werror,-Winvalid-offsetof]
const size_t ChunkMarkBitmapOffset = offsetof(TenuredChunkBase, markBits);
                                     ^                          ~~~~~~~~
/host/wasi-sdk-12.0/lib/clang/11.0.0/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
@theduke
Copy link
Author

theduke commented Sep 27, 2021

Note that things seem to work just fine when ignoring with -Wno-invalid-offsetof.

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

No branches or pull requests

1 participant