Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #27833] IMCC parser chokes on empty sub

2 views
Skip to first unread message

Ilya Martynov

unread,
Mar 22, 2004, 4:18:45 AM3/22/04
to bugs-bi...@rt.perl.org
# New Ticket Created by Ilya Martynov
# Please include the string: [perl #27833]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=27833 >


-----------------------------------------------------------------
IMCC parser chokes on empty subs. Simple test case:

.sub _main
_foo()
end
.end

.sub _foo
.end

This one causes error:

error:imcc:parse error, unexpected ESUB, expecting '\n'

in file 'x.imc' line 7

-----------------------------------------------------------------
---
osname= linux
osvers= 2.4.13
arch= i386-linux
cc= cc
---
Flags:
category=
severity=
---
Summary of my parrot 0.1.0 configuration:
configdate='Mon Mar 22 12:09:38 2004'
Platform:
osname=linux, archname=i686-linux-thread-multi
jitcapable=1, jitarchname=i386-linux,
jitosname=LINUX, jitcpuarch=i386
execcapable=1
perl=/home/ilya/perl-5.8.2-threads/bin/perl
Compiler:
cc='cc', ccflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
Linker and Libraries:
ld='cc', ldflags=' -L/usr/local/lib',
cc_ldflags='',
libs='-lbind -lnsl -ldl -lm -lcrypt -lutil -lpthread'
Dynamic Linking:
so='.so', ld_shared='-shared -L/usr/local/lib',
ld_shared_flags=''
Types:
iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
ptrsize=4, ptr_alignment=4 byteorder=1234,
nv=double, numvalsize=8, doublesize=8

---
Environment:
HOME=/home/ilya
LANG=ru_RU.KOI8-R
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/ilya/tla/bin:/home/ilya/bin:/home/ilya/j2sdk1.4.1_02/bin:/home/ilya/perl-current/bin:/home/ilya/perl-5.8.2-threads/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin
SHELL=/bin/bash

Leopold Toetsch

unread,
Mar 22, 2004, 5:55:38 AM3/22/04
to perl6-i...@perl.org
Ilya Martynov <bugs-...@netlabs.develooper.com> wrote:
> IMCC parser chokes on empty subs. Simple test case:

> .sub _main
> _foo()
> end
> .end

> .sub _foo

for now just insert a:

noop

> .end

I can imagine that there are a lot of places, where at least one
instruction is assumed to be in ths sub. I'll put that case into BUGs.

Thanks for reporting,
leo

0 new messages