qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v


From: Daniel P . Berrangé
Subject: Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Date: Wed, 9 Jan 2019 10:47:40 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Jan 03, 2019 at 03:06:23PM +0100, Thomas Huth wrote:
> On 2019-01-03 14:32, Philippe Mathieu-Daudé wrote:
> > On 1/3/19 2:23 PM, Peter Maydell wrote:
> >> On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic
> >> <address@hidden> wrote:
> >>> MIPS queue for December 2018 - v2
> > [...]
> >> Hi; I'm afraid this doesn't build on all my test hosts:
> >>
> >> target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’:
> >> target/mips/translate.c:25092:9: error: ‘for’ loop initial
> >> declarations are only allowed in C99 mode
> >>          for (int i = 2; i >= 0; i--) {
> >>          ^
> >> target/mips/translate.c:25092:9: note: use option -std=c99 or
> >> -std=gnu99 to compile your code
> >> target/mips/translate.c:25129:9: error: ‘for’ loop initial
> >> declarations are only allowed in C99 mode
> >>          for (int i = 2; i >= 0; i--) {
> >>          ^
> >>
> >> (This probably only shows up on builds with older versions
> >> of gcc which don't default to c99.)
> >>
> >> We don't use variable-declaration-in-for-loop.
> > 
> > Hmmm I wonder if we shouldn't relax that now than all supported
> > compilers do support C99.
> 
> Maybe we could / should enforce compiling with -std=gnu11 now? That
> would also fix the problem with the duplicated typedefs on older
> compilers, see e.g.:
> 
> https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05829.html

Your previous patch set min GCC to 4.8

  commit efc6c070acabd92283f8786cc835684d09def12f
  Author: Thomas Huth <address@hidden>
  Date:   Mon Dec 3 10:12:32 2018 +0100

    configure: Add a test for the minimum compiler version

The problem is that I found the 4.x series explicitly said gnu11 was
"incomplete and experimental" (ie don't use it)

  https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg02055.html

Even if QEMU built without warnings with std11 on 4.x, i'd still be
concerned that it was silently doing something wrong due to std11
being considered experimental.

We could definitely ask for std99, as while that was also incomplete
in 4.x, it was at least /not/ marked experiemental.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]