Ticket #1201 (new bug)

Opened 5 years ago

Last modified 4 years ago

Parrot::Pmc2c::Emitter line # error

Reported by: coke Owned by:
Priority: normal Milestone:
Component: core Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

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.

Change History

  Changed 5 years ago by jkeenan

  • component changed from none to core

in reply to: ↑ description   Changed 4 years ago by jkeenan

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

Note: See TracTickets for help on using tickets.