This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for having internal macros as functions, take 2
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Subject: Re: Patch for having internal macros as functions, take 2
- From: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Date: Sun, 02 Jan 2000 12:40:41 -0300
- cc: gcc-patches at gcc dot gnu dot org
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