GNU bug report logs - #45303
28.0.50; [feature/native-comp] comp.c compilation error on Windows 10

Previous Next

Package: emacs;

Reported by: Liāu, Kiong-Gē 廖宮毅 <gongyi.liao <at> gmail.com>

Date: Thu, 17 Dec 2020 20:22:01 UTC

Severity: normal

Found in version 28.0.50

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


Message #158 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#45303: #45303 [feature/native-comp] building error on Windows
Date: Mon, 21 Dec 2020 00:53:40 +0000
On Sun 20 Dec 2020, Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
> [...]
>
>> Thanks, hope 18ca9ea08a fix it.
>                ^^^^^
>                3bb2fd0c58

Thanks Andrea, that problem is fixed. There are still some warnings from
comp.c that indicate other troubles:

C:/emacs/git/emacs/native/src/comp.c: In function 'Fcomp__compile_ctxt_to_file':
C:/emacs/git/emacs/native/src/comp.c:4461:12: warning: unused variable 'oldset' [-Wunused-variable]
 4461 |   sigset_t oldset;
      |            ^~~~~~
C:/emacs/git/emacs/native/src/comp.c: In function 'eln_load_path_final_clean_up':
C:/emacs/git/emacs/native/src/comp.c:4626:12: warning: passing argument 7 of 'internal_condition_case_5' from incompatible pointer type [-Wincompatible-pointer-types]
 4626 |        Qt, return_nil, Qnil);
      |            ^~~~~~~~~~
      |            |
      |            struct Lisp_X * (*)(struct Lisp_X *)
In file included from C:/emacs/git/emacs/native/src/comp.c:23:
C:/emacs/git/emacs/native/src/lisp.h:4161:195: note: expected 'Lisp_Object' {aka 'struct Lisp_X *'} but argument is of type 'struct Lisp_X * (*)(struct Lisp_X *)'
 4161 | extern Lisp_Object internal_condition_case_5 (Lisp_Object (*) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
      |                                                                                                                                                                                                   ^~~~~~~~~~~
In file included from C:/emacs/git/emacs/native/src/lisp.h:944,
                 from C:/emacs/git/emacs/native/src/comp.c:23:
./globals.h:6980:14: warning: passing argument 8 of 'internal_condition_case_5' from incompatible pointer type [-Wincompatible-pointer-types]
 6980 | #define Qnil builtin_lisp_symbol (0)
      |              ^~~~~~~~~~~~~~~~~~~~~~~
      |              |
      |              Lisp_Object {aka struct Lisp_X *}
C:/emacs/git/emacs/native/src/comp.c:4626:24: note: in expansion of macro 'Qnil'
 4626 |        Qt, return_nil, Qnil);
      |                        ^~~~
In file included from C:/emacs/git/emacs/native/src/comp.c:23:
C:/emacs/git/emacs/native/src/lisp.h:4161:208: note: expected 'struct Lisp_X * (*)(struct Lisp_X *)' but argument is of type 'Lisp_Object' {aka 'struct Lisp_X *'}
 4161 | extern Lisp_Object internal_condition_case_5 (Lisp_Object (*) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
      |                                                                                                                                                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The internal_condition_case_5 usage looks like the last two arguments
might be swapped.

The return_nil function is also declared as a nested function: that is a
gcc extension, so it is more portable to define it as an ordinary static
function.

    AndyM





This bug report was last modified 4 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.