This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFA] spec functions
On Fri, Nov 01, 2002 at 10:39:23PM -0500, Daniel Jacobowitz wrote:
> > + #define INIT_STATIC_SPEC_FUNCTION(name, func) \
> > + { NULL, name, func }
> > +
> > + static struct spec_function static_spec_functions[] =
> > + {
> > + INIT_STATIC_SPEC_FUNCTION ("if-exists", if_exists_spec_function),
> > + };
>
> I'm curious, why the macro? A NULL isn't all that ugly...
Actually, what's with the linked list in the first place? If you just
made this an array of name:function pairs that you scan directly, you
wouldn't need the macro, you wouldn't need to initialize anything at
runtime, you could make the table read-only data, and it wouldn't even
be slower.
zw