From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2900 invoked by alias); 8 Jan 2014 23:23:46 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 2887 invoked by uid 89); 8 Jan 2014 23:23:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 08 Jan 2014 23:23:45 +0000 Received: by mail-wi0-f177.google.com with SMTP id cc10so2771035wib.4 for ; Wed, 08 Jan 2014 15:23:42 -0800 (PST) X-Received: by 10.180.90.199 with SMTP id by7mr449938wib.38.1389223421948; Wed, 08 Jan 2014 15:23:41 -0800 (PST) Received: from [192.168.1.27] (45.Red-81-38-14.dynamicIP.rima-tde.net. [81.38.14.45]) by mx.google.com with ESMTPSA id f7sm172841wjb.7.2014.01.08.15.23.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jan 2014 15:23:41 -0800 (PST) Message-ID: <52CDDDFB.2060105@gmail.com> Date: Wed, 08 Jan 2014 23:23:00 -0000 From: =?UTF-8?B?w4FuZ2VsIEdvbnrDoWxleg==?= User-Agent: Thunderbird MIME-Version: 1.0 To: Ian Pilcher CC: gcc-help Subject: Re: Flexible array member initializers References: <52CDB80F.2080807@gmail.com> In-Reply-To: <52CDB80F.2080807@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00029.txt.bz2 On 08/01/14 21:41, Ian Pilcher wrote: > Ideally I could create some sort of generic macro that "casts" (using > the term very loosely) any static initializer to an array of unsigned > char that contains its binary representation. Sadly, I don't think > that's actually possible. I think you want to use an union, not a flexible array (yes, you will overallocate for some types, but should be saner).