diff options
Diffstat (limited to 'src/emacs-module.c')
-rw-r--r-- | src/emacs-module.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index de62329b3b8..2693a4529d6 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -170,6 +170,10 @@ static struct emacs_env_private global_env_private; internal_handler_##handlertype, \ internal_cleanup_##handlertype) +#if !__has_attribute (cleanup) + #error "__attribute__ ((cleanup)) not supported by this compiler; try GCC" +#endif + /* It is very important that pushing the handler doesn't itself raise a signal. Install the cleanup only after the handler has been pushed. Use __attribute__ ((cleanup)) to avoid @@ -764,6 +768,9 @@ funcall_module (Lisp_Object function, ptrdiff_t nargs, Lisp_Object *arglist) USE_SAFE_ALLOCA; ATTRIBUTE_MAY_ALIAS emacs_value *args; if (plain_values && ! module_assertions) + /* FIXME: The cast below is incorrect because the argument array + is not declared as const, so module functions can modify it. + Either declare it as const, or remove this branch. */ args = (emacs_value *) arglist; else { |