This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for having internal macros as functions, take 2


Hans-Peter Nilsson <hp@bitrange.com> said:
> Here's an update on the "turn those internal macros into
> functions" work.  I rewrote it, so forget the previous set of
> patches.  This is more robust and catches "declaration" errors
> in PROVIDE_MACRO_... marks better.

The problem I see with this idea is that the functions will _not_ work like
the macros they replace (the ever popular:

   #define sqr(x)   x * x

will _not_ evaluate its argument twice, nor will it screw up on squaring
expressions). 
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]