Skip to content

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

@theduke

Description

@theduke

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions