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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: David Woodhouse
Ημερομηνία:  
Προς: Tony Finch
Υ/ο: exim-dev, Chris Thompson, valgrind-users, Bart Van Assche, Steen Hammerum
Αντικείμενο: Re: [exim-dev] [Valgrind-users] [Bug 1050] [PATCH] Portability fixes for memcheck.h.
On Wed, 2011-01-12 at 14:28 +0000, Tony Finch 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.


Nested? I meant

static inline VALGRIND_MAKE_MEM_NOACCESS(void *addr, int *len)
{
  unsigned long res;
  VALGRIND_DO_CLIENT_REQUEST(_res, 0 /* default return */,
                             VG_USERREQ__MAKE_MEM_NOACCESS,
                             addr, len, 0, 0, 0);
  return res;
}


Where's the nesting?

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@???                              Intel Corporation