Re: [fpc-devel] unexpected results with succ() and fpc 2.4.0

2010-01-04 Thread Jonas Maebe
On 04 Jan 2010, at 14:07, Stefan Kisdaroczi wrote: 8 program divsucc; begin writeln( 256 DIV succ(255) ); end. 8 Free Pascal Compiler version 2.4.0 [2009/12/18] for i386 Copyright (c) 1993-2009 by Florian Klaempfl Target OS: Win32 for i386 Compiling divsucc.pas

Re: [fpc-devel] unexpected results with succ() and fpc 2.4.0

2010-01-04 Thread Jonas Maebe
On 04 Jan 2010, at 14:49, Stefan Kisdaroczi wrote: Thanks for the fast reply. No Problem to work around this one, but there are 1788 succ() calls :-o in our applications :-) That was the only one that did not compile. All others did compile, but some of them will probably not work. The

Re: [fpc-devel] fpc and Delphi packages

2010-01-04 Thread Jonas Maebe
On 04 Jan 2010, at 22:52, Maxim Egorov wrote: Is fpc 2.4.0 supports something like packages in Delphi? No, it doesn't. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Jonas Maebe
On 05 Jan 2010, at 17:07, Juha Manninen wrote: Forward declaration of a class is allowed inside a unit. There can be a reference to a class before it is defined! Like: TMyClass = class; Why is it not allowed from another unit? They are conceptually the same thing! The reason that they

Re: [fpc-devel] Circular references and forward declarations

2010-01-05 Thread Jonas Maebe
On 05 Jan 2010, at 17:45, Juha Manninen wrote: On tiistai, 5. tammikuuta 2010 18:14:53 Jonas Maebe wrote: The reason that they are conceptually not the same thing is that in Pascal two different units can both declare a different class with the same name (just like they can both have global

Re: [fpc-devel] Circular references and forward declarations

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 11:14, Juha Manninen wrote: I must try include files for this problem sometimes. Does FPC really treat them differently than Delphi. No. {$i xxx} is exactly the same as copy/pasting the contents of xxx into the current file at that point. Jonas

Re: [fpc-devel] custom ThreadManager and MemoryMutexManager for hard realtime

2010-01-06 Thread Jonas Maebe
On 05 Jan 2010, at 16:39, Stefan Kisdaroczi wrote: Looking at rtl/inc/heap.inc from 2.4.0 it seems that the locking is now done using CriticalSections, is that true ? Yes. To adapt my ThreadManager for 2.4.0 I think I have to: - remove the SetMemoryMutexManager() call - implement the

Re: [fpc-devel] mlockall() unit libc

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 11:54, Marco van de Voort wrote: I saw some hints on the web that OS X doesn't support it (but it should be checked against 10.3/10.4+ since afaik those implement a lot more calls due to synchronization with FreeBSD5) $ gcc -o mlockall mlockall.c $ ./mlockall

Re: [fpc-devel] Circular references and forward declarations

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 12:14, Florian Klaempfl wrote: Different languages, different habits. I even consider putting every class in its own header and implementation file as a bad habit. There is no reason to do anymore because modern C/C++ compiler can smartlink on a sub-object level which

Re: [fpc-devel] Circular references and forward declarations

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 13:04, Florian Klaempfl wrote: Jonas Maebe schrieb: Another reason is probably to speed up the compilation: * (re)compiling huge source files can be slow and/or require lots of memory, depending on the used compiler (and debug information or optimization settings

Re: [fpc-devel] COMPUNIT for building the compiler

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 15:09, London Disney wrote: would be nice to have xcode projects for all this as well as command-line make files. are there any plans to do that ? I don't think so, since I know of nobody that uses Xcode to work on FPC (and such a project would have to be kept

Re: [fpc-devel] custom ThreadManager and MemoryMutexManager for hard realtime

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 15:25, Stefan Kisdaroczi wrote: AFAIK the RTL allocs the heap on app startup, or on thread-creation with 2.4.0. In my code im using getmem() to alloc mem from the heap, this will not generate syscalls because the heap is already allocated and the RTL has its own

Re: [SPAM] [fpc-devel] Creating ppc386 from ppcx64

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 20:15, Leonardo M. Ramé wrote: To create the cross compiler, I'm following this guide: http://wiki.lazarus.freepascal.org/Cross_compiling#To_Linux When I do sudo make all CPU_TARGET=i386 I receive this message: /usr/bin/fpc -Pi386 -XPi386-linux- -Xr -Fui386 -Fusystems

Re: [SPAM] Re: [fpc-devel] Creating ppc386 from ppcx64

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 21:15, Leonardo M. Ramé wrote: Thanks Jonas, I went a step further. Now, when I just do fpc, to I got this: Error: ppc386 can't be executed, error message: Failed to execute ppc386, error code: 127 What can be causing this? Create a symlink from

Re: [fpc-devel] Fatal: Compilation aborted

2010-01-07 Thread Jonas Maebe
On 08 Jan 2010, at 00:40, Mimu Bunnylin wrote: Strangely enough, I get that too. Seems like the IDE-compiler gets stuck if it encounters a specific obscure combination of errors in the program code, or maybe after reporting a few hundred of them. The IDE works otherwise fine, just

Re: [fpc-devel] Duplicate TTime type ?

2010-01-08 Thread Jonas Maebe
On 08 Jan 2010, at 16:15, ik wrote: When did a TTime type was added prior to ptypes.inc and where and why ? http://bugs.freepascal.org/view.php?id=15474 Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] threadlocalvar unLOCKed variables

2010-01-09 Thread Jonas Maebe
On 09 Jan 2010, at 11:12, A. Bouchez wrote: 1. How does it work on multi-thread? E.g. if you allocate a memory block in a thread, and that TWO threads call Reallocmem() at the same time? In the past that would have worked if both threads tried to reallocmem it to the same size (otherwise,

Re: [fpc-devel] 64-bit Migration (fpc/laz)

2010-01-10 Thread Jonas Maebe
On 10 Jan 2010, at 14:45, London Disney wrote: a) How do we use fpc/laz to make Mach-O fat binaries? Compile the different versions separately and then combine them using the lipo tool. b) Which versions was the first to support Intel Macs and which 2.2.0 version was the first to

Re: [fpc-devel] access vialoation while rebuilding compiler

2010-01-10 Thread Jonas Maebe
On 10 Jan 2010, at 15:03, Paul Ishenin wrote: dmitry boyarintsev wrote: make OPT=-g -gl? I usually do make OPT=-gw but your options will work too. There is no support yet for DWARF in the lineinfo unit on Mac OS X. Jonas ___ fpc-devel maillist

Re: [fpc-devel] ODBC

2010-01-14 Thread Jonas Maebe
On 12 Jan 2010, at 19:12, Thomas Nelson wrote: I seem to have come across a minor problem and don’t know how to fix it. Utilizing the \examples\odbc\testodbc.pp module with FPC 2.2.4 everything compiles fine When I upgraded to FPC 2.4.0 I get an error message (please see attached

Re: [fpc-devel] compile time memory leak detection

2010-01-19 Thread Jonas Maebe
On 19 Jan 2010, at 09:35, ik wrote: There are sometimes way to see that you have memory leak in a code without using any sort of profiler. For example using new/getmem on a local variable without releasing it etc... Does FPC know how to find this places on compile time and at least

Re: [fpc-devel] problem with fpcres on mac

2010-01-25 Thread Jonas Maebe
On 25 Jan 2010, at 15:02, zeljko wrote: I've already filled up an issue http://bugs.freepascal.org/view.php?id=15586 which shows the problem. It cannot link application with 255 lfms (mac only - win32 linux are ok). fpc-2.4.1 r14802 Anyone ? I don't know how fcl-res deals with

Re: [fpc-devel] Fpsigprocmask

2010-01-26 Thread Jonas Maebe
On 26 Jan 2010, at 12:54, Michael Schnell wrote: On 01/26/2010 12:49 PM, Marco van de Voort wrote: Note that syncobjs is libc based (via cthreads basicevent*) on *nix, and wholly portable (also to windows). Ooops, that would mean I would not improve things when replacing direct libc

Re: [fpc-devel] Semicolon before else

2010-01-29 Thread Jonas Maebe
On 29 Jan 2010, at 14:10, Juha Manninen wrote: Now when I think of it, the new FPC language modes can solve many such problems. I understood there are Modula2 and Objective-C modes. There is no Modula2 mode. There is an Objective-Pascal mode, but no Objective-C mode. And they can use the

Re: [fpc-devel] Semicolon before else

2010-01-29 Thread Jonas Maebe
On 29 Jan 2010, at 14:40, Juha Manninen wrote: There is no Modula2 mode. There is an Objective-Pascal mode, but no Objective-C mode. Sorry, yes. I knew it was Objective-Pascal, used in Mac, but I wrote it wrong. I remember reading about Modula2 mode but it must have been just an idea.

Re: [fpc-devel] Semicolon before else

2010-01-29 Thread Jonas Maebe
On 29 Jan 2010, at 15:08, Marco van de Voort wrote: I'd like to hear your opinion on what exactly causes this too. I thought about it, and would roughly say: 1) the FPC cg accepts roughly a kind of superset of pascal dialects, and the dialect modes map onto it. 2) the fact that

Re: [fpc-devel] Semicolon before else

2010-01-29 Thread Jonas Maebe
On 29 Jan 2010, at 16:12, Aleksa Todorovic wrote: Depends. I do see a minor point for e.g. ++ and --, since I have been bitten by that when translating e.g. compression code (paszlib, lz77) when these are used in complex nested loops. Hopefully, it would be easy to implement it

Re: [fpc-devel] Semicolon before else

2010-01-29 Thread Jonas Maebe
On 29 Jan 2010, at 21:17, Marco van de Voort wrote: I don't know if a GCC frontend can directly parse headers in multiple languaes. It would mean multiple frontends in one binary and afaik the gcc frontends are separate binaries? All the C frontends are in one binary. I was not talking about

Re: [fpc-devel] FPC / Lazarus potential bug Project Options Dialog

2010-01-31 Thread Jonas Maebe
On 31 Jan 2010, at 05:07, Andrew Brunner wrote: This script is set as executable and the permissions were incorrect at first but Lazarus knew to throw me the error. I fixed the permissions but get an error 127 on building the project. I tried ./prebuild.sh and just prebuild.sh and the full

Re: [fpc-devel] Re: Ubuntu 9.10 x64 AMD Debugging multi-threaded system impossible

2010-02-03 Thread Jonas Maebe
On 03 Feb 2010, at 04:57, Jonathan wrote: Andrew Brunner andrew.t.brun...@gmail.com wrote: Problem solved: Project options for debugging (at least under Ubuntu x64) required extra information file... Project Options, Compiler Options, Linking, Debugging: Check Use external gdb debug symbols

Re: [fpc-devel] RFC: changing conditional compilation

2010-02-08 Thread Jonas Maebe
On 09 Feb 2010, at 00:01, Flávio Etrusco wrote: Now there's Macros, but they wouldn't solve the problem either, unless you'd use some crazy scheme with $if declared or something AFAICS. What I wished is to change (or add a directive to change) the way $ifdef/ifndef work, enforcing that

Re: [fpc-devel] RFC: changing conditional compilation

2010-02-09 Thread Jonas Maebe
On 09 Feb 2010, at 01:24, Flávio Etrusco wrote: As far as I know, that's how macros behave. E.g.: {$macro on} {$define xxx:=1} {$if xxx} begin end. {$endif} If you undefine xxx, you'll get a compile time error. Downside: they don't work with booleans for some reason, only with

Re: [fpc-devel] Bugtracker - registration

2010-02-09 Thread Jonas Maebe
On 09 Feb 2010, at 23:27, Nikolai Zhubr wrote: 09.02.2010 16:17, Michael Van Canneyt: For some reason, mail.ru blocks our mail server, this is why you don't receive the confirmation email. I have filed a request to stop blocking. Luckily I speak Russian :-) I hope you'll receive this

Re: [fpc-devel] Debugging operators' overloards

2010-02-12 Thread Jonas Maebe
On 12 Feb 2010, at 04:48, Flávio Etrusco wrote: is there any known limitation on gdb integration or the debuginfo that prevents gdb from stopping on breakpoints inside operator overload functions? No. Jonas___ fpc-devel maillist -

Re: [fpc-devel] fpc 14894 svn does not compile

2010-02-13 Thread Jonas Maebe
On 13 Feb 2010, at 03:06, ABorka wrote: gives the following error for make all (win xp 32bit) Are you starting the compilation with FPC 2.4.0? Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-13 Thread Jonas Maebe
On 13 Feb 2010, at 12:44, Nikolai Zhubr wrote: 1) GetHeapStatus.TotalAllocated does not seem to reflect size of allocations made by other threads anymore (I can provide a small example). I think such behaviour is not quite correct. The heap manager is now separate per thread so it offers

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-13 Thread Jonas Maebe
On 13 Feb 2010, at 20:51, Nikolai Zhubr wrote: 13.02.2010 16:33, Jonas Maebe: The heap manager is now separate per thread so it offers much better performance. Keeping track of this information aggregated for all threads would slow things down again (even if it would be done using atomic

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-13 Thread Jonas Maebe
On 13 Feb 2010, at 21:21, Nikolai Zhubr wrote: 13.02.2010 22:51, Jonas Maebe: [trim] Not without implementing a custom memory manager that does this or using some OS function to obtain this information. So even some extra InterlockedExchangeAdd would be too expensive? It would make

Re: [fpc-devel] fpc 14894 svn does not compile

2010-02-13 Thread Jonas Maebe
On 13 Feb 2010, at 21:48, ABorka wrote: Thanks Jonas, using 2.4.0 for the 1st compile worked. I guess I shouldn't wait months before recompiling the latest SVN :) Even if you subsequently recompile every new svn revision it may sometimes suddenly not work anymore with your previously

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-13 Thread Jonas Maebe
On 13 Feb 2010, at 22:22, Nikolai Zhubr wrote: 13.02.2010 16:33, Jonas Maebe: [...] The heap manager is now separate per thread so it offers much better performance. Wait a minute. Is it then still legal for any thread to dispose heap blocks allocated by another thread? Yes, that's

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-16 Thread Jonas Maebe
On 16 Feb 2010, at 16:49, Nikolai Zhubr wrote: 16.02.2010 14:39, Michael Schnell: On 02/13/2010 09:38 PM, Jonas Maebe wrote: It would make the memory manager slower, and I don't think that aggregating few statistics is a good reason to do so Yep. But it should be possible to implement

Re: [fpc-devel] MemSize argument validity

2010-02-17 Thread Jonas Maebe
On 16 Feb 2010, at 19:11, Nikolai Zhubr wrote: I've just discovered that passing an invalid pointer to MemSize() results in a bogus value returned and no error generally reported. Is this intentional? It's just as intentional as dereferencing an invalid pointer can result in a

Re: [fpc-devel] procedure ... message(); in Linux

2010-02-18 Thread Jonas Maebe
On 18 Feb 2010, at 14:41, Michael Schnell wrote: Lazarus does have a directory /lazarus/lcl/interfaces/fpgui/ but it does not contain a file fpg_main.* and fpgPostMessage is not mentioned in any file :(. http://www.google.com/search?q=fpgui Jonas

Re: [fpc-devel] procedure ... message(); in Linux

2010-02-18 Thread Jonas Maebe
On 18 Feb 2010, at 16:44, Michael Schnell wrote: Of course I did try this, but the project seems to be abandoned: http://opensoft.homeip.net/fpgui/ ERROR The requested URL could not be retrieved It works fine here. Jonas ___ fpc-devel

[fpc-devel] Fwd: GDB 7.0.90 available for testing

2010-02-19 Thread Jonas Maebe
This is the pre-release for GDB 7.1 Begin forwarded message: From: Joel Brobecker brobec...@adacore.com Date: Fri 19 Feb 2010 02:20:23 GMT+01:00 To: g...@sourceware.org Subject: GDB 7.0.90 available for testing Hello, I have just finished creating the gdb-7.0.90 pre-release. It is available

Re: [fpc-devel] Compiler 240 (and MySql)

2010-02-22 Thread Jonas Maebe
On 22 Feb 2010, at 18:02, Bernd Mueller wrote: The program runs fine, if the optimization is disabled. The problem is that none of the compiler developers has a system to practically test FPA support, so it does not get tested at all... Jonas___

Re: [fpc-devel] Compiler 240 (and MySql)

2010-02-23 Thread Jonas Maebe
On 23 Feb 2010, at 11:31, Bernd Mueller wrote: Jonas Maebe wrote: On 22 Feb 2010, at 18:02, Bernd Mueller wrote: The program runs fine, if the optimization is disabled. The problem is that none of the compiler developers has a system to practically test FPA support, so it does not get

Re: [fpc-devel] fpc on arm-linux-uclibc and OABI

2010-02-27 Thread Jonas Maebe
On 27 Feb 2010, at 09:23, Nataraj S Narayan wrote: I am using fpc/lazarus +qt-embedded-opensource-4.5.2 on arm-linux-uclibc based SBC The code works only it the kernel is compiled with CONFIG_OABI_COMPAT=y Does it mean that isnt fully EABI ? Based on the extra information that you

Re: [fpc-devel] fpc on arm-linux-uclibc and OABI

2010-02-27 Thread Jonas Maebe
On 27 Feb 2010, at 14:47, Nataraj S Narayan wrote: #make distclean crosszipinstall CPU_TARGET=arm CROSSOPT='-CfSOFT -darm -dFPC-ARMEL -gl' zipinstall creates a tar file. Did you also unpack its contents afterwards and point the compiler to those unpacked units? I am following the

Re: [fpc-devel] Help with Lazarus

2010-03-01 Thread Jonas Maebe
On 28 Feb 2010, at 21:57, Jordan Levy wrote: Hi I need help finding the compiler on my computer using Mac OS X 10.6.2. Every time I launch Lazarus IDE I get a message saying that the Free Pascal Source Directory is not found and I can not find the Free Pascal Source directory physically on

Re: [fpc-devel] Help with Lazarus

2010-03-01 Thread Jonas Maebe
On 01 Mar 2010, at 11:21, Mattias Gaertner wrote: On Sun, 28 Feb 2010 22:57:54 +0200 Jordan Levy jord...@netactive.co.za wrote: Hi I need help finding the compiler on my computer using Mac OS X 10.6.2. Every time I launch Lazarus IDE I get a message saying that the Free Pascal Source

Re: [fpc-devel] fpc on arm-linux-uclibc and OABI

2010-03-01 Thread Jonas Maebe
On 01 Mar 2010, at 12:24, Nataraj S Narayan wrote: system.pp:(.text.n_system_system_exit+0x10): undefined reference to `_haltproc_eabi' noy1.lpr(23) Error: Error while linking noy1.lpr(23) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Again, have I

Re: [fpc-devel] Defining a constant record which contains an (dynamic or open) array

2010-03-02 Thread Jonas Maebe
On 02 Mar 2010, at 09:14, Joost van der Sluis wrote: I want to define a constant record, but the record contains an array. More specifically, a dynamic array. Is that possible? Only with static arrays. Jonas ___ fpc-devel maillist -

Re: [fpc-devel] Lazarus keeps it's secrets

2010-03-03 Thread Jonas Maebe
On 03 Mar 2010, at 12:18, Mattias Gaertner wrote: On Wed, 03 Mar 2010 11:44:42 +0100 Michael Schnell mschn...@lumino.de wrote: How come LCL is installed with, and RTL is installed without debugging information ? To fit most user expectations. For example: if the RTL is compiled with

Re: [fpc-devel] Lazarus keeps it's secrets

2010-03-03 Thread Jonas Maebe
On 03 Mar 2010, at 18:16, Marco van de Voort wrote: n Wed, Mar 03, 2010 at 01:30:41PM +0100, Jonas Maebe wrote: And how to enable debug info only for FCL and packages?... After building normally and before doing the make install: make `pwd`/compiler/ppc386 packages_clean packages_all OPT

Re: [fpc-devel] Lazarus keeps it's secrets

2010-03-04 Thread Jonas Maebe
On 04 Mar 2010, at 13:32, Marco van de Voort wrote: On Wed, Mar 03, 2010 at 09:42:30PM +0100, Jonas Maebe wrote: (if you're not under unix: replace `pwd` with the *full, absolute* path to the current directory) This will create several sets of macro scale packages (rtl,fcl,packages,lcl etc

Re: OOOOPS !!!!Re: [fpc-devel] no break and stepping if ctheads is used (Lazarus)

2010-03-04 Thread Jonas Maebe
On 04 Mar 2010, at 15:27, Michael Schnell wrote: PS !! if I use libc, additionally, I can debug normally, again. What is this ? Some more recent glibc systems no longer work correctly when libpthread is loaded dynamically while the program was not linked against it at

Re: OOOOPS !!!!Re: [fpc-devel] no break and stepping if ctheads is used (Lazarus)

2010-03-04 Thread Jonas Maebe
On 04 Mar 2010, at 16:18, Michael Van Canneyt wrote: This is actually quite strange and probably a bug in the cthreads unit. It should contain the {$linklib pthread} clause instead of loading the pthreads library manually, that's why we have this unit. It already contains that, but it's

Re: OOOOPS !!!!Re: [fpc-devel] no break and stepping if ctheads is used (Lazarus)

2010-03-04 Thread Jonas Maebe
On 04 Mar 2010, at 16:28, Michael Van Canneyt wrote: I know, I saw that. I guess that it was originally developed using dynamically loading, and was subsequently disabled for BSD... I've changed it, but I've kept both systems for Linux: link it at compile time, but also still resolve all

Re: [fpc-devel] Trying to do a running implementation of Widget Type NoGui

2010-03-09 Thread Jonas Maebe
Michael Schnell wrote on di, 09 mrt 2010: Now I need to find out how the Widget Type selected in project options is linked to the code that implements the controls and how I can debug/edit the source code for the NoGUI Widget Type. Such questions are more suited to the Lazarus mailing list.

Re: [fpc-devel] -Xg option

2010-03-12 Thread Jonas Maebe
On 12 Mar 2010, at 04:01, Paul Ishenin wrote: One possibility is to use -Xg by default. But hence the question - whether -Xg works reliable for all platforms? It does not work (and will never work, because the tool chain simply does not support such functionality) for Stabs on Mac OS X. I

Re: [fpc-devel] -Xg option

2010-03-12 Thread Jonas Maebe
On 12 Mar 2010, at 08:57, dmitry boyarintsev wrote: afaik, -Xg is not support on Darwin at all. Technically it can be supported for Dwarf debug only It is supported with DWARF on Darwin. Jonas ___ fpc-devel maillist -

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-12 Thread Jonas Maebe
On 12 Mar 2010, at 02:44, Paul Ishenin wrote: I know at the moment we have the next problems which cause subj don't work: 1. gdb does not supports borland fastcall calling convention (delphi calls it register though) 2. fpc does not write debug info for properties with getters because

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-12 Thread Jonas Maebe
On 12 Mar 2010, at 02:44, Paul Ishenin wrote: 1. gdb does not supports borland fastcall calling convention (delphi calls it register though) PS: one reason that this is not advancing is because FPC does not support it correctly either, and I don't want to add support for a broken

Fwd: [fpc-pascal] Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-12 Thread Jonas Maebe
Sorry, sent to the wrong list (Flavio: please reply to the list instead of to me personally) Begin forwarded message: From: Jonas Maebe jonas.ma...@elis.ugent.be Date: Fri 12 Mar 2010 16:44:30 GMT+01:00 To: FPC-Pascal users discussions fpc-pas...@lists.freepascal.org Subject: [fpc-pascal] Re

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-12 Thread Jonas Maebe
On 12 Mar 2010, at 17:59, Paul Ishenin wrote: 12.03.2010 23:51, Paul Ishenin wrote: If something more is required please let me know and I will search. Also found the next document with more info: http://www.agner.org/optimize/calling_conventions.pdf It describes what we implement

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-12 Thread Jonas Maebe
On 12 Mar 2010, at 18:25, Flávio Etrusco wrote: Can't we ask someone from Borland/Embarcadero? That's indeed a good idea, I don't think anyone has already done that. Are they that cheap to hold back such kind of information? I'm not aware of them being cheap in this or in other ways.

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-12 Thread Jonas Maebe
On 12 Mar 2010, at 19:50, dmitry boyarintsev wrote: Quite official, i guess: http://docwiki.embarcadero.com/RADStudio/en/Fastcall,_fastcall Yes, but it is not the full documentation. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] -Amacho

2010-03-13 Thread Jonas Maebe
On 13 Mar 2010, at 08:48, Adriaan van Os wrote: Is it useful to file bugs for -Amacho or is the feature still in experimental state ? Things that are known to be broken are mentioned in comment 0033592 at http://bugs.freepascal.org/view.php?id=15163

Re: [fpc-devel] SIMD support / SSE

2010-03-14 Thread Jonas Maebe
On 14 Mar 2010, at 16:13, Ivo Steinmann wrote: type TVector = packed record x, y, z, w: single; end; ... 1. parameters are passed by reference, instead of xmm0 and xmm1 registers Note that there are two separate issues here: a) on non-win64 platforms, the x86-64 ABI is currently not

Re: [fpc-devel] Unable to open file on Linux randomly in a CGI application when using templates

2010-03-14 Thread Jonas Maebe
On 14 Mar 2010, at 23:39, ABorka wrote: I have a CGI application with a datamodule that is using templates to generate the response pages (accessing a MySQL database through ZEOS). Every once in a while, I'm getting an Unable to open file exception that points to one of the templates the

Re: [fpc-devel] Unable to open file on Linux randomly in a CGI application when using templates

2010-03-15 Thread Jonas Maebe
On 15 Mar 2010, at 03:17, ABorka wrote: On 3/14/2010 16:08, Jonas Maebe wrote: On 14 Mar 2010, at 23:39, ABorka wrote: I have a CGI application with a datamodule that is using templates to generate the response pages (accessing a MySQL database through ZEOS). Every once in a while, I'm

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-15 Thread Jonas Maebe
On 15 Mar 2010, at 04:01, Paul Ishenin wrote: 12.03.2010 21:49, Jonas Maebe wrote: The default calling convention could be used. This would only work for routines with simple return types though (types that are not returned via a hidden first parameter). I don't think any/default

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-15 Thread Jonas Maebe
On 15 Mar 2010, at 07:49, Graeme Geldenhuys wrote: And here is more information. http://docwiki.embarcadero.com/RADStudio/en/Program_Control Thank you, that is the information that was needed: For a string, dynamic array, method pointer, or variant result, the effects are the same as if

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-15 Thread Jonas Maebe
On 15 Mar 2010, at 11:12, Paul Ishenin wrote: 15.03.2010 17:01, Jonas Maebe wrote: the only problem in that respect is that without the hacky patch mentioned earlier, GDB's Pascal parser does not support expressing method calls. The remaining question for me is whether you

Re: [fpc-devel] properties with getter evaluation in gdb

2010-03-15 Thread Jonas Maebe
On 15 Mar 2010, at 14:13, Flávio Etrusco wrote: On Mon, Mar 15, 2010 at 7:31 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 15 Mar 2010, at 11:12, Paul Ishenin wrote: 15.03.2010 17:01, Jonas Maebe wrote: the only problem in that respect is that without the hacky patch mentioned

Re: [fpc-devel] Missing command line parameters in Linux FPC

2010-03-16 Thread Jonas Maebe
On 16 Mar 2010, at 08:44, Graeme Geldenhuys wrote: Under Linux the following information is missing, yet this information is displayed in the Windows version of FPC. It's unrelated to Linux vs Windows. Those options are enabled/disabled per architecture, and I bet you are using a 32 bit

Re: [fpc-devel] dward debug info - someone promiced more compact debug info than stabs

2010-03-16 Thread Jonas Maebe
On 16 Mar 2010, at 15:58, Paul Ishenin wrote: Why dwarf information has so big debug files (comparing with stabs) on windows? Because Windows (just like Darwin) does not support referring to DWARF debug info from one object file to another, so a lot of debug information is duplicated in

Re: [fpc-devel] dward debug info - someone promiced more compact debug info than stabs

2010-03-16 Thread Jonas Maebe
On 16 Mar 2010, at 16:22, Jonas Maebe wrote: On 16 Mar 2010, at 15:58, Paul Ishenin wrote: Why dwarf information has so big debug files (comparing with stabs) on windows? Because Windows (just like Darwin) does not support referring to DWARF debug info from one object file to another

Re: [fpc-devel] dward debug info - someone promiced more compact debug info than stabs

2010-03-16 Thread Jonas Maebe
On 16 Mar 2010, at 16:37, Flávio Etrusco wrote: On Tue, Mar 16, 2010 at 12:22 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 16 Mar 2010, at 15:58, Paul Ishenin wrote: Why dwarf information has so big debug files (comparing with stabs) on windows? Because Windows (just like

Re: [fpc-devel] dward debug info - someone promiced more compact debug info than stabs

2010-03-16 Thread Jonas Maebe
On 16 Mar 2010, at 16:41, Paul Ishenin wrote: But 200 Mb of info for 10Mb executable is too much. How do you think? I personally don't care at all. I don't believe that other compilers on windows generates so fat output for dwarf. Do you know any similar numbers for gcc? No, since I

Re: [fpc-devel] Missing command line parameters in Linux FPC

2010-03-17 Thread Jonas Maebe
On 17 Mar 2010, at 07:30, Graeme Geldenhuys wrote: Those parameters are very handy if you are in a rush to create some build script (for various platforms, even though I am currently in 64-bit Linux). A quick 'fpc -h' to find the information without having to hunt through the various FPC

Re: [fpc-devel] Missing command line parameters in Linux FPC

2010-03-17 Thread Jonas Maebe
On 17 Mar 2010, at 15:39, Mark Morgan Lloyd wrote: Jonas Maebe wrote: Only options that are valid for the target architecture of the fpc binary should be shown, because showing options that are known not to work or that don't do anything mainly causes confusion. What about -an which

Re: [fpc-devel] C++ linking questions

2010-03-21 Thread Jonas Maebe
On 21 Mar 2010, at 14:28, Paul Ishenin wrote: 21.03.2010 20:21, Sven Barth wrote: 3. How can I parse a not reserved identifier? Checking idtoken for _ID, using it with token and after usage calling consume(_ID);? Usage is with pattern (all letters uppercase) or orgpattern (original

Re: [fpc-devel] RTL and Unicode filenames operations.

2010-03-21 Thread Jonas Maebe
On 21 Mar 2010, at 17:29, Martin Schreiber wrote: On Windows and Mac utf-16 is then native filename encoding On Mac it's utf-8, not utf-16. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] C++ linking questions

2010-03-22 Thread Jonas Maebe
On 22 Mar 2010, at 11:19, Anton Kavalenka wrote: Don't UNITS in Pascal intended to separate NAMESPACES? But unfortunately this prevents nested namespaces. The discussion is not about adding support for C++-style namespaces to Pascal, but for how to specify the C++ namespace in which an

Re: [fpc-devel] C++ linking questions

2010-03-22 Thread Jonas Maebe
On 22 Mar 2010, at 16:42, Dimitri Smits wrote: WHAT C++ compiler-mangling are you going to support? The compiler currently only supports G++ 3.x and later. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Re: [Lazarus] windres: can't open manifest

2010-03-23 Thread Jonas Maebe
On 23 Mar 2010, at 16:07, Michael Schnell wrote: On 03/23/2010 04:01 PM, Paul Ishenin wrote: 23.03.2010 21:26, Michael Schnell wrote: But where id fpc's make install move the correct executable ? If no other options are passed then to /usr/local/lib/fpc I think that is the problem - you

Re: [fpc-devel] StrUtils unit (is poorly implemented)

2010-03-29 Thread Jonas Maebe
On 29 Mar 2010, at 08:57, Michael Van Canneyt wrote: On Sun, 28 Mar 2010, Flávio Etrusco wrote: are StrUtils just for Delphi compatibility or are they meant for real use? In the first case, is there an alternative unit? In the second, would simple patches to implement AnsiStartsStr and

Re: [fpc-devel] bug report 12594

2010-03-31 Thread Jonas Maebe
On 31 Mar 2010, at 07:22, ABorka wrote: It seems it got closed, but I'm not sure it is really fixed (can't add notes now). http://bugs.freepascal.org/view.php?id=12594 You may want to post this message to the lazarus list instead. Jonas ___

Re: [fpc-devel] cdecl and constant parameters

2010-03-31 Thread Jonas Maebe
On 31 Mar 2010, at 20:01, Seth Grover wrote: The documentation (http://www.freepascal.org/docs-html/ref/refsu56.html) says A constant argument is passed by reference if its size is larger than a pointer. It is passed by value if the size is equal or is less then the size of a native

Re: [fpc-devel] FPC doesn't support big equations

2010-03-31 Thread Jonas Maebe
On 31 Mar 2010, at 21:01, Paulo Malheiros wrote: I need the result of big mathematical expression but apparently FPC cannot process it. I've made a simple test program in C and was able to get the correct value. In FPC it gives Invalid floating point operation, tested in Windows7 (64bit)

Re: [fpc-devel] cmem not aligning memory

2010-04-03 Thread Jonas Maebe
On 03 Apr 2010, at 13:00, C Western wrote: I notice that the cmem unit does not align memory in the same way as the default unit - removing the cmem unit makes a factor of two difference in the speed of some double precision matrix code. (My system is i386). Inspecting the cmem unit

Re: [fpc-devel] cmem not aligning memory

2010-04-03 Thread Jonas Maebe
On 03 Apr 2010, at 14:09, Micha Nelissen wrote: Do C memory managers guarantee any alignment anyway? Not for SSE (16 bytes) I'm sure, but 8 bytes I don't know. From Linux' malloc man page: For calloc() and malloc(), the value returned is a pointer to the allo- cated memory, which is

Re: [fpc-devel] -Or optimization flag

2010-04-05 Thread Jonas Maebe
On 05 Apr 2010, at 20:31, Seth Grover wrote: Is this optimization flag unsafe? I'm hesitant to enable it because of that first link, but if it's safe I'd like the speed improvement it implies. -Or is safe and automatically activated with -O2 and higher. Jonas

Re: [fpc-devel] cmem not aligning memory

2010-04-06 Thread Jonas Maebe
On 06 Apr 2010, at 12:00, Michael Schnell wrote: On 04/03/2010 02:12 PM, Jonas Maebe wrote: From Linux' malloc man page: For calloc() and malloc(), the value returned is a pointer to the allo- cated memory, which is suitably aligned for any kind of variable, or NULL if the request fails

Re: [fpc-devel] cmem not aligning memory

2010-04-06 Thread Jonas Maebe
On 06 Apr 2010, at 13:49, Michael Schnell wrote: On 04/06/2010 01:07 PM, Jonas Maebe wrote: No, calloc simply zeroes the allocated memory. So why does it provide a size argument ? One argument I know if is to prevent overflows, because size_t is an unsigned type while most

Re: [fpc-devel] cmem not aligning memory

2010-04-06 Thread Jonas Maebe
On 06 Apr 2010, at 15:11, Michael Schnell wrote: On 04/06/2010 02:15 PM, Jonas Maebe wrote: the result of calloc has to be assignable to any other pointer type: Is this not true for malloc(), as well ? Yes, but I was only trying to illustrate that the element size parameter of calloc

Re: [fpc-devel] Odd issue with breakpoints

2010-04-07 Thread Jonas Maebe
On 07 Apr 2010, at 21:49, Martin wrote: * Lazarus (rev 24492 ) compile with FPC trunc (rev 15110) * Both (lazarus / RTL) compiled with -gw -godwarfsets * gdb 6.8.3 or gdb 7.0 * Windows Vista 32 Bit Does it work if you use -Xe to compile lazarus? Jonas

Re: [fpc-devel] cmem not aligning memory

2010-04-08 Thread Jonas Maebe
On 08 Apr 2010, at 15:05, C Western wrote: How about an alternative implementation, without the integer recording size? I had a quick try at this - the only use of the MemSize routine in fpc+lazarus seems to be in an optimization in resizing strings. If this routine is adjusted to cope

<    6   7   8   9   10   11   12   13   14   15   >