aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-01 13:47:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-03-01 13:47:16 -0800
commitdf1f1c1455fe84b081e3d8a8e556e48363b372fa (patch)
tree9036499a3b89f3674bca3d8d0d399fec0265a1c8 /emscripten.py
parent84b9b8f7f154b03aeea2b738ec48942ea309741b (diff)
add test for #2175
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py
index eeb53bf7..26c7d6ef 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -780,6 +780,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
table_sizes = {}
for k, v in metadata['tables'].iteritems():
table_sizes[k] = str(v.count(',')) # undercounts by one, but that is what we want
+ #if settings['ASSERTIONS'] >= 2 and table_sizes[k] == 0:
+ # print >> sys.stderr, 'warning: no function pointers with signature ' + k + ', but there is a call, which will abort if it occurs (this can result from undefined behavior, check for compiler warnings on your source files and consider -Werror)'
funcs = re.sub(r"#FM_(\w+)#", lambda m: table_sizes[m.groups(0)[0]], funcs)
# fix +float into float.0, if not running js opts