emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suspicious warning in W64 build


From: Eli Zaretskii
Subject: Re: Suspicious warning in W64 build
Date: Fri, 15 Sep 2017 11:59:47 +0300

> From: Richard Copley <address@hidden>
> Date: Thu, 14 Sep 2017 20:34:42 +0100
> Cc: Fabrice Popineau <address@hidden>, 
>       Emacs Development <address@hidden>
> 
> On 14 September 2017 at 18:47, Eli Zaretskii <address@hidden> wrote:
> > It was a mess, but I hope I fixed these warnings now.  Please try the
> > latest master and see if any fallout remains.
> 
> Not much. Here's another transcript. It's a lot better.

Some of the warnings are not Windows specific, so I'm CC'ing Paul.

    CC       eval.o
  eval.c: In function 'internal_catch':
  eval.c:1431:19: warning: variable 'c' might be clobbered by 'longjmp' or 
'vfork' [-Wclobbered]
     struct handler *c = handlerlist->nextfree;
                     ^
  eval.c: In function 'internal_condition_case':
  eval.c:1431:19: warning: variable 'c' might be clobbered by 'longjmp' or 
'vfork' [-Wclobbered]
  eval.c: In function 'internal_condition_case_1':
  eval.c:1431:19: warning: variable 'c' might be clobbered by 'longjmp' or 
'vfork' [-Wclobbered]
  eval.c: In function 'internal_condition_case_2':
  eval.c:1431:19: warning: variable 'c' might be clobbered by 'longjmp' or 
'vfork' [-Wclobbered]
  eval.c: In function 'internal_condition_case_n':
  eval.c:1431:19: warning: variable 'c' might be clobbered by 'longjmp' or 
'vfork' [-Wclobbered]
  eval.c: In function 'internal_catch.constprop':
  eval.c:1431:19: warning: variable 'c' might be clobbered by 'longjmp' or 
'vfork' [-Wclobbered]

Not sure what to do about this.  Add 'volatile' to the declaration of
'c'?

    CC       search.o
  search.c: In function 'Freplace_match':
  search.c:2621:15: warning: argument 1 value '2305843009213693951' exceeds 
maximum object size 2147483647 [-Walloc-size-larger-than=]
         substed = xmalloc (substed_alloc_size);
         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from search.c:24:0:
  lisp.h:4439:14: note: in a call to allocation function 'xmalloc' declared here
   extern void *xmalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1));
                ^~~~~~~

This seems to imply that m4/manywarnings.m4 has a bug: it somehow
deduces that a 64-bit Windows build can only allocate up to LONG_MAX
bytes.  But 'long' is a 32-bit type on 64-bit MS-Windows, whereas
'size_t' is a 64-bit type, as is 'ptrdiff_t', which might be the
reason for this problem, if manywarnings.m4 somehow assumes that this
combination cannot happen.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]