From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>, David Ahern <dsahern@gmail.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Namhyung Kim <namhyung.kim@lge.com>
Subject: Re: [RFC] perf: perf_event_attr anon unions and static initializer issue
Date: Fri, 05 Oct 2012 13:01:19 +0200 [thread overview]
Message-ID: <1349434879.14388.35.camel@twins> (raw)
In-Reply-To: <CABPqkBRCjd5=9t1URNXQvu8GbAHMjf3ixKtb6BV7ebBTZDLF1A@mail.gmail.com>
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.
next prev parent reply other threads:[~2012-10-05 11:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 10:36 [RFC] perf: perf_event_attr anon unions and static initializer issue Stephane Eranian
2012-10-05 11:01 ` Peter Zijlstra [this message]
2012-10-05 11:49 ` Stephane Eranian
2012-10-05 12:43 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349434879.14388.35.camel@twins \
--to=peterz@infradead.org \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=namhyung.kim@lge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).