Skip to content

Commit 8f00d55

Browse files
committed
Revert deprecation of EMULATE_FUNCTION_POINTER_CASTS
This change effectively reverts #23953 It turns out there is an ongoing need for this in the glib project: See https://gitlab.gnome.org/GNOME/glib/-/issues/3670 and https://gitlab.gnome.org/GNOME/glib/-/blob/main/docs/toolchain-requirements.md?ref_type=heads#calling-functions-through-differently-typed-function-pointers Fixes: #23952
1 parent cadac51 commit 8f00d55

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

site/source/docs/tools_reference/settings_reference.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,8 @@ sent value to memory and loaded the received type from the same memory (using
467467
truncs/extends/ reinterprets). This means that when types do not match the
468468
emulated values may not match (this is true of native too, for that matter -
469469
this is all undefined behavior). This approaches appears good enough to
470-
support Python, which is the main use case motivating this feature.
471-
472-
.. note:: This setting is deprecated
470+
support Python (the original motiviation for this feature) and Glib (the
471+
continued motivation).
473472

474473
Default value: false
475474

src/settings.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ var SAFE_HEAP_LOG = false;
342342
// truncs/extends/ reinterprets). This means that when types do not match the
343343
// emulated values may not match (this is true of native too, for that matter -
344344
// this is all undefined behavior). This approaches appears good enough to
345-
// support Python, which is the main use case motivating this feature.
345+
// support Python (the original motiviation for this feature) and Glib (the
346+
// continued motivation).
346347
// [link]
347-
// [deprecated]
348348
var EMULATE_FUNCTION_POINTER_CASTS = false;
349349

350350
// Print out exceptions in emscriptened code.

test/test_other.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5733,7 +5733,7 @@ def test_bad_function_pointer_cast(self, opts, wasm, safe):
57335733
if safe:
57345734
cmd += ['-sSAFE_HEAP']
57355735
if emulate_casts:
5736-
cmd += ['-sEMULATE_FUNCTION_POINTER_CASTS', '-Wno-deprecated']
5736+
cmd += ['-sEMULATE_FUNCTION_POINTER_CASTS']
57375737
if relocatable:
57385738
cmd += ['-sRELOCATABLE'] # disables asm-optimized safe heap
57395739
print(cmd)
@@ -12598,7 +12598,7 @@ def test_setjmp_emulated_casts(self):
1259812598
}
1259912599
}
1260012600
''')
12601-
self.do_runf('src.c', 'ok\ndone\n', emcc_args=['-Wno-deprecated', '-sEMULATE_FUNCTION_POINTER_CASTS'])
12601+
self.do_runf('src.c', 'ok\ndone\n', emcc_args=['-sEMULATE_FUNCTION_POINTER_CASTS'])
1260212602

1260312603
def test_no_lto(self):
1260412604
# This used to fail because settings.LTO didn't reflect `-fno-lto`.

0 commit comments

Comments
 (0)