All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Keir Fraser <keir@xen.org>,
	Wei.Liu2@citrix.com, xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.6] xen/public: arm: Use __typeof__ rather than typeof
Date: Fri, 23 Oct 2015 15:44:01 +0100	[thread overview]
Message-ID: <562A47B1.7030400@citrix.com> (raw)
In-Reply-To: <562A625102000078000AE347@prv-mh.provo.novell.com>

On 23/10/15 15:37, Jan Beulich wrote:
>>>> On 23.10.15 at 16:31, <ian.campbell@citrix.com> wrote:
>> On Fri, 2015-10-23 at 08:16 -0600, Jan Beulich wrote:
>>> No, the validating script is a nice-to-have, but nothing more. What
>>> I was referring to was a patch to drop the use of this gcc extension.
>>
>> Then I'm confused. This patch turns a typeof into a __typeof__. In <
>> 56126D8702000078000A80AC@prv-mh.provo.novell.com> you said "typeof() is a
>> gcc extension".
>>
>> Are you now saying that __typeof__ also a gcc extension too?
>>
>> I was under the impression that __typeof__ was standard (by some cxx at
>> least) and your mail reinforced that (possibly wrong) impression.
> 
> There's no typeof or __typeof__ in C11 or any earlier standard.
> I'm sorry if earlier replies of mine gave a different impression.
> 
>> https://gcc.gnu.org/onlinedocs/gcc/Typeof.html also says that "If you are
>> writing a header file that must work when included in ISO C programs, write
>> __typeof__ instead of typeof", which also lead me to believe __typeof__ was
>> OK from this PoV.
> 
> That's solely to prevent name space issues - __typeof__ is a
> reserved name, while typeof isn't.

Thank you for the explanation. I think we can do the same as x86 does i.e:

#define set_xen_guest_handle_raw(hnd, val)                  \
    do { if ( sizeof(hnd) == 8 ) *(uint64_t *)&(hnd) = 0;   \
         (hnd).p = val;                                     \
    } while ( 0 )

I will send a new version of this patch.

Regards,


-- 
Julien Grall

  reply	other threads:[~2015-10-23 14:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-04 19:24 [PATCH for-4.6] xen/public: arm: Use __typeof__ rather than typeof Julien Grall
2015-10-05 10:31 ` Jan Beulich
2015-10-06 17:25   ` Julien Grall
2015-10-07  6:31     ` Jan Beulich
2015-10-07  8:28       ` Ian Campbell
2015-10-05 13:40 ` Wei Liu
2015-10-06  9:43   ` Julien Grall
2015-10-23 13:13 ` Julien Grall
2015-10-23 13:30   ` Ian Campbell
2015-10-23 13:52     ` Jan Beulich
2015-10-23 13:58       ` Julien Grall
2015-10-23 14:16         ` Jan Beulich
2015-10-23 14:31           ` Ian Campbell
2015-10-23 14:35             ` Ian Campbell
2015-10-23 14:37             ` Jan Beulich
2015-10-23 14:44               ` Julien Grall [this message]
2015-10-23 14:55                 ` Ian Campbell
2015-10-23 15:11                   ` Jan Beulich
2015-10-26 18:08                   ` Julien Grall
2015-10-27  8:05                     ` Jan Beulich
2015-10-28 15:44                       ` Julien Grall
2015-10-28 15:52                         ` Jan Beulich
2015-10-29 11:40                           ` Stefano Stabellini
2015-10-27  8:07                     ` Jan Beulich
2015-10-27 10:20                       ` Julien Grall
2015-10-23 14:03       ` Ian Campbell
2015-10-23 14:24         ` Jan Beulich
2015-10-23 14:48           ` Ian Campbell
2015-10-23 14:55             ` Jan Beulich

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=562A47B1.7030400@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Wei.Liu2@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.