You need optimization settings during linking as well. Adding -O2 to your linker options should fix this. See
http://kripken.github.io/emscripten-site/docs/compiling/Building-Projects.html#building-projects-with-optimizations (Doing -s ASSERTIONS=0 during link would also fix this, but adding -O2 does that automatically.) On Thu, Jul 2, 2015 at 4:25 AM, <mertestho...@gmail.com> wrote: > On Wed, Jul 1, 2015 at 18:21:58 UTC+2 Alon Zakai wrote: >> >> If you build with -O1 or above, and you do not manually enable assertions >> (you do not include -s ASSERTIONS=1), then the warning will vanish. >> >> I agree that it is a little odd to have warnings be enabled in >> ASSERTIONS. Perhaps we should have a RUNTIME_WARNINGS option or something >> like that >> > > My compiler (emcc) options are: > -O2 -g -ffunction-sections -fdata-sections -Wall -Wstrict-prototypes > -Winline -Wconversion -Wshadow -Wpointer-arith > > and my linker (emcc) options are: > -Wl,--gc-sections -s ALLOW_MEMORY_GROWTH=1 > > As you can see I do not use an option like -s ASSERTIONS=1 but I get the > warning "Warning: Enlarging memory arrays". > How can that be? > Would an explicit option -s ASSERTIONS=0 help? > > As I already said in C there is no concept of RUNTIME_WARNINGS. > The returncode of a function usually tells you if the function worked > successful or not. > > How should I change the compiler / linker options to get no "runtime > warning"? > > Regards, > Thomas Mertes > > -- > Seed7 Homepage: http://seed7.sourceforge.net > Seed7 - The extensible programming language: User defined statements > and operators, abstract data types, templates without special > syntax, OO with interfaces and multiple dispatch, statically typed, > interpreted or compiled, portable, runs under linux/unix/windows. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to emscripten-discuss+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.