aboutsummaryrefslogtreecommitdiffstats
path: root/src/gnutls.c
diff options
context:
space:
mode:
authorPaul Eggert2025-11-20 11:59:47 -0800
committerPaul Eggert2025-11-20 12:04:01 -0800
commitc230dfdc26f0ffffd0718120d5e49478ae7cbb72 (patch)
tree66b374259f8b2143805605f06cbffba9cf93fa59 /src/gnutls.c
parent918b9f04f422efb7b614a9f71b004523a39d7674 (diff)
downloademacs-c230dfdc26f0ffffd0718120d5e49478ae7cbb72.tar.gz
emacs-c230dfdc26f0ffffd0718120d5e49478ae7cbb72.zip
A few more functions are not pure
Assuming ATTRIBUTE_PURE means that the function must return, a few more functions that should not be declared with ATTRIBUTE_PURE. The GCC manual (and even the C23 standard, with [[reproducible]]) is not clear about this, and it’s better to be safe. * src/bignum.h (mpz_get_d_rounded): * src/lisp.h (bignum_to_double): No longer pure, as it does not return if memory is exhausted. * src/fns.c (Fproper_list_p): No longer pure, as it does not return if the user quits. * src/gnutls.c (Fgnutls_errorp): No longer pure, as it does not return if it runs into an eassert failure in XSYMBOL_WITH_POS via EQ. * src/lisp.h (bignum_to_intmax, bignum_to_uintmax, bignum_bufsize): No longer pure, as it does not return if it runs into an eassert failure in XBIGNUM via xbignum_val.
Diffstat (limited to 'src/gnutls.c')
-rw-r--r--src/gnutls.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gnutls.c b/src/gnutls.c
index 247cc7ff3fe..31827280b48 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1002,8 +1002,7 @@ See also `gnutls-boot'. */)
1002DEFUN ("gnutls-errorp", Fgnutls_errorp, Sgnutls_errorp, 1, 1, 0, 1002DEFUN ("gnutls-errorp", Fgnutls_errorp, Sgnutls_errorp, 1, 1, 0,
1003 doc: /* Return t if ERROR indicates a GnuTLS problem. 1003 doc: /* Return t if ERROR indicates a GnuTLS problem.
1004ERROR is an integer or a symbol with an integer `gnutls-code' property. 1004ERROR is an integer or a symbol with an integer `gnutls-code' property.
1005usage: (gnutls-errorp ERROR) */ 1005usage: (gnutls-errorp ERROR) */)
1006 attributes: pure)
1007 (Lisp_Object err) 1006 (Lisp_Object err)
1008{ 1007{
1009 if (EQ (err, Qt) 1008 if (EQ (err, Qt)