aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index ad3844d0213..64d9e5d27c6 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -463,6 +463,14 @@ valid_sp (struct bc_thread_state *bc, Lisp_Object *sp)
463#define BC_REG_PC 463#define BC_REG_PC
464#endif 464#endif
465 465
466/* It seems difficult to avoid spurious -Wclobbered diagnostics from GCC
467 in exec_byte_code, so turn the warning off around that function.
468 See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161>. */
469#if __GNUC__ && !__clang__
470#pragma GCC diagnostic push
471#pragma GCC diagnostic ignored "-Wclobbered"
472#endif
473
466/* Execute the byte-code in FUN. ARGS_TEMPLATE is the function arity 474/* Execute the byte-code in FUN. ARGS_TEMPLATE is the function arity
467 encoded as an integer (the one in FUN is ignored), and ARGS, of 475 encoded as an integer (the one in FUN is ignored), and ARGS, of
468 size NARGS, should be a vector of the actual arguments. The 476 size NARGS, should be a vector of the actual arguments. The
@@ -540,11 +548,6 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
540 for (ptrdiff_t i = nargs - rest; i < nonrest; i++) 548 for (ptrdiff_t i = nargs - rest; i < nonrest; i++)
541 PUSH (Qnil); 549 PUSH (Qnil);
542 550
543#if GCC_LINT && __GNUC__ && !__clang__
544 Lisp_Object *volatile saved_vectorp;
545 unsigned char const *volatile saved_bytestr_data;
546#endif
547
548 while (true) 551 while (true)
549 { 552 {
550 ptrdiff_t op; 553 ptrdiff_t op;
@@ -987,12 +990,6 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
987 Lisp_Object fun = fp->fun; 990 Lisp_Object fun = fp->fun;
988 Lisp_Object bytestr = AREF (fun, CLOSURE_CODE); 991 Lisp_Object bytestr = AREF (fun, CLOSURE_CODE);
989 Lisp_Object vector = AREF (fun, CLOSURE_CONSTANTS); 992 Lisp_Object vector = AREF (fun, CLOSURE_CONSTANTS);
990#if GCC_LINT && __GNUC__ && !__clang__
991 /* These useless assignments pacify GCC 14.2.1 x86-64
992 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161>. */
993 bytestr_data = saved_bytestr_data;
994 vectorp = saved_vectorp;
995#endif
996 bytestr_data = SDATA (bytestr); 993 bytestr_data = SDATA (bytestr);
997 vectorp = XVECTOR (vector)->contents; 994 vectorp = XVECTOR (vector)->contents;
998 if (BYTE_CODE_SAFE) 995 if (BYTE_CODE_SAFE)
@@ -1006,10 +1003,6 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
1006 goto op_branch; 1003 goto op_branch;
1007 } 1004 }
1008 1005
1009#if GCC_LINT && __GNUC__ && !__clang__
1010 saved_vectorp = vectorp;
1011 saved_bytestr_data = bytestr_data;
1012#endif
1013 NEXT; 1006 NEXT;
1014 } 1007 }
1015 1008
@@ -1807,6 +1800,11 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
1807 return result; 1800 return result;
1808} 1801}
1809 1802
1803#if __GNUC__ && !__clang__
1804#pragma GCC diagnostic pop
1805#endif
1806
1807
1810/* `args_template' has the same meaning as in exec_byte_code() above. */ 1808/* `args_template' has the same meaning as in exec_byte_code() above. */
1811Lisp_Object 1809Lisp_Object
1812get_byte_code_arity (Lisp_Object args_template) 1810get_byte_code_arity (Lisp_Object args_template)