[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs |
Date: |
Mon, 21 Jan 2013 15:27:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Max Filippov <address@hidden> writes:
> On Mon, Jan 21, 2013 at 5:11 PM, Markus Armbruster <address@hidden> wrote:
>> Blue Swirl <address@hidden> writes:
>>
>>> Recent Clang compilers have preliminary support for finding
>>> unannotated fallthrough cases in switch statements with
>>> compiler flag -Wimplicit-fallthrough. The support is incomplete,
>>> it's only possible to annotate the case in C++ but not in C, so it
>>> wouldn't be useful to enable the flag for QEMU yet.
>>>
>>> Mark cases which don't have a comment about fall through with
>>> a comment. In legitimate fall through cases the comment can be
>>> edited later to mark the case for future readers.
>>
>> Let's clean this up properly instead, as far as we can. Details inline.
>> Maintainers, please check out the parts that apply to your code.
>>
>>> Signed-off-by: Blue Swirl <address@hidden>
>
> [...]
>
>>> diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c
>>> index 3813a72..d829702 100644
>>> --- a/target-xtensa/op_helper.c
>>> +++ b/target-xtensa/op_helper.c
>>> @@ -443,8 +443,10 @@ void HELPER(check_atomctl)(CPUXtensaState *env,
>>> uint32_t pc, uint32_t vaddr)
>>> switch (access & PAGE_CACHE_MASK) {
>>> case PAGE_CACHE_WB:
>>> atomctl >>= 2;
>>> + /* XXX: questionable fallthrough */
>>> case PAGE_CACHE_WT:
>>> atomctl >>= 2;
>>> + /* XXX: questionable fallthrough */
>>> case PAGE_CACHE_BYPASS:
>>> if ((atomctl & 0x3) == 0) {
>>> HELPER(exception_cause_vaddr)(env, pc,
>>
>> Looks intentional. Max Filippov?
>
> Correct, these are intentional.
Thanks! Who's going to take care of adding /* fall through */ ?
- Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs, (continued)
Re: [Qemu-ppc] [PATCH] Annotate questionable fallthroughs, Paul Brook, 2013/01/20
Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs, Markus Armbruster, 2013/01/21
Re: [Qemu-ppc] [PATCH] Annotate questionable fallthroughs, Kevin Wolf, 2013/01/21
Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs, Markus Armbruster, 2013/01/21
Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs, Paul Brook, 2013/01/21