Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932267Ab2JELBg (ORCPT ); Fri, 5 Oct 2012 07:01:36 -0400 Received: from casper.infradead.org ([85.118.1.10]:52189 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932238Ab2JELBf convert rfc822-to-8bit (ORCPT ); Fri, 5 Oct 2012 07:01:35 -0400 Message-ID: <1349434879.14388.35.camel@twins> Subject: Re: [RFC] perf: perf_event_attr anon unions and static initializer issue From: Peter Zijlstra To: Stephane Eranian Cc: LKML , "mingo@elte.hu" , David Ahern , Arnaldo Carvalho de Melo , Namhyung Kim Date: Fri, 05 Oct 2012 13:01:19 +0200 In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 23 On Fri, 2012-10-05 at 12:36 +0200, Stephane Eranian wrote: > struct perf_event_attr attr = { .config = 0x1234, .config1 = 0x456 }; > Does anyone have a better solution to propose? struct perf_event_attr attr = { .config = 0x1234, { .config1 = 0x5678 }, }; sometimes works, but apparently not in this case.. its a bit unfortunate indeed. EDG based compilers and the latest C std use your version -- hence also 4.6 supporting it. Yeah, I'm afraid we're stuck with this until a future where modern C isn't modern anymore. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/