aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-10 11:02:44 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-10 11:02:44 -0700
commit5f4cb2c1463c6b738f2dc00ab2c478602c0a2b5d (patch)
tree1e8c66886a792924253cb494818c5bec95c325d1
parent45fa7ca807876c6e05a9c6bbf9a51c3a73aea1d0 (diff)
warn if setjmp is used as a function pointer
-rw-r--r--src/modules.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules.js b/src/modules.js
index e4093078..b13ab3c5 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -341,6 +341,7 @@ var Functions = {
call += (j > 1 ? ',' : '') + asmCoercion('a' + j, t[j] != 'i' ? 'float' : 'i32');
}
call += ')';
+ if (curr == '_setjmp') printErr('WARNING: setjmp used via a function pointer. If this is for libc setjmp (not something of your own with the same name), it will break things');
tables.pre += 'function ' + curr + '__wrapper(' + args + ') { ' + arg_coercions + ' ; ' + retPre + call + retPost + ' }\n';
wrapped[curr] = 1;
}