From: "Jan Beulich" Subject: Re: [PATCH for-4.6] xen/public: arm: Use __typeof__ rather than typeof Date: Fri, 23 Oct 2015 08:55:55 -0600 Message-ID: <562A669B02000078000AE396@prv-mh.provo.novell.com> References: <1443986642-24392-1-git-send-email-julien.grall@citrix.com> <562A3295.6010901@citrix.com> <1445607059.2374.165.camel@citrix.com> <562A57D902000078000AE2A2@prv-mh.provo.novell.com> <1445609028.2374.188.camel@citrix.com> <562A5F2B02000078000AE324@prv-mh.provo.novell.com> <1445611707.2374.207.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZpdlA-0005NP-Gh for xen-devel@lists.xenproject.org; Fri, 23 Oct 2015 14:56:00 +0000 In-Reply-To: <1445611707.2374.207.camel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Keir Fraser , Tim Deegan , Ian Jackson , Julien Grall , xen-devel@lists.xenproject.org, Wei.Liu2@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 23.10.15 at 16:48, wrote: > Perhaps this needs to be explicitly asked then, So, given: > #define set_xen_guest_handle_raw(hnd, val) \ > do { \ > typeof(&(hnd)) _sxghr_tmp = &(hnd); \ > _sxghr_tmp->q = 0; \ > _sxghr_tmp->p = val; \ > } while ( 0 ) > > where typeof is used to avoid the multiple evaluations of hnd which > assigning to hnd.q and hnd.p would involve, is there some way to do the > same in pure ANSI C? As per Julien's earlier reply, perhaps the x86 way is usable for arm after all. Jan