Rafael Garcia-Suarez <[EMAIL PROTECTED]> wrote:
:On 6/16/05, Steve Peters <[EMAIL PROTECTED]> wrote:
[snip]
:However you correctly found the cause of the problem. $[ is a
:pragmatic variable and assignment to it happens at compile time and is
:optimized away. So expr becomes NULL.
:
:Note that other kinds of similar code segfaults too :
:
:$ perl -e 'if($[=0){print}'
:Segmentation fault
:
:I'd rather solve all those cases once and for all.

It sounds like the bug is in the optimiser: if it acts on C< $[ = 0 >
at compile time, it should substitute the resulting value (C< 0 >),
and leave it to other optimisations to refine that further if it is
in void context, or leads to a constant conditional.

Hugo

Reply via email to