]> git.eshelyaron.com Git - emacs.git/commitdiff
Try to make scratch/correct-warning-pos build on Windows and not segfault
authorAlan Mackenzie <acm@muc.de>
Fri, 31 Dec 2021 23:17:28 +0000 (23:17 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 31 Dec 2021 23:17:28 +0000 (23:17 +0000)
* src/comp.c (emit_EQ): Replace calls to gcc_jit_context_new_location with
NULLs.
(Fcomp__init_ctxt): Remove the register_emitter call for Qsymbol_with_pos_p,
which was causing a segfault.

src/comp.c

index 834656897e4c8d0c414d6c09a45a92dadc623dae..73555c0d2c18e3c61cd1f8bc8ede747abfe1167a 100644 (file)
@@ -1490,13 +1490,13 @@ emit_EQ (gcc_jit_rvalue *x, gcc_jit_rvalue *y)
   return
     emit_OR (
       gcc_jit_context_new_comparison (
-        comp.ctxt, gcc_jit_context_new_location (comp.ctxt, "comp.c", __LINE__, 0),
+        comp.ctxt, NULL,
         GCC_JIT_COMPARISON_EQ,
         emit_XLI (x), emit_XLI (y)),
       emit_AND (
        gcc_jit_lvalue_as_rvalue (
          gcc_jit_rvalue_dereference (comp.f_symbols_with_pos_enabled_ref,
-                                     gcc_jit_context_new_location (comp.ctxt, "comp.c", __LINE__, 0))),
+                                     NULL)),
         emit_OR (
           emit_AND (
             emit_SYMBOL_WITH_POS_P (x),
@@ -4561,7 +4561,6 @@ Return t on success.  */)
       register_emitter (Qnumberp, emit_numperp);
       register_emitter (Qintegerp, emit_integerp);
       register_emitter (Qcomp_maybe_gc_or_quit, emit_maybe_gc_or_quit);
-      register_emitter (Qsymbol_with_pos_p, emit_SYMBOL_WITH_POS_P);
     }
 
   comp.ctxt = gcc_jit_context_acquire ();