This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] new exec-charset testcase
Eric Christopher <echristo@redhat.com> writes:
> Yes, and thanks. I'll assume I can commit the testcase there (modified
> to actually do something to the string) as well.
yup.
[...]
> Now, this wouldn't be a problem if we were pushing the cpp_tokens onto
> the stack, but we're pushing trees. :| Right now the only solution I can
> see for this that doesn't require brain surgery in the parser is to
> reconstruct the tree as we parse and translate then if needed. The other
> idea is to only use cpp_tokens for the tentative parse and then actual
> parse on our way through...
>
> The unfortunate bit is that I get to rewrite a good chunk of the
> exec-charset stuff for c++ and don't get to share code with the C front
> end for it. (And have to set c_lex_string_translate permanently to false
> in the C++ front end).
>
> Any other thoughts?
Well, pushing cpp_tokens during a tentative parse would be a good
thing, I think, it would reduce backtracking overhead. I don't have
any idea how hard it would be though. Mark, can you comment?
zw