From: Mark Wielaard Date: Sat, 13 Jun 2026 22:01:49 +0000 (+0200) Subject: Fix compile issue in VEX/priv/guest_amd64_helpers.c with GCC8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Fvalgrind.git Fix compile issue in VEX/priv/guest_amd64_helpers.c with GCC8 GCC 8.5.0 doesn't like a direct variable declaration after a case statement. priv/guest_amd64_helpers.c: In function 'amd64g_dirtyhelper_CPUID_avx2': priv/guest_amd64_helpers.c:3653:10: error: a label can only be part of a statement and a declaration is not a statement Create a block for the case statement to declare the variable. --- diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c index a516e498b..2fc532868 100644 --- a/VEX/priv/guest_amd64_helpers.c +++ b/VEX/priv/guest_amd64_helpers.c @@ -3649,12 +3649,13 @@ void amd64g_dirtyhelper_CPUID_avx2 ( VexGuestAMD64State* st, case 0x80000000: SET_ABCD(0x80000008, 0x00000000, 0x00000000, 0x00000000); break; - case 0x80000001: + case 0x80000001: { ULong ecx_extra = 0; ecx_extra = hasLZCNT ? (1U << 5) : 0; SET_ABCD(0x00000000, 0x00000000, 0x00000001 | ecx_extra, 0x2c100800); break; + } case 0x80000002: SET_ABCD(0x65746e49, 0x2952286c, 0x726f4320, 0x4d542865); break;