qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] configure: Change to -std=gnu11
@ 2021-06-14 23:31 Richard Henderson
  2021-06-14 23:31 ` [PATCH v2 1/8] configure: Use -std=gnu11 Richard Henderson
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: Richard Henderson @ 2021-06-14 23:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, thuth, ehabkost

Now that we assume gcc 7.5 as a minimum, we have the option of
changing to a newer C standard.  The two major new features that
I think apply are _Generic and _Static_assert.

While Paolo created a remarkably functional replacement for _Generic
using builtins, the error messages that you get out of the keyword
are *vastly* more intelligable, and the syntax is easier to read.

While I'd like to prefer _Static_assert over QEMU_BUILD_BUG_ON
going forward, and would like to convert existing uses, that is
a much bigger job.  Especially since the test condition is inverted.
In the meantime, can drop the configure detection.

Changes for v2:
  * Remove QEMU_LOCK_FUNC and QEMU_UNLOCK_FUNC as unused.


r~


Richard Henderson (8):
  configure: Use -std=gnu11
  softfloat: Use _Generic instead of QEMU_GENERIC
  util: Use real functions for thread-posix QemuRecMutex
  util: Pass file+line to qemu_rec_mutex_unlock_impl
  util: Use unique type for QemuRecMutex in thread-posix.h
  include/qemu/lockable: Use _Generic instead of QEMU_GENERIC
  qemu/compiler: Remove QEMU_GENERIC
  configure: Remove probe for _Static_assert

 configure                   | 22 +--------
 meson.build                 |  2 +-
 include/qemu/compiler.h     | 51 ---------------------
 include/qemu/lockable.h     | 90 +++++++++++++++++--------------------
 include/qemu/thread-posix.h | 14 +++---
 include/qemu/thread-win32.h |  6 ---
 include/qemu/thread.h       | 15 ++++++-
 fpu/softfloat.c             | 16 ++++---
 util/qemu-thread-posix.c    | 24 +++++++++-
 util/qemu-thread-win32.c    |  2 +-
 10 files changed, 98 insertions(+), 144 deletions(-)

-- 
2.25.1



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

end of thread, other threads:[~2021-06-16 13:07 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 23:31 [PATCH v2 0/8] configure: Change to -std=gnu11 Richard Henderson
2021-06-14 23:31 ` [PATCH v2 1/8] configure: Use -std=gnu11 Richard Henderson
2021-06-15  7:43   ` Thomas Huth
2021-06-15 10:10   ` Alex Bennée
2021-06-15 13:49   ` Philippe Mathieu-Daudé
2021-06-14 23:31 ` [PATCH v2 2/8] softfloat: Use _Generic instead of QEMU_GENERIC Richard Henderson
2021-06-15  7:48   ` Thomas Huth
2021-06-15 10:18   ` Alex Bennée
2021-06-14 23:31 ` [PATCH v2 3/8] util: Use real functions for thread-posix QemuRecMutex Richard Henderson
2021-06-15  7:50   ` Thomas Huth
2021-06-15 10:54   ` Alex Bennée
2021-06-14 23:31 ` [PATCH v2 4/8] util: Pass file+line to qemu_rec_mutex_unlock_impl Richard Henderson
2021-06-15 10:56   ` Alex Bennée
2021-06-15 13:51   ` Philippe Mathieu-Daudé
2021-06-14 23:31 ` [PATCH v2 5/8] util: Use unique type for QemuRecMutex in thread-posix.h Richard Henderson
2021-06-15  7:56   ` Thomas Huth
2021-06-15 10:57   ` Alex Bennée
2021-06-14 23:31 ` [PATCH v2 6/8] include/qemu/lockable: Use _Generic instead of QEMU_GENERIC Richard Henderson
2021-06-15 11:25   ` Alex Bennée
2021-06-14 23:31 ` [PATCH v2 7/8] qemu/compiler: Remove QEMU_GENERIC Richard Henderson
2021-06-15 11:26   ` Alex Bennée
2021-06-14 23:31 ` [PATCH v2 8/8] configure: Remove probe for _Static_assert Richard Henderson
2021-06-15  7:58   ` Thomas Huth
2021-06-15 10:29   ` Alex Bennée
2021-06-14 23:42 ` [PATCH v2 0/8] configure: Change to -std=gnu11 no-reply
2021-06-16 13:04 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).