emacs-devel
[Top][All Lists]
Advanced

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

Re: __builtin_assume warnings


From: Mattias Engdegård
Subject: Re: __builtin_assume warnings
Date: Mon, 17 Aug 2020 16:05:10 +0200

16 aug. 2020 kl. 10.23 skrev Mattias Engdegård <mattiase@acm.org>:
> 
> 15 aug. 2020 kl. 04.32 skrev Paul Eggert <eggert@cs.ucla.edu>:
>> 
>> On 8/12/20 2:38 AM, Mattias Engdegård wrote:
>>> ../../emacs/src/lisp.h:1812:12: warning: the argument to '__builtin_assume' 
>>> has
>>>      side effects that will be discarded [-Wassume]
>>>  eassume (0 <= i && i < bool_vector_size (a));
>> 
>> Thanks for mentioning that. I installed the attached, which should pacify 
>> clang there.

Actually, there are warnings in more places. Looks like Clang does not yet look 
inside inline functions for -Wassume.

frame.c:1686:12: warning: the argument to '__builtin_assume' has side effects
      that will be discarded [-Wassume]
  eassume (CONSP (Vframe_list));
           ^~~~~~~~~~~~~~~~~~~
./lisp.h:182:32: note: expanded from macro 'eassume'
# define eassume(cond) assume (cond)
                               ^~~~
../lib/verify.h:305:38: note: expanded from macro 'assume'
# define assume(R) __builtin_assume (R)
                                     ^
frame.c:1710:12: warning: the argument to '__builtin_assume' has side effects
      that will be discarded [-Wassume]
  eassume (CONSP (Vframe_list));
           ^~~~~~~~~~~~~~~~~~~
./lisp.h:182:32: note: expanded from macro 'eassume'
# define eassume(cond) assume (cond)
                               ^~~~
../lib/verify.h:305:38: note: expanded from macro 'assume'
# define assume(R) __builtin_assume (R)
                                     ^
frame.c:2020:16: warning: the argument to '__builtin_assume' has side effects
      that will be discarded [-Wassume]
      eassume (CONSP (Vframe_list));
               ^~~~~~~~~~~~~~~~~~~
./lisp.h:182:32: note: expanded from macro 'eassume'
# define eassume(cond) assume (cond)
                               ^~~~
../lib/verify.h:305:38: note: expanded from macro 'assume'
# define assume(R) __builtin_assume (R)
                                     ^
character.c:814:16: warning: the argument to '__builtin_assume' has side effects
      that will be discarded [-Wassume]
      eassume (CHARACTERP (args[i]));
               ^~~~~~~~~~~~~~~~~~~~
./lisp.h:182:32: note: expanded from macro 'eassume'
# define eassume(cond) assume (cond)
                               ^~~~
../lib/verify.h:305:38: note: expanded from macro 'assume'
# define assume(R) __builtin_assume (R)
                                     ^
alloc.c:1935:12: warning: the argument to '__builtin_assume' has side effects
      that will be discarded [-Wassume]
  eassume (STRING_MULTIBYTE (string));
           ^~~~~~~~~~~~~~~~~~~~~~~~~
./lisp.h:182:32: note: expanded from macro 'eassume'
# define eassume(cond) assume (cond)
                               ^~~~
../lib/verify.h:305:38: note: expanded from macro 'assume'
# define assume(R) __builtin_assume (R)
                                     ^
data.c:3153:12: warning: the argument to '__builtin_assume' has side effects
      that will be discarded [-Wassume]
  eassume (FIXNUMP (value));
           ^~~~~~~~~~~~~~~
./lisp.h:182:32: note: expanded from macro 'eassume'
# define eassume(cond) assume (cond)
                               ^~~~
../lib/verify.h:305:38: note: expanded from macro 'assume'
# define assume(R) __builtin_assume (R)
                                     ^




reply via email to

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