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. - Alon On Wed, Jul 1, 2015 at 12:35 AM, <[email protected]> wrote: > On Tue, Jun 30, 2015 at 19:32:11 UTC+2 Alon Zakai wrote: > > That message should only show up in builds with assertions turned on > (-O0, or higher optimization levels with assertions turned on). > > Are you referring to the build of emcc/emscripten? > I downloaded the offline installer for emcc/emscripten and installed it. I > did not build it. > Where would I get emcc without assertions (at least without this stupid > message)? > > If 'build' refers to compiling my program with emcc I would like to know > how to turn this warning or all assertions off. > > BTW.: -O0 normally means no optimization at all. The phrase '-O0 or higher > optimization levels' means > for me: always. For me it sounds also strange when e.g. -O2 would turn > assertions on, since optimization > for time should make the program faster. > > BTW2.: An assertion should recognize when something is totally wrong and > terminate the program afterwards. > The warning > > Warning: Enlarging memory arrays, this is not fast! 16777216,33554432 > enlarged memory arrays from 16777216 to 33554432, took 20 ms (has > ArrayBuffer.transfer? false) > > is NOT an assertion. Everything is okay and the program can continue > without problems. > When malloc() recognizes (e.g. under Linux) that it needs more memory it > requests it > (with brk(), mmap() or something similar) and continues without any > message. If malloc() > cannot get more memory it returns NULL. In this cases malloc() does not > write any message. > I expect the same behavior from C programs when I compile them with emcc. > > Please can anybody tell me: What is necessary to get rid of this stupid > 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 [email protected]. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
