On 9/27/26 08:51, Philippe Mathieu-Daudé wrote:
On 27/9/26 10:58, Richard Henderson wrote:
Signed-off-by: Richard Henderson <[email protected]>
---
  include/qemu/compiler.h | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 3661dc5fbaa..8fa4552ef8f 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -230,6 +230,13 @@
  # define QEMU_UNINITIALIZED
  #endif
+/*
+ * Alias the current function definition to another.
+ */
+
+#define QEMU_ALIAS(N) \
+    __attribute__((alias(stringify(glue(__USER_LABEL_PREFIX__, N)))))
+
  /*
   * http://clang.llvm.org/docs/ThreadSafetyAnalysis.html
   *

On macOS:

../../tcg/tcg-op.c:1820:38: error: aliases are not supported on darwin
 1820 | void tcg_gen_discard_ptr(TCGv_ptr a) QEMU_ALIAS(tcg_gen_discard_i64);
       |                                      ^
include/qemu/compiler.h:238:20: note: expanded from macro 'QEMU_ALIAS'
  238 |     __attribute__((alias(stringify(glue(__USER_LABEL_PREFIX__, N)))))
       |                    ^


Bah.  Ok.


r~

Reply via email to