WebAssembly / tool-conventions

Conventions supporting interoperatibility between tools working with WebAssembly.
Artistic License 2.0
297 stars 65 forks source link

C enum size #187

Closed yamt closed 1 year ago

yamt commented 1 year ago

https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md says enum is 4-bytes.

otoh, clang sometimes yields 8-bytes enum. eg.

enum e {
        a = 0x100000000,
};

which should be fixed?

yamt commented 1 year ago

which should be fixed?

my suggestion is to amend BasicCABI.md. but i'm totally ignorant of the situations of other compilers.

sunfishcode commented 1 year ago

Would changing it to say "enum (by default)" make it clear?

yamt commented 1 year ago

my suggestion https://github.com/WebAssembly/tool-conventions/pull/188

dschuff commented 1 year ago

Fixed by #188