This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] support for -fdump-ada-spec
On Fri, 7 May 2010, Arnaud Charlet wrote:
> > See what c_lex_with_flags does.
>
> I see. I've looked at c_lex_with_flags, and this subprogram uses the
> following routines mainly:
>
> for characters: lex_charconst, which uses cpp_interpret_charconst,
> this one can be reused
> for strings: lex_string
> for numbers: interpret_integer and interpret_float
>
> lex_string, interpret_integer and interpret_float are functions local
> to c-lex.c, so cannot be reused outside this file.
>
> Duplicating their work would defeat your suggestion, so are you
> suggesting that we make interpret_integer/interpret_float/lex_string
> global functions instead?
I'm not making a suggestion at the level of making particular functions
global; rather, that there should be some function used in both c-lex.c
and for this c-ada-spec.c code. It's possible it might correspond to the
entire CPP_NUMBER case, if that's more useful than exporting the
individual interpret_integer and interpret_float functions used as part of
that case, for example.
--
Joseph S. Myers
joseph@codesourcery.com