Il 23/05/2014 13:50, Peter Maydell ha scritto:
> On 23 May 2014 12:23, Andreas Färber <afaer...@suse.de> wrote:
>> Am 23.05.2014 13:13, schrieb Peter Maydell:
>>> Ping?
>>
>> I believe I remarked that in the example
>> typedef struct Foo {
>> would be more in line with our Coding Style and majority of users.
>>
>> Other than that, I have no objections and assumed you'll take it through
>> your arm queue.
> 
> Oops, yes, I'd forgotten that conversation. I'll remove
> the newline preceding the '{' and am happy to put this
> through the target-arm queue.

Semi-serious proposal:

    #define comma_if_empty_ ,
    #define CPP_IFEMPTY(macro, t, f)      CPP_IFEMPTY1(macro, t, f)
    #define CPP_IFEMPTY1(value, t, f)     CPP_IF2(comma_if_empty_##value, t, f)
    #define CPP_IF2(comma_if_true, t, f)  CPP_IF3(comma_if_true t, f)
    #define CPP_IF3(_, v, ...) v

    #define qom_private(macro) CPP_IFEMPTY(IMPLEMENTING_##macro,, 
QEMU_PRIVATE_ATTR)

To be used as:

    qom_private(A9_SCU) MemoryRegion iomem;

Credit: https://plus.google.com/u/0/+LinusTorvalds/posts/9gntjh57dXt

Paolo

Reply via email to