dcodeIO / webassembly

A minimal toolkit and runtime to produce and run WebAssembly modules.
Other
815 stars 31 forks source link

How to force a standard for compilation? #31

Open max-carriers opened 3 years ago

max-carriers commented 3 years ago

What can I do if I need to force a standard to compile the c code to webassembly? I'm trying to compile it with the C90 Ansi standard, and I have no clues about the one used by the compiler of this module

max-carriers commented 3 years ago

The only solution I found so far is to try to compile the code with the "gcc" compiler and see if anything goes wrong, then if everything is ok I recompile it to webassembly.

To be clear, the command I'm using to compile the code with gcc is:

gcc -ansi -pedantic main.c -Wall