On Wed, Jan 12, 2011 at 3:28 PM, Tony Finch <[email protected]> wrote:
> On Wed, 12 Jan 2011, David Woodhouse wrote:
>>
>> Can we turn the ({ ... }) extension into a static inline function? Or is
>> that not sufficiently portable either?
>
> No, nested functions are not allowed in standard C.
>
> It looks to me like the macros were originally written so that the first
> argument was supposed to be an lvalue to receive the result, and they were
> not supposed to be used in an expression context. To make the
> block-expression wrappers work, I think the basic
> VALGRIND_DO_CLIENT_REQUEST() macro will have to be changed to return a
> result rather than take an lvalue.

Please have a look at vg_VALGRIND_DO_CLIENT_REQUEST_EXPR() in
<valgrind/valgrind.h> (as included in version 3.6.0).

Bart.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to