This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Prevent macro expansion of mblen
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