[fpc-devel]maybe a bug in the compiler (at least under BeOS)

Olivier Coursière olivier.coursiere at laposte.net
Sat Apr 12 00:02:17 CEST 2003


Hi all,

I think i have found a bug in fpc. With the joined souce code, i have 
this strange output. 

The first time, i have this output :

$ fpc -S2 -g -gl test.pp
/boot/home/config/bin/ppc386;-S2 -g -gl test.pp
Free Pascal Compiler version 1.0.7 [2003/03/29] for i386
Copyright (c) 1993-2003 by Florian Klaempfl
Target OS: BeOS for i386
Compiling test.pp
Compiling menu.pp
menu.pp(25,17) Warning: An inherited method is hidden by TMENU.CREATE
Assembling menu
Compiling menubar.pp
Assembling menubar
Assembling test
Linking test
128 Lines compiled, 0.0 sec
$ test
Bonjour
TMenuBar.Create
function TMenu.AddItem(menu : TMenu) : boolean;    

Now, i start a second compile (i keep *.o and *.ppu files)

$ fpc -S2 -g -gl test.pp
/boot/home/config/bin/ppc386;-S2 -g -gl test.pp
Free Pascal Compiler version 1.0.7 [2003/03/29] for i386
Copyright (c) 1993-2003 by Florian Klaempfl
Target OS: BeOS for i386
Compiling test.pp
Assembling test
Linking test
32 Lines compiled, 0.0 sec
$ test
Bonjour
TMenuBar.Create
function TMenu.AddItem(menu : TMenu; frame : TRect) : boolean; 

There is several AddItem functions in TMenu, but with different 
parameters. The first time, the right function is called, but in the 
second case, the last AddItem function is called.

When AddItem functions are not virtual, the right function is always 
called.

I used the BeOS version of fpc.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Archive.zip
Type: application/zip
Size: 2860 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20030412/f69ebe43/attachment.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BeOS Attributes
Type: application/x-be_attribute
Size: 38 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20030412/f69ebe43/attachment.bin>


More information about the fpc-devel mailing list