This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] new exec-charset testcase


Eric Christopher wrote:

Well, the statement expression isn't the issue here.

The lexer would just need to say "I've seen __asm__ and an opening parenthesis; no translation until I see the closing parenthesis or another opening parenthesis." I think it's just a counter.



void foo (void)
{
 asm ("xx" : : "r"("translate") : "cc");
}

Where "translate" needs to be translated, but the rest doesn't.



You did see where I said "or another opening parenthesis" anticipating this issue, didn't you? :-) If the counter is exactly one translate -- otherwise don't.

I'm not necessarily sure that this is a great idea -- but I do think it's possible. Compared to parsing C++, this is child's play. :-)

You've now surpassed my knowledge of such things.

Is it possible to just translate always, and untranslate in those few cases where you need to do so?



I seem to remember this coming up and the answer was "no", but I'll
defer to Zack here because I don't remember.


I'd believe you; I'm just asking.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]