Re: [fpc-pascal] Inline assembly using absolute dword ptr

2012-04-20 Thread Jonas Maebe
On 20 Apr 2012, at 17:27, OBones wrote: > I'm trying to compile the following code under FreePascal 2.6.0 : > > function MyGetCurrentThreadId: DWORD; assembler; > asm > {$IFDEF WIN32} > pushecx > mov ecx,fs:[dword ptr $18] Use this instead: mov ecx,dword ptr fs:[$18] > {$IFDEF

Re: [fpc-pascal] Inline assembly using absolute dword ptr

2012-04-20 Thread Jonas Maebe
On 20 Apr 2012, at 17:50, OBones wrote: > So there is a difference with Delphi's assembler where it defaults to > relative indexing while FPC defaults to absolute in that context. What exactly do you mean by relative addressing in this context? RIP-relative? In FPC, you indeed have to explicit

Re: [fpc-pascal] Open vs dynamic arrays

2012-04-22 Thread Jonas Maebe
On 22 Apr 2012, at 12:54, Mark Morgan Lloyd wrote: > you quite simply can't do that when there isn't an explicit index range since > your attempt to define an open array is interpreted as a dynamic array. Yes. The reason is that you can't declare variables whose type is "open array". In fact,

Re: [fpc-pascal] Errors compiling fixes_2.6 on win64: forgot to include dblib for mssqlconn?

2012-04-24 Thread Jonas Maebe
marcov wrote on Mon, 23 Apr 2012: In our previous episode, Reinier Olislagers said: Perhaps some of these revisions in trunk could be backported: r20692 | marco | 2012-04-02 13:46:51 +0200 (ma, 02 apr 2012) | 2 lines It is hard because 2.6.x uses a different makefile system compared to trunk

Re: [fpc-pascal] Re: Program without window but messages

2012-04-25 Thread Jonas Maebe
On 25 Apr 2012, at 17:49, Jürgen Hestermann wrote: > Is "ShowMessage" part of the LCL? I thought that it comes with Free Pascal > directly > because the wiki http://wiki.freepascal.org/Dialog_Examples/de#ShowMessage , > which > explains this message, is located on wiki.freepascal.org. http://w

Re: [fpc-pascal] Compiling from and to memory

2012-04-26 Thread Jonas Maebe
OBones wrote on Mon, 23 Apr 2012: And because I have to split my generated files so that FPC does not hit the 2GB memory limit (which it does for a 15M source file) What is the structure of that source code? (a few giant routines, large constant arrays, ... ?) Jonas

Re: [fpc-pascal] Compilation progress

2012-04-26 Thread Jonas Maebe
On 26 Apr 2012, at 17:31, OBones wrote: > Is there a way get progress information output by the compiler while building > a project? > I tried the -vt option, but I can't figure out a way to parse this and get > something like current value and max while the lines are output. > I also tried to

Re: [fpc-pascal] make install changed/broken?

2012-04-27 Thread Jonas Maebe
Mattias Gaertner wrote on Fri, 27 Apr 2012: Has something changed with 'make install'? Instead of copying files it recompiles and fails. My fault, fixed. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] make install changed/broken?

2012-04-27 Thread Jonas Maebe
Mattias Gaertner wrote on Fri, 27 Apr 2012: Thanks. But now 'make all' fails with: /usr/local/bin/ppc386 -Ur -Xs -O2 -n -Fui386 -Fusystems -Fu/Users/mattias/2.7.1/fpc/rtl/units/i386-darwin -Fii386 -FE. -FUi386/units/i386-darwin -dRELEASE -di386 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas cutils.pas

Re: [fpc-pascal] heaptrc question

2012-04-27 Thread Jonas Maebe
On 27 Apr 2012, at 17:50, Carver Carver wrote: > I am experiencing strange heaptrc output can someone please explain what sort > of error could trigger this > > Heap dump by heaptrc unit > 6590 memory blocks allocated : 6484894/6508528 > 6590 memory blocks freed : 6484894/6508528 > 0 unfree

Re: [fpc-pascal] making FPC more code optimized

2012-04-29 Thread Jonas Maebe
On 29 Apr 2012, at 12:22, Florian Klämpfl wrote: > Spent more man power into optimizer development, though some > optimizations are hard in pascal because we assume stricter aliasing > rules and because we don't have a volatile keyword. At least as far as our current optimizers are concerned, no

Re: [fpc-pascal] making FPC more code optimized

2012-04-29 Thread Jonas Maebe
On 29 Apr 2012, at 14:23, Jorge Aldo G. de F. Junior wrote: > What would be usefull is to move the loads of code stored in > sysutils/runtime into a dll/so. That's mainly useful if the external API of the RTL will ever stabilize, which is certainly not the case today. Otherwise you create a dyn

Re: [fpc-pascal] making FPC more code optimized

2012-04-29 Thread Jonas Maebe
On 29 Apr 2012, at 15:13, Jorge Aldo G. de F. Junior wrote: > If you deploy one executable, ok, but if you want to create a handfull > of executables (following unix logic of many small programs) then you > have a problem. You certainly do end up with larger executables. Whether or not this is a

Re: [fpc-pascal] How to install another version of fpc?

2012-04-30 Thread Jonas Maebe
Anthony Walter wrote on Sat, 28 Apr 2012: What do I have to do to get "fpc" to see the new version? http://lists.freepascal.org/lists/fpc-devel/2009-January/016299.html Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists

Re: [fpc-pascal] Errors compiling FPC trunk r21192 x86 windows & existential questions

2012-05-02 Thread Jonas Maebe
On 02 May 2012, at 18:19, Reinier Olislagers wrote: > Seem to be having some problems compiling FPC trunk r21192 x86 windows > (see below). > However, x64 build does work. > > Is this a known problem? Yes: http://bugs.freepascal.org/view.php?id=21880 Jonas

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Jonas Maebe
On 05 May 2012, at 14:02, Tomas Hajny wrote: > My proposal is platform independent (i.e. it will work also under Win32, > OS/2, etc., without any changes). Your proposal probably requires starting > the compiled binary using platform specific API functions to run it with a > modified environment

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Jonas Maebe
On 05 May 2012, at 14:25, Mattias Gaertner wrote: > It uses only the file name, not the path to distinguish. > Having two scripts with the same name recompiles every time you > switch. This does mean that if a script is moved, the stored script location as seen by the compiled binary will not c

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-09 Thread Jonas Maebe
On 09 May 2012, at 17:46, Jürgen Hestermann wrote: > Is it (already) possible to use Unicodestrings for file paths? Only if your current ansi code page supports the characters used in the unicodestring. There are not unicodestring overloads yet in the RTL. Jonas___

Re: [fpc-pascal] Subject: Re: 2.6.0 for Solaris? And other questions

2012-05-09 Thread Jonas Maebe
On 09 May 2012, at 18:26, microc...@zoho.com wrote: > I didn't find a list of maintainers on the home page and I don't know how > Free Pascal development is organized. Hopefully the maintainer will speak up > and in the meantime I will look at the build guide you mentioned further > on. There i

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-09 Thread Jonas Maebe
On 09 May 2012, at 21:46, Marco van de Voort wrote: > In our previous episode, Jonas Maebe said: >>> Is it (already) possible to use Unicodestrings for file paths? >> >> Only if your current ansi code page supports the characters used in the >> unicodestring

Re: [fpc-pascal] SIGFPE with SameValue()

2012-05-10 Thread Jonas Maebe
Torsten Bonde Christiansen wrote on Thu, 10 May 2012: On 2012-05-10 10:45, t.wieckow...@gmail.com wrote: it seams that MaxFloat get MaxDouble (FPC_HAS_TYPE_DOUBLE is defined) but SameValue uses as Single when overload. Works with SameValue(double(a),double(b),double(0)). How can that be, sin

Re: [fpc-pascal] Setting string to be UnicodeString by default

2012-05-15 Thread Jonas Maebe
Olivier Sannier wrote on Tue, 15 May 2012: Is there a way to force the string type to be an alias to UnicodeString instead of AnsiString as it is by default? It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or

Re: [fpc-pascal] Setting string to be UnicodeString by default

2012-05-15 Thread Jonas Maebe
Mattias Gaertner wrote on Tue, 15 May 2012: On Tue, 15 May 2012 10:43:19 +0200 Jonas Maebe wrote: It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or even better {$mode delphiunicode} (which also enable other

Re: [fpc-pascal] Setting string to be UnicodeString by default

2012-05-15 Thread Jonas Maebe
Marcos Douglas wrote on Tue, 15 May 2012: I would like to understand why Delphi compatibility is so important to FPC and Lazarus. Please hold that discussion on the fpc-other mailing list instead. This list is for getting help with using and programming in current FPC versions, and discus

Re: [fpc-pascal] Catching math exceptions in a DLL

2012-05-16 Thread Jonas Maebe
OBones wrote on Wed, 16 May 2012: Using FPC, I'm writing a DLL that exports functions used by a given host process. In order to protect the host process, it is mandatory that all exceptions are trapped in the exported function You are probably running into http://bugs.freepascal.org/view.p

Re: [fpc-pascal] Catching math exceptions in a DLL

2012-05-16 Thread Jonas Maebe
t.wieckowski wrote on Wed, 16 May 2012: If I could just interject, How to build fpc with -dTEST_WIN64_SEH ? I've fpc/lazarus daily snapshoot, does -dTEST_WIN64_SEH in "project options"->"compiler options"->"other" will be enough for SEH support ? No. The compiler itself has to be recompiled w

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-19 Thread Jonas Maebe
On 19 May 2012, at 17:36, Marco van de Voort wrote: > I'm not sure if the *rec records can handle pointers, one probably can't use > reference types in them, because the standard filedescriptions are > threadvars. > > Think what happens if those are simply "cloned". Threadvars are never cloned.

Re: [fpc-pascal] Darwin i386

2012-05-20 Thread Jonas Maebe
On 20 May 2012, at 02:59, Andrew Brunner wrote: > I'm having a hard time with GDB and debugging threads on a OSX 10.7.4 with > fpc/trunk > > The shipped gdb worked great with the exception of threads calling methods > via synchronize (so I can debug). What are you doing exactly, what happens, a

Re: [fpc-pascal] Darwin i386

2012-05-20 Thread Jonas Maebe
On 20 May 2012, at 15:25, Andrew Brunner wrote: >> What are you doing exactly, what happens, and what is the expected result >> instead? > > I'm upgrading my gdb from shipping version with darwin to gdb version from The above was a question relating to "... with the exception of threads calling

Re: [fpc-pascal] Can't install FPC on mac bookair 10.7.4

2012-05-21 Thread Jonas Maebe
Chovav Sutachy wrote on Mon, 21 May 2012: I can't install FPC compiler on mac 10.7.3 First, install Xcode if you do not have it yet. If you installed Xcode 4.3 or later, next open Xcode, go to Preferences -> Downloads and install the "Command line tools" package (the installer doesn't kno

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-22 Thread Jonas Maebe
Jürgen Hestermann wrote on Tue, 22 May 2012: Sven Barth schrieb: Estimated guess: the code is from a time where "String = AnsiString" wasn't possible. That's indeed probably true. That would be explanation. But then it must be *very* old code which shows that a revise is overdue. That's

Re: [fpc-pascal] Linux elf with signed checksum

2012-05-28 Thread Jonas Maebe
On 28 May 2012, at 14:09, ik wrote: > The second part is more interesting for this subject: It signs a checksum > of the ELF file, so any change to it will break the checksum. > It helps you to discover for example root-kits. > > Is it a compiler based signature, or something from the build itse

Re: [fpc-pascal] Cross compiling x86_64 on i386 Linux.

2012-05-28 Thread Jonas Maebe
On 28 May 2012, at 14:56, Bruce Tulloch wrote: > Am I correct to assume that if I drag in the x86_64 libraries I need > from another x86_64 system, put them in a local directory and then > reference then using the -XR option I can make this setup work? -XR is for pointing the compiler/linker to

Re: [fpc-pascal] Error in x32 compiler when using SSE3

2012-05-28 Thread Jonas Maebe
On 28 May 2012, at 14:41, OBones wrote: > I'm compiling the program at the end of this message The program is missing. > I really need to have the same instruction set used for floating point maths, > hence the use of SSE3 in both cases. If your x86-64 target is Win64, using -CfSSE2/-CfSSE3 w

Re: [fpc-pascal] Error in x32 compiler when using SSE3

2012-05-28 Thread Jonas Maebe
On 28 May 2012, at 15:19, OBones wrote: > Bugger, why does this keep happening to me??? > Anyway, this time it is at the end. I cannot reproduce the problem with 2.6.0/2.7.1 on Mac OS X/i386, nor with 2.7.1 on Linux/i386. I even don't see any comis* instructions in the code, the comparison is

Re: [fpc-pascal] Cross compiling x86_64 on i386 Linux.

2012-05-29 Thread Jonas Maebe
Bruce Tulloch wrote on Tue, 29 May 2012: Closer, but not quite there yet... [...] fpcfixes_2.6/cross/buildcrossbinutils Try adding --with-sysroot to the configure flags in that script. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepas

Re: [fpc-pascal] Error in x32 compiler when using SSE3

2012-05-29 Thread Jonas Maebe
OBones wrote on Mon, 28 May 2012: Boy, I'm having a hard day and I'm very sorry to make you waste so much time. Frac was here to see the impact of some changes on the issue, but the original code that crashes is with Trunc instead of Frac so that the comparison looks like this: if Trunc

Re: [fpc-pascal] Re: I need an lNet expert: multiple connections and only one central CallAction() - is this possible?

2012-05-29 Thread Jonas Maebe
On 29 May 2012, at 21:31, Bernd wrote: > 2012/5/29 Bernd Kreuss : >> Also with my code I >> seem to be able to produce strange crashes inside heaptrc that I have >> never seen before. > > Here it is again: It means that you have memory corruption in your program (using objects after freeing th

Re: [fpc-pascal] Cross compiling x86_64 on i386 Linux.

2012-05-30 Thread Jonas Maebe
On 30 May 2012, at 01:50, Bruce Tulloch wrote: > I tried --with-sysroot for configure in buildcrossbinutils and it does > not appear to make any difference. I still get the error > "/usr/local/opt/binutils/bin/x86_64-linux-ld: skipping incompatible > /lib/libpthread.so.0 when searching for /lib/l

Re: [fpc-pascal] Cross compiling x86_64 on i386 Linux.

2012-05-31 Thread Jonas Maebe
Bruce Tulloch wrote on Thu, 31 May 2012: On 31/05/12 01:40, Jonas Maebe wrote: That's correct. It seems that -XR isn't completely implemented on Linux in the compiler. Could you try, *instead* of using -XR, to use -k--sysroot=/full/path/to/crossroot/ ? I replaced the -XR o

Re: [fpc-pascal] jvmbackend merge

2012-06-02 Thread Jonas Maebe
On 02 Jun 2012, at 16:26, leledumbo wrote: > I saw a big commit merging jvmbackend branch into the main branch. Is it > stable already? It's as stable as the jvmbackend branch was (with even already some extra fixes in the mean time), so there's no problem with deleting your checkout of the jv

Re: [fpc-pascal] Accessing open array

2012-06-03 Thread Jonas Maebe
On 03 Jun 2012, at 17:53, Koenraad Lelong wrote: > Im trying to access an open array but I get a runtime error. You are trying to use a pointer to a static array as a pointer to a dynamic array (not an open array; have a look at e.g. http://rvelthuis.de/articles/articles-openarr.html to read a

Re: [fpc-pascal] Initializing dynamic arrays

2012-06-04 Thread Jonas Maebe
ingemar wrote on Mon, 04 Jun 2012: There is just one thing that I can't do: I can't initialize a matrix in any elegant way! I would like to do like this: m1: Matrix = ((1, 2, 3), (2, 3, 4)); and get a properly sized dynamic array matching the matrix given. This is obviously not suppo

Re: [fpc-pascal] fpimage reader for jpeg2000

2012-06-12 Thread Jonas Maebe
On 12 Jun 2012, at 20:07, Mattias Gaertner wrote: > On Tue, 12 Jun 2012 20:03:40 +0200 > Florian Klaempfl wrote: > >> Am 11.06.2012 12:03, schrieb Mattias Gaertner: >>> >>> Has someone already implemented a fpimage reader for jpeg2000? >> >> Probably not due to the patent situation? > > I gu

Re: [fpc-pascal] asm statement

2012-06-12 Thread Jonas Maebe
On 12 Jun 2012, at 18:41, Rainer Stratmann wrote: > Is it still necessary to fill in the registers at the end of a asm statement? Yes. > What happens if there is only the end; statement without the used registers? Then the compiler will assume that the assembler code can change all callee-sav

Re: [fpc-pascal] Debug information again

2012-06-13 Thread Jonas Maebe
Antonio Fortuny wrote on Wed, 13 Jun 2012: I can see the memory leak I have generated (read below) but no refecence to the line itself. Instead I receive the reference lines before and after the memory leak creation inside the rtl. The reason is that the RTL itself is compiled with optimis

Re: [fpc-pascal] header translation question, 64 bit problem

2012-06-17 Thread Jonas Maebe
On 17 Jun 2012, at 12:08, Florian Klämpfl wrote: > Am 17.06.2012 01:02, schrieb Bernd: >> >> TPurplePluginInfo = packed record > > You should also avoid using packed. FPC usually uses the same alignment > as C on a certain platform does if the types are correctly used. And if you use {$packre

Re: [fpc-pascal] header translation question, 64 bit problem

2012-06-17 Thread Jonas Maebe
On 17 Jun 2012, at 12:36, Bernd wrote: > I did not know this. I have read in many different places that one > should use packed Those places please probably said "you should use packed *if you want the layout of a record to be the same on all platforms and across different FPC versions*". In

Re: [fpc-pascal] Adding method dynamically to a class

2012-06-19 Thread Jonas Maebe
michael.vancanneyt wrote on Tue, 19 Jun 2012: As far as I know there is no language structure for this, unless the objective C classes support offers this. You can indeed do that in Objective-C/Pascal, but a) that's not via a language construct, but by directly interacting with the runtime

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-28 Thread Jonas Maebe
kyan wrote on Thu, 28 Jun 2012: It seem that the way to go -I don't have much knowledge on SEH so I'd rather not mess with such low level system code- is to try to turn my API to safecall and install a SafeCallErrorProc handler that will try to recreate and raise the safecall exception from the

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-28 Thread Jonas Maebe
kyan wrote on Thu, 28 Jun 2012: On Thu, Jun 28, 2012 at 12:45 PM, Jonas Maebe wrote: The safecall calling convention is only supported on a few platforms. I want it for Win32/64, WinCE/arm and Linux. How can I find whether it is implemented on these platforms without having to actually

Re: [fpc-pascal] Custom operators for non-record types

2012-07-02 Thread Jonas Maebe
Sven Barth wrote on Mon, 02 Jul 2012: Maybe there were reasons to not allow them... You can of course prepare a bug report or wait till one of the other developers who are more experienced in FPC's overloading speak up. I think most of operator overloading support was implemented by Peter,

Re: [fpc-pascal] Custom operators for non-record types

2012-07-02 Thread Jonas Maebe
JC Chu wrote on Mon, 02 Jul 2012: On Mon, Jul 2, 2012 at 3:54 PM, Sven Barth wrote: Maybe there were reasons to not allow them... You can of course prepare a bug report or wait till one of the other developers who are more experienced in FPC's overloading speak up. Anyway, here’s a patch fo

Re: [fpc-pascal] Custom operators for non-record types

2012-07-03 Thread Jonas Maebe
Sven Barth wrote on Tue, 03 Jul 2012: Am 03.07.2012 12:23 schrieb "JC Chu" : Could you elaborate on that? Do I need to run the test suite with the old compiler first? * first do a "make cycle" on a unmodified checkout, then run the testsuite. While "make cycle" is useful as a first test,

Re: [fpc-pascal] ..installing XCode ...make sure not to deselect UNIX development support - TOO LATE

2012-07-09 Thread Jonas Maebe
Paul McCombie wrote on Sun, 08 Jul 2012: - I had already installed XCode 4.3 on my Mac before attempting to install fpc, and had deselected UNIX development support. Xcode 4.3 no longer allows you to select global support for UNIX development during the installation, you have to do so afte

Re: RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Jonas Maebe
On 10 Jul 2012, at 11:40, Michael Van Canneyt wrote: > I have added a section to > > http://wiki.freepascal.org/index.php?title=User_Changes_Trunk > > to notify people of this change. Could you change it to use the same format/template as the other entries? Jonas

Re: [fpc-pascal] Database problem on Solaris SPARC

2012-07-12 Thread Jonas Maebe
Thomas Schatzl wrote on Thu, 12 Jul 2012: On Thu, 2012-07-12 at 09:47 +, Mark Morgan Lloyd wrote: Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 4] 0x004b08b8 in TPQCONNECTION__LOADFIELD (CURSOR=0xfad601a0, FIELDDEF=0xfad30f20, BUFFER=0xfa5f00bc, CREATEBLOB=fa 803

Re: [fpc-pascal] Database problem on Solaris SPARC

2012-07-12 Thread Jonas Maebe
Mark Morgan Lloyd wrote on Thu, 12 Jul 2012: I'll try to test against 2.7.1 later in the day, although as I've said Linux is OK. The memory layout is not necessarily the same on both OSes. Is the if FIntegerDatetimes then something Solaris-specific Ludo?)? That would be extremely unlik

Re: [fpc-pascal] Variable of class method type of function

2012-07-15 Thread Jonas Maebe
On 15 Jul 2012, at 14:05, CA Gorski wrote: > How to declare a variable of class method type of function? > > ... > var >MyVar: function(AParam: string): boolean of class; > ... > gives an error using FPC 2.6.1 (Win64). You have to use "of object", just like for a regular method. Jonas ___

Re: [fpc-pascal] Variable of class method type of function

2012-07-15 Thread Jonas Maebe
On 15 Jul 2012, at 15:09, CA Gorski wrote: > But then I get the following error trying to use the variable: > > Error: Incompatible types: got " function(AnsiString):Boolean of object;Register>" expected " variable type of function(AnsiString):Boolean of object;Register>" That seems to be a bug

Re: [fpc-pascal] Variable of class method type of function

2012-07-16 Thread Jonas Maebe
On 16 Jul 2012, at 13:18, CA Gorski wrote: > > On 15.07.2012 15:35, Jonas Maebe wrote: >> That seems to be a bug in ObjFPC mode procvar support. It works in Delphi >> mode. Please always include a complete test program in the future, so that >> people wanting to help

Re: [fpc-pascal] Cross-compiling Win64=>Win32 fails

2012-07-20 Thread Jonas Maebe
On 20 Jul 2012, at 12:20, Reinier Olislagers wrote: > I've been extending fpcup, trying to add Win64=>Win32 cross compiler ... > see latest revision on > https://bitbucket.org/reiniero/fpcup/changesets > > With FPC trunk, I get this error: > fpcdefs.inc(216,2) Error: User defined: Cross-compilin

Re: [fpc-pascal] Floating point discrepancy in x64 mode

2012-07-20 Thread Jonas Maebe
On 20 Jul 2012, at 11:59, OBones wrote: > When I compile it with ppc386 and run it, I get the following output: > > 4.17E-002 > 4.17E-002 > > which is totally expected. > However, when I compile it with ppcrossx64 and run it, I get the following > output: > > 4.167

Re: [fpc-pascal] Re: UnicodeString comparison performance

2012-07-23 Thread Jonas Maebe
On 23 Jul 2012, at 10:58, OBones wrote: > leledumbo wrote: >> I look at the generated code and in the direct one there's additional >> overhead of decrementing the reference counter on each iteration. > I see it too now (I forgot about the -a option). > I can understand why there is a call to the

Re: [fpc-pascal] Problem compiling

2012-08-05 Thread Jonas Maebe
On 05 Aug 2012, at 23:46, dhkblas...@zeelandnet.nl wrote: > text.inc(199,34) Error: Illegal type conversion: > "Text" to "TextRec" > > after updating the compiler sources from SVN. > > Free Pascal Compiler version 2.7.1 [2012/05/22] for i386 > > Anyone have > an idea what could be wrong? B

Re: [fpc-pascal] Get all caller adresses of a procedure/function

2012-08-06 Thread Jonas Maebe
On 06 Aug 2012, at 21:06, Rainer Stratmann wrote: > Am Monday 06 August 2012 20:12:41 schrieb Sven Barth: >> The >> problem now is that without knowing the context of a found location >> 0xCA11 you don't know whether it is really a call opcode or some >> immediate data that was passed to some pr

Re: [fpc-pascal] class of a class function

2012-08-07 Thread Jonas Maebe
CA Gorski wrote on Tue, 07 Aug 2012: How can I get the actual class a class function is called in? Via "self". Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] class of a class function

2012-08-07 Thread Jonas Maebe
CA Gorski wrote on Tue, 07 Aug 2012: I tried that already, but at least in my case Self is Nil inside the class function. Compiler (fpc 2.6.1 ) bug? It does not return nil for me: *** {$mode objfpc} type TSomething = class class function GetMyClass: TClass; end; class function TS

Re: [fpc-pascal] Inline bytes

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: How is it possible to put some inline bytes in the code like the former inline( $1f , $ef , $1A ); instruction? {$asmmode att} asm .byte $0x1f, $0xef, $0x1a end; {$asmmode intel} asm db $1a, $ef, $1a end; If this is supposed to be the only cod

Re: [fpc-pascal] Inline bytes

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: Am Thursday 09 August 2012 15:14:29 schrieb Jonas Maebe: {$asmmode att} asm .byte $0x1f, $0xef, $0x1a end; I made an error here, the "$" should be removed (see Thomas' mail) {$asmmode intel} asm db $1a, $ef, $1a end; T

Re: [fpc-pascal] Label

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: Is it possible to get the adress of a label in a procedure? Not outside that procedure, no. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/

Re: [fpc-pascal] Label

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: Am Thursday 09 August 2012 15:35:54 schrieb Jonas Maebe: Rainer Stratmann wrote on Thu, 09 Aug 2012: > Is it possible to get the adress of a label in a procedure? Not outside that procedure, no. Would it be possible to chage it, to get t

Re: [fpc-pascal] Inline bytes

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: Am Thursday 09 August 2012 15:33:52 schrieb Jonas Maebe: > Thanks, the next problem then is: I wanted to do that in an inline > procedure but if the compiler detects an asm statement then inline is > disabled(!). That's correct, it i

Re: [fpc-pascal] Label

2012-08-09 Thread Jonas Maebe
Sven Barth wrote on Thu, 09 Aug 2012: Am 09.08.2012 15:35, schrieb Jonas Maebe: Rainer Stratmann wrote on Thu, 09 Aug 2012: Is it possible to get the adress of a label in a procedure? Not outside that procedure, no. Just because it sounds that way: is it possible inside the procedure

Re: [fpc-pascal] Inline bytes

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: To avoid disabling procedure/function inlining when the compiler finds an asm instruction it would be good to have at least the mentioned former inline( $AB, $CD , $EF , ... ); back. Is that possible? There are no plans to do so, and even if it w

Re: [fpc-pascal] Label

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: If you have a label in a procedure and declare this procedure as inline procedure then it gives also problems (Fatal: compilation aborted!). That is the generic error message that is shown at the end of every failed compilation. I guess you mean t

Re: [fpc-pascal] Inline bytes

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: Am Thursday 09 August 2012 17:09:57 schrieb Jonas Maebe: if it were added it would be quite possible that this would also disable inlining the containing routine for implementation reasons. I think the reason for disabling is that in the asm code

Re: [fpc-pascal] Label

2012-08-09 Thread Jonas Maebe
Rainer Stratmann wrote on Thu, 09 Aug 2012: Am Thursday 09 August 2012 17:18:09 schrieb Jonas Maebe: I would really recommend you (again) to use resourcestrings. You say that is not possible and that is not possible (or someone can say: you don't want to go deep in it). You no

Re: [fpc-pascal] fpc no longer links

2012-08-12 Thread Jonas Maebe
On 12 Aug 2012, at 11:16, Mattias Gaertner wrote: > Since yesterday fpc no longer links some programs, e.g. lazarus. It reports no > error: > > Assembling (pipe) ../units/i386-darwin/carbon/lazarus.s > Compiling resource ../units/i386-darwin/carbon/lazarus.or > Closing script ../ppas.sh > 198 li

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-12 Thread Jonas Maebe
On 12 Aug 2012, at 15:25, Mark Morgan Lloyd wrote: > Rainer Stratmann wrote: > >> For the above mentioned purpose it works perfect since some days. >> I got all caller adresses and even more I got all text snippets (pchar to >> the snippet!). If you know something about assembler language then

Re: [fpc-pascal] fpc no longer links

2012-08-12 Thread Jonas Maebe
On 12 Aug 2012, at 14:37, Mattias Gaertner wrote: > Jonas Maebe hat am 12. August 2012 um 11:58 > geschrieben:> >> On 12 Aug 2012, at 11:16, Mattias Gaertner wrote: >> >> [...] >> No, never (unless the -Cn command line parameter is passed to the compiler) >

Re: [fpc-pascal] FPC trunk seems to crash compiling Lazreport; was: Re: [Lazarus] Lazreport compilation problems with FPC trunk

2012-08-12 Thread Jonas Maebe
On 12 Aug 2012, at 19:46, Reinier Olislagers wrote: > Thread from Lazarus list... > > Perhaps some kind FPC dev could look at bug 2252 if this is an FPC trunk > bug connected with generating stabs debug info instead of a > Lazreport/Lazarus bug7 I would suggest to start by not compiling the com

Re: RE : [fpc-pascal] FPC trunk seems to crash compiling Lazreport; was: Re: [Lazarus] Lazreport compilation problems with FPC trunk

2012-08-12 Thread Jonas Maebe
On 12 Aug 2012, at 20:14, Ludo Brands wrote: >> I would suggest to start by not compiling the compiler or RTL >> with stack checking enabled. >> > > Is stack checking on by default? No, it's not. > I encounter the same problem as Reinier and > I build the compiler with OPT="-g -gl", nothing

Re: [fpc-pascal] WeekDay outdated?

2012-08-13 Thread Jonas Maebe
Jürgen Hestermann wrote on Sun, 12 Aug 2012: I am not able to use this function: http://www.freepascal.org/docs-html/rtl/dos/weekday.html nor can I find it in the sources. Does it still exist? If yes, how to use it? Which unit? DOS does not work. The weekday function only exists in the unix v

Re: [fpc-pascal] WeekDay outdated?

2012-08-13 Thread Jonas Maebe
Jürgen Hestermann wrote on Mon, 13 Aug 2012: Am 2012-08-13 11:08, schrieb Jonas Maebe: The weekday function only exists in the unix version of the Dos unit. That's strange (and not documented). It's because the documentation is generated under Linux using fpdoc (which is the onl

Re: [fpc-pascal] Re: fpdoc executable both in bin and utils\fpdoc - but not fpdoc.css

2012-08-14 Thread Jonas Maebe
michael.vancanneyt wrote on Tue, 14 Aug 2012: There is no discussion that fpdoc.css should be distributed. The only question is: where should we put it ? On Unix, $PREFIX/share/doc/fpc-$fpcversion/ would seem appropriate to me. Jonas ___ fpc-pasca

Re: [fpc-pascal] linux: should we hard-code versioned or unversioned shared libraries in our apps?

2012-08-15 Thread Jonas Maebe
On 15 Aug 2012, at 12:43, Graeme Geldenhuys wrote: > This issue has come up before in a fcl-db discussion regarding the > Firebird Database, where the libfbclient.so was missing from many > Linux distros (eg: Ubuntu 10.04), but a libfbclient.so.2.0 was > available instead. FCL-DB only checks for

Re: [fpc-pascal] linux: should we hard-code versioned or unversioned shared libraries in our apps?

2012-08-15 Thread Jonas Maebe
On 15 Aug 2012, at 13:32, Graeme Geldenhuys wrote: > On 15 August 2012 12:10, Jonas Maebe wrote: >> >> The official way to get the unversioned symbolic links is to install the >> -dev or >> -devel package for that library. Of course, you're not supposed to

Re: [fpc-pascal] linux: should we hard-code versioned or unversioned shared libraries in our apps?

2012-08-15 Thread Jonas Maebe
On 15 Aug 2012, at 15:14, Graeme Geldenhuys wrote: > On 15 August 2012 12:49, Jonas Maebe wrote: >> You said that you manually created the symbolic link. I simply explained >> that you should >> never do that, and instead install the development packages because

Re: [fpc-pascal] Re: linux: should we hard-code versioned or unversioned shared libraries in our apps?

2012-08-15 Thread Jonas Maebe
On 15 Aug 2012, at 17:19, Michael Van Canneyt wrote: > On Wed, 15 Aug 2012, Graeme Geldenhuys wrote: > >> So why does FCL-DB look at the unversioned *.so by default? Wouldn't >> it make more sense to change FCL-DB to look for libfbclient.so.2 >> instead? 2 being the latest major version of Fireb

Re: [fpc-pascal] Xcode

2012-08-16 Thread Jonas Maebe
Franz wrote on Wed, 15 Aug 2012: Since version 4.3.3 Xcode is installed only as application in folder applications. Some folders are apparent in content of application but distinguishing in substance with folder developer. Will or until when will free pascal developed for earlier version of

Re: [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversionedshared libraries in our apps?

2012-08-16 Thread Jonas Maebe
On 16 Aug 2012, at 18:11, Michael Van Canneyt wrote: > My plan (for linux) was: > Search fbclient.so search fbclient.so.2 (2.x series of firebird) > search fbclient.so.1 (1.x series of Firebird) if the library name has not > been specified. fbclient.so should not be searched. It could point to

Re: [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversionedshared libraries in our apps?

2012-08-16 Thread Jonas Maebe
On 16 Aug 2012, at 20:59, Marco van de Voort wrote: > In our previous episode, Jonas Maebe said: >>> My plan (for linux) was: >>> Search fbclient.so search fbclient.so.2 (2.x series of firebird) >>> search fbclient.so.1 (1.x series of Firebird) if the library na

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Jonas Maebe
Graeme Geldenhuys wrote on za, 18 aug 2012: 1) Is it correct that String <> AnsiString any more? Only in {$mode delphiunicode} (which is what you should use if you want to compile code written for a Delphi version in which string=unicodestring). 2) If true, what is String an alias of?

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Jonas Maebe
On 18 Aug 2012, at 21:20, Graeme Geldenhuys wrote: > Wasn't there lots of "votes" from many that string is UTF-8 encode > under Linux, Unix, MacOSX, and UTF-16 under Windows? The mode is called "delphiunicode" and in Delphi unicode versions, string = unicodestring. Maybe one day another mode or

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Jonas Maebe
On 18 Aug 2012, at 21:29, Graeme Geldenhuys wrote: > On 18 August 2012 16:11, Jonas Maebe wrote: >> Only in {$mode delphiunicode} (which is what you should use if you want to >> compile code written for a Delphi version in which string=unicodestring). > > I've enab

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Jonas Maebe
On 18 Aug 2012, at 22:22, Sven Barth wrote: > E.g. consider the following example: > > {$mode delphiunicode} > > type > TMyStringList = class(TStringList) >function Add(const aText: String): Integer; override; > end; > > This will currently give a compile error, because TStringList is co

Re: [fpc-pascal] Assembler file generate by compiler

2012-08-18 Thread Jonas Maebe
On 18 Aug 2012, at 22:48, Rainer Stratmann wrote: > I did option -a, the compiler needs longer now, but where can I see the > generated file(s)? In the same directory that contains the generated .o and .ppu files. Jonas ___ fpc-pascal maillist - f

Re: [fpc-pascal] rawbytestring

2012-08-18 Thread Jonas Maebe
On 18 Aug 2012, at 19:53, Marco van de Voort wrote: > It turns out that rawbytestring is only such for 1-byte types, and anything > else gets converted to the default ascii (1-byte) encoding, which is > Windows-1252, resulting in lossy conversions. Indeed, that was also mentioned afterwards in t

Re: [fpc-pascal] Assembler file generate by compiler

2012-08-19 Thread Jonas Maebe
On 19 Aug 2012, at 10:55, Rainer Stratmann wrote: > Am Saturday 18 August 2012 23:53:36 schrieb Jonas Maebe: >> On 18 Aug 2012, at 22:48, Rainer Stratmann wrote: >>> I did option -a, the compiler needs longer now, but where can I see the >>> generated file(s)? >&g

  1   2   3   4   5   6   7   8   9   10   >