Re: [Qemu-devel] Handling of fall through code

2019-07-22 Thread Peter Maydell
On Sun, 21 Jul 2019 at 17:39, Stefan Weil wrote: > Peter, is this fall through for ARM correct? > > https://github.com/qemu/qemu/blob/master/target/arm/helper.c#L7958 > > It looks rather suspicious and is one of the remaining related compiler > warnings. It's wrong, and Philippe posted a patch fo

Re: [Qemu-devel] Handling of fall through code

2019-07-21 Thread Stefan Weil
Am 09.07.2019 um 10:25 schrieb Peter Maydell: > On Mon, 8 Jul 2019 at 20:39, Aleksandar Markovic > wrote: >> 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

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-09 Thread Peter Maydell
On Mon, 8 Jul 2019 at 20:39, Aleksandar Markovic wrote: > 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).

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-08 Thread Markus Armbruster
Peter Maydell writes: > On Sun, 7 Jul 2019 at 21:26, Stefan Weil wrote: >> This is a general problem all over the QEMU code. I usually compile with >> nearly all warnings enabled and get now lots of errors with the latest >> code and after updating to gcc-8.3.0 (Debian buster). It should be >> r

Re: [Qemu-devel] Handling of fall through code

2019-07-08 Thread Markus Armbruster
Stefan Weil writes: > Am 08.07.19 um 06:40 schrieb Markus Armbruster: > [...] >> However, the gnu_ in gnu_scanf tells the compiler we're linking with the >> GNU C Library, which seems unwise. Hmm, we already use gnu_printf. >> Commit 9c9e7d51bf0: >> >> Newer gcc versions support format gnu_

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-08 Thread Aleksandar Markovic
> ...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 statemen

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-08 Thread Daniel P . Berrangé
On Mon, Jul 08, 2019 at 02:04:27PM +0200, Stefan Weil wrote: > Am 08.07.2019 um 10:14 schrieb Aleksandar Markovic: > > > > On Jul 7, 2019 10:26 PM, "Stefan Weil" > > wrote: > > > - There is also fallthrough code which is obviously not correct > > (even in target/mips/trans

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-08 Thread Stefan Weil
Am 08.07.2019 um 10:14 schrieb Aleksandar Markovic: > > On Jul 7, 2019 10:26 PM, "Stefan Weil" > wrote: > > - There is also fallthrough code which is obviously not correct > (even in target/mips/translate.c). > > Can you please be more specific about those cases from > tar

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-08 Thread Peter Maydell
On Sun, 7 Jul 2019 at 21:26, Stefan Weil wrote: > This is a general problem all over the QEMU code. I usually compile with > nearly all warnings enabled and get now lots of errors with the latest > code and after updating to gcc-8.3.0 (Debian buster). It should be > reproducible by enabling -Werro

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-08 Thread Aleksandar Markovic
On Jul 7, 2019 10:26 PM, "Stefan Weil" wrote: > > Am 13.08.18 um 19:52 schrieb Aleksandar Markovic: > >> From: Aleksandar Markovic >> >> Mark switch fallthroughs with comments, in cases fallthroughs >> are intentional. > > > > This is a general problem all over the QEMU code. I usually compile wi

Re: [Qemu-devel] Handling of fall through code

2019-07-07 Thread Stefan Weil
Am 08.07.19 um 06:40 schrieb Markus Armbruster: Stefan Weil writes: - Some code is correct, but has no indication that the fallthrough is intentional. I'd treat that as a bug. Sure. - There is also fallthrough code which is obviously not correct (even in target/mips/translate.c). Bu

Re: [Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-07 Thread Markus Armbruster
Stefan Weil writes: > Am 13.08.18 um 19:52 schrieb Aleksandar Markovic: > >> From: Aleksandar Markovic >> >> Mark switch fallthroughs with comments, in cases fallthroughs >> are intentional. > > > This is a general problem all over the QEMU code. I usually compile > with nearly all warnings enab

[Qemu-devel] Handling of fall through code (was: [PATCH v8 04/87] target/mips: Mark switch fallthroughs with interpretable comments

2019-07-07 Thread Stefan Weil
Am 13.08.18 um 19:52 schrieb Aleksandar Markovic: From: Aleksandar Markovic Mark switch fallthroughs with comments, in cases fallthroughs are intentional. This is a general problem all over the QEMU code. I usually compile with nearly all warnings enabled and get now lots of errors with th