On Wed, 12 Jan 2011, Bart Van Assche wrote:
>
> Did you realize that with that patch you have broken
> VALGRIND_CHECK_MEM_IS_ADDRESSABLE() and several other macros ?

Ah, I missed that because exim only uses some valgrind macros as
statements not as expressions. Thanks for pointing it out.

I thought the __extension__ macro was supposed to be internal-only because
of the way it is defined in valgrind.h.

There is this code in valgrind.h

#if !defined(__GNUC__)
#  define __extension__ /* */
#endif

which is clearly bogus because on non-gcc it leads to syntax errors in
many macros like the following and the ones I broke in memcheck.h

#define RUNNING_ON_VALGRIND  __extension__                        \
   ({unsigned int _qzz_res;                                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* if not */,          \
                               VG_USERREQ__RUNNING_ON_VALGRIND,   \
                               0, 0, 0, 0, 0);                    \
    _qzz_res;                                                     \
   })

I'm not immediately sure how to fix it properly.

Tony.
-- 
f.anthony.n.finch  <[email protected]>  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.

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details 
at http://www.exim.org/ ##

Reply via email to