Subject: Re: bug#45303: #45303 [feature/native-comp] building error on Windows

From: Andrea Corallo <[email-masked]>
Date: Mon, 21 Dec 2020 08:02:35 +0000

Andy Moreton <[email-masked]> writes:

> 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" <[email-masked]> 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.

Right, f4153cac3e and 2526032ea9 should fix those two issues.

IIUC compilation-wise we are left only with the zlib issue now.

  Andrea