From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644AbdKUIcH (ORCPT ); Tue, 21 Nov 2017 03:32:07 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:32858 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751330AbdKUIcF (ORCPT ); Tue, 21 Nov 2017 03:32:05 -0500 X-Google-Smtp-Source: AGs4zMYVIZVK7mxR91K2IL44GIJiNWjgWgIO2BbFy6/Z7G3tjojBBe1Hh1Pr5z0kscn+EC86gGkfLw== Date: Tue, 21 Nov 2017 09:32:02 +0100 From: Ingo Molnar To: Dave Hansen Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 2/4] x86, selftests, mpx: fix up weird arrays Message-ID: <20171121083202.fmp3mvtq7iwd6nc3@gmail.com> References: <20171111001226.810E7A73@viggo.jf.intel.com> <20171111001229.58A7933D@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171111001229.58A7933D@viggo.jf.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen wrote: > > The MPX hardware data structurse are defined in a weird way: they define > their size in bytes and then union that with the type with which we want > to access them. > > Yes, this is weird, but it does work. But, new GCC's complain that we > are accessing the array out of bounds. Just make it a zero-sized array > so gcc will stop complaining. There was not really a bug here. Note, I've added your missing Signed-off-by line. Thanks, Ingo