Prevent macro expansion of mblen
Gabriel Dos Reis
gdr@codesourcery.com
Thu Dec 28 10:28:00 GMT 2000
Richard Henderson <rth@redhat.com> writes:
| On Thu, Dec 28, 2000 at 07:14:49PM +0100, Gabriel Dos Reis wrote:
| > inline int __mblen_capture(const char* p, size_t l)
| > { return mblen(p, l); }
| > # undef mblen
| > extern "C" inline int mblen(const char* p, size_t l)
| > { return __mblen_capture(p, l); }
|
| Why in the world do you need the extra indirection
| rather than protecting the functional macro expansion
| with (mblen) ?
Nothing. I don't think that makes any difference given tree-based
inlining.
But protecting the macro expansion doesn't make 'mblen' to have C
linkage.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches
mailing list