qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [V2 PATCH 6/9] target-ppc: Load Quadword


From: Eric Blake
Subject: Re: [Qemu-devel] [Qemu-ppc] [V2 PATCH 6/9] target-ppc: Load Quadword
Date: Wed, 05 Feb 2014 09:27:04 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 02/05/2014 09:12 AM, Tom Musta wrote:
> On 2/5/2014 3:43 AM, Alexander Graf wrote:
>> I would've expected the compiler to emit a warning at this point because 
>> you're declaring variables outside of the beginning of a scope?
>

Only if you enforce C89 compilation.  But qemu requires a C99 compiler,
where it is not a warning in gcc unless you enable -Wjump-misses-init
and have a goto statement that bypasses the declaration.

> I did not see a warning on either of my test platforms (PowerPC/RHEL/GCC 
> 4.4.7, Intel/Ubuntu/GCC 4.6.3).  But I will certainly fix.

Whether or not the compiler enforces it, some projects still like to
stick to C89 declarations-before-statements, even when otherwise
requiring C99 compiler features.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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