[fpc-devel]bug in asm-block parser

Matti Hamalainen mhamalai at ratol.fi
Fri Mar 9 17:42:01 CET 2001


Found a (minor?) bug in FPC:

Double comment in ASM-block. Having two comments, other
immendiately following the first one in an asm-block gets
the compiler confused:

asm
      mov eax, 1;
      mov ebx, eax; 
      { first comment }{ second comment }
      mov ecx, eax;
end;

If the comment-blocks are separated with a whitespace: {...} {...}
the compiler works fine. Additionally, the bug only occurs within
asm-blocks, inside Pascal-code it works ok.

Output log from FPC follows:

---clip---
Target OS: Linux for i386
Compiling tprog.pas
191 Kb Free
syslinux.pp(3,2) Hint: Conditional I386 was not set at startup in last compilation of syslinux.pp
tprog.pas(11,26) Error: Unrecognized opcode SECOND
tprog.pas(11,33) Error: Assembler syntax error
tprog.pas(11,41) Fatal: illegal character '}' ($7D)
---clip---

Same problem (naturally) with GO32v2/DOS version of FPC (1.0.4 too).
Options: -vwenhil -Sgicm -Rintel

= ccr/TNSP - mhamalai at ratol.fi | http://www.tnsp.org/ =
= Foo is a synonym for Bar, but not vice versa.       =





More information about the fpc-devel mailing list