[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/12] compiler.h: replace QEMU_NORETURN with G_NORETURN
From: |
Richard Henderson |
Subject: |
Re: [PATCH 04/12] compiler.h: replace QEMU_NORETURN with G_NORETURN |
Date: |
Thu, 24 Feb 2022 09:31:37 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 2/24/22 08:36, marcandre.lureau@redhat.com wrote:
From: Marc-André Lureau <marcandre.lureau@redhat.com>
G_NORETURN was introduced in glib 2.68, fallback to G_GNUC_NORETURN in
glib-compat.
Note that this attribute must be placed before the function declaration
(bringing a bit of consistency in qemu codebase usage).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
For C11, G_NORETURN is a wrapper for _Noreturn.
Since we're using C11, we should just use _Noreturn.
void xtensa_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
MMUAccessType access_type, int mmu_idx,
- uintptr_t retaddr) QEMU_NORETURN;
+ uintptr_t retaddr) G_NORETURN;
Incorrect placement. I didn't scan the whole patch; I assume that using _Noreturn will
flag this up as an error.
-static void QEMU_NORETURN dump_core_and_abort(int target_sig)
+G_NORETURN static void dump_core_and_abort(int target_sig)
I guess this can go either place, but I think I prefer the scope specifier
first.
r~
- [PATCH 00/12] Misc cleanups, marcandre . lureau, 2022/02/24
- [PATCH 01/12] compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT, marcandre . lureau, 2022/02/24
- [PATCH 02/12] compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED, marcandre . lureau, 2022/02/24
- [PATCH 03/12] osdep.h: move qemu_build_not_reached(), marcandre . lureau, 2022/02/24
- [PATCH 04/12] compiler.h: replace QEMU_NORETURN with G_NORETURN, marcandre . lureau, 2022/02/24
- Re: [PATCH 04/12] compiler.h: replace QEMU_NORETURN with G_NORETURN,
Richard Henderson <=
- [PATCH 05/12] compiler.h: drop __printf__ macro MinGW/glib workaround, marcandre . lureau, 2022/02/24
[PATCH 06/12] Replace config-time define HOST_WORDS_BIGENDIAN, marcandre . lureau, 2022/02/24