From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10356 invoked by alias); 18 Dec 2015 21:42:51 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 10346 invoked by uid 89); 18 Dec 2015 21:42:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=beware, jay, Jay X-HELO: mail-pf0-f176.google.com Received: from mail-pf0-f176.google.com (HELO mail-pf0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 18 Dec 2015 21:42:49 +0000 Received: by mail-pf0-f176.google.com with SMTP id o64so54911566pfb.3 for ; Fri, 18 Dec 2015 13:42:49 -0800 (PST) X-Received: by 10.98.68.198 with SMTP id m67mr8721905pfi.56.1450474967717; Fri, 18 Dec 2015 13:42:47 -0800 (PST) Received: from [10.230.71.69] (33.sub-97-45-214.myvzw.com. [97.45.214.33]) by smtp.gmail.com with ESMTPSA id o22sm19781905pfi.2.2015.12.18.13.42.46 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Dec 2015 13:42:47 -0800 (PST) From: Jay X-Google-Original-From: Jay References: <5673E92C.7090400@redhat.com> <567466D0.5020305@redhat.com> Mime-Version: 1.0 (1.0) In-Reply-To: <567466D0.5020305@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <063E0A50-A359-4F85-8DCF-AFD3B5504973@gmail.com> Cc: Hayden Livingston , "libffi-discuss@sourceware.org" Subject: Re: does it matter how I construct an aggregate struct type if its size is the same? Date: Fri, 18 Dec 2015 21:42:00 -0000 To: Andrew Haley X-IsSubscribed: yes X-SW-Source: 2015/txt/msg00110.txt.bz2 Still beware of alignment. - Jay On Dec 18, 2015, at 12:04 PM, Andrew Haley wrote: > On 18/12/15 15:16, Hayden Livingston wrote: >> Thanks, Andrew. Where is this exception? In ABIs? >> >> So you're suggesting I use char's to construct my ffi_types? > > Well, it can be awkward. Some targets pass the components of a > struct in registers. But this only matters if you pass a struct > by value, which is a fairly unusual thing to do in C. If you're > passing a struct by reference, then yes, you can just create a > char array of the right size. > > Andrew. >