Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parrot::Pmc2c::Emitter line # error #521

Open
coke opened this issue Nov 5, 2009 · 1 comment
Open

Parrot::Pmc2c::Emitter line # error #521

coke opened this issue Nov 5, 2009 · 1 comment

Comments

@coke
Copy link
Contributor

coke commented Nov 5, 2009

New ticket opened from comment on list in thread 'Re: Warnings on
Solaris, Pmc2c usage/design bug', from Andrew Johnson.


BTW, there is a fundamental problem with this very common usage of a
Parrot::Pmc2c::Emitter:

$e->emit( <<"END", FILE, LINE + 1 );
... code ...
END

In the above usage, LINE returns the line number of the line containing
the "END" marker, not that of the line containing the "emit" call, so the

line directive it emits points to the wrong place in the source file.

Originally http://trac.parrot.org/parrot/ticket/1201

@jkeenan
Copy link
Contributor

jkeenan commented Feb 25, 2011

Replying to coke:

New ticket opened from comment on list in thread 'Re: Warnings on Solaris, Pmc2c usage/design bug', from Andrew Johnson.

The first post in that thread can be found  here.

---- BTW, there is a fundamental problem with this very common usage of a Parrot::Pmc2c::Emitter: $e->emit( <<"END", FILE, LINE + 1 ); ... code ... END In the above usage, LINE returns the line number of the line containing the "END" marker, not that of the line containing the "emit" call, so the #line directive it emits points to the wrong place in the source file.

... and this passage occurs in well into the thread  here.

kid51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants