Re: [exim-dev] [Valgrind-users] [Bug 1050] [PATCH] Portabili…

Top Page
Delete this message
Reply to this message
Author: Tony Finch
Date:  
To: David Woodhouse
CC: exim-dev, Chris Thompson, valgrind-users, Bart Van Assche, Steen Hammerum
Subject: Re: [exim-dev] [Valgrind-users] [Bug 1050] [PATCH] Portability fixes for memcheck.h.
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.

Tony.
--
f.anthony.n.finch <dot@???> http://dotat.at/
HUMBER THAMES DOVER WIGHT PORTLAND: NORTH BACKING WEST OR NORTHWEST, 5 TO 7,
DECREASING 4 OR 5, OCCASIONALLY 6 LATER IN HUMBER AND THAMES. MODERATE OR
ROUGH. RAIN THEN FAIR. GOOD.