[top-level] C++-friendly allocators for libiberty
Bernardo Innocenti
bernie@develer.com
Sun Jun 27 05:05:00 GMT 2004
Alexandre Oliva wrote:
> On Jun 26, 2004, Bernardo Innocenti <bernie@develer.com> wrote:
>
>> #define foo ,
>> xresize(struct foo, f, 10);
>
>>...but how could one possibly abuse this to generate code
>>that actually compiles?
>
> If it's C++, one could overload xrealloc. I tend to prefer to enclose
> all macro arguments in parentheses, even when not strictly necessary,
> than to risk missing one case.
OK, better safe than sorry, I guess.
> And, as Falk pointed out, the full expansion of the macro should be
> enclosed in parentheses as well.
Done already.
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
More information about the Binutils
mailing list