WebAssembly / tool-conventions

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

C enum size #187

Closed yamt closed 2 years ago

yamt commented 2 years 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 2 years 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 2 years ago

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

yamt commented 2 years ago

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

dschuff commented 2 years ago

Fixed by #188