From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82408 invoked by alias); 18 Dec 2015 20:04:37 -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 81695 invoked by uid 89); 18 Dec 2015 20:04:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=awkward X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 18 Dec 2015 20:04:35 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C2588A380A; Fri, 18 Dec 2015 20:04:34 +0000 (UTC) Received: from zebedee.pink (ovpn-116-92.ams2.redhat.com [10.36.116.92]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBIK4XnJ013231; Fri, 18 Dec 2015 15:04:34 -0500 Subject: Re: does it matter how I construct an aggregate struct type if its size is the same? To: Hayden Livingston References: <5673E92C.7090400@redhat.com> Cc: libffi-discuss@sourceware.org From: Andrew Haley Message-ID: <567466D0.5020305@redhat.com> Date: Fri, 18 Dec 2015 20:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015/txt/msg00109.txt.bz2 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.