all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* __builtin_assume warnings
@ 2020-08-12  9:38 Mattias Engdegård
  2020-08-15  2:32 ` Paul Eggert
  0 siblings, 1 reply; 8+ messages in thread
From: Mattias Engdegård @ 2020-08-12  9:38 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

Building on macOS with Apple clang version 11.0.0 (clang-1100.0.33.17) now gives a stream of warnings about:

In file included from ../../emacs/src/dispnew.c:27:
../../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));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../emacs/src/lisp.h:182:32: note: expanded from macro 'eassume'
# define eassume(cond) assume (cond)
                               ^~~~
../../emacs/lib/verify.h:305:38: note: expanded from macro 'assume'
# define assume(R) __builtin_assume (R)
                                     ^

We could build with -Wno-assume, or alter the definition of 'assume' to

# define assume(R) _Pragma("clang diagnostic push")                     \
                   _Pragma("clang diagnostic ignored \"-Wassume\"")     \
                   __builtin_assume (R)                                 \
                   _Pragma("clang diagnostic pop")

but neither seems entirely satisfactory.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-19  8:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-12  9:38 __builtin_assume warnings Mattias Engdegård
2020-08-15  2:32 ` Paul Eggert
2020-08-16  8:23   ` Mattias Engdegård
2020-08-17 14:05     ` Mattias Engdegård
2020-08-17 22:11       ` Paul Eggert
2020-08-18  7:11         ` Mattias Engdegård
2020-08-18 22:53           ` Paul Eggert
2020-08-19  8:01             ` Mattias Engdegård

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.