[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/5] x86/hvm: Adjust hvmemul_rep_stos() to compile with -Wvla
>>> On 25.09.18 at 12:31, <andrew.cooper3@xxxxxxxxxx> wrote: > On 24/09/18 15:16, Jan Beulich wrote: >>>>> On 24.09.18 at 15:00, <andrew.cooper3@xxxxxxxxxx> wrote: >>> For at least "gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609", the >>> typecast of buf triggers a Variable Length Array warning. >>> >>> Alter the asm expression to avoid the typecast, which necessitates the >>> introduction of a memory clobber as the compiler can no longer identify >>> the total quantity of written memory. >> I dislike this, but what do you do. Would be quite helpful though to >> have a comment there, or else I might be tempted to undo the >> memory clobber in a couple of months/years time. > > On further investigation, its all versions of GCC and Clang when using > -Wvla. I'll tweak the commit message so it doesn't read as if it might > be a quirk in that specific compiler. Well, it's a quirk in all compilers then. That type cast certainly is not an _instantiation_ of a VLA, yet only those are what we want to prevent (and what I understand the warning is to point out). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |