[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] ta
From: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments |
Date: |
Mon, 8 Jul 2019 19:39:00 +0000 |
> ...this is the list of warnings for target/mips/translate.c:
> /home/debian/src/github/qemu/qemu/target/mips/translate.c:10047:13: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
> /home/debian/src/github/qemu/qemu/target/mips/translate.c:10056:13: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
> /home/debian/src/github/qemu/qemu/target/mips/translate.c:20138:13: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
> /home/debian/src/github/qemu/qemu/target/mips/translate.c:20144:13: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
> /home/debian/src/github/qemu/qemu/target/mips/translate.c:6739:9: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
> /home/debian/src/github/qemu/qemu/target/mips/translate.c:9820:13: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
> /home/debian/src/github/qemu/qemu/target/mips/translate.c:9829:13: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
They are all real issues. Two of them are cases of missing '/* fall through */'
(I plan to send fixes for them in 4.2 timeframe) and five of them are cases of
missing 'break' (I plan to send corresponding fixes for 4.1 in few days).
Last time I checked gcc 'implicit-fallthrough' option was around five months
ago, and meanwhile some new code with missing annotation sneaked in. However,
there is some news - it appears to me that gcc 8 improved that feature
significantly compared to gcc 7: some cases now detected by gcc 8 are simply
went undetected by gcc 7. It appears that at least some of such cases are
ignored by Coverity too.
Great info! Thanks again!!
Aleksandar
> Stefan
Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments, Peter Maydell, 2019/07/08