This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFA] spec functions
Just one more tweak:
> + /* Table of language-specific spec functions, and the number of entries
> + in that table. */
> + const struct spec_function * const lang_specific_spec_functions = NULL;
> + const unsigned int lang_specific_spec_function_count = 0;
Make this
const struct spec_function lang_specific_spec_functions[] =
{
{ 0, 0 }
};
and this
> + static const struct spec_function static_spec_functions[] =
> + {
> + { "if-exists", if_exists_spec_function },
> + };
static const struct spec_function lang_indep_spec_functions[] =
{
{ "if-exists", if_exists_spec_function },
{ 0, 0 }
};
and then you can process them both identically in lookup_spec_function,
by scanning until you reach the terminator, and you don't need a count
variable.
zw