Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Daniël Mantione
Op Tue, 11 Sep 2012, schreef Alexander Klenin: On Tue, Sep 11, 2012 at 8:03 AM, Jonas Maebe wrote: If you want to do that, you need to add a layer in between that converts the sets into integer bitmasks in a reliable, portable and future-proof way. How about packed sets? Do they have wel

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Alexander Klenin
On Tue, Sep 11, 2012 at 8:03 AM, Jonas Maebe wrote: > > If you want to do that, you need to add a layer in between that converts the > sets into integer bitmasks in a reliable, portable and future-proof way. > How about packed sets? Do they have well-defined memory layout? If not, then maybe the

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Jonas Maebe
On 10 Sep 2012, at 23:42, Daniël Mantione wrote: > Op Mon, 10 Sep 2012, schreef Jonas Maebe: > >> You can explicitly define the ordinal values of enumerations if you depend >> on that sort of stuff (which afaik the Qt units in fact do). > > That's a rewriting of history, as we invented that fe

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Daniël Mantione
Op Mon, 10 Sep 2012, schreef Jonas Maebe: On 10 Sep 2012, at 23:12, Daniël Mantione wrote: Op Mon, 10 Sep 2012, schreef Jonas Maebe: If you want to do that, you need to add a layer in between that converts the sets into integer bitmasks in a reliable, portable and future-proof way. Yes

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Jonas Maebe
On 10 Sep 2012, at 23:12, Daniël Mantione wrote: > Op Mon, 10 Sep 2012, schreef Jonas Maebe: > >> If you want to do that, you need to add a layer in between that converts the >> sets into integer bitmasks in a reliable, portable and future-proof way. > > Yes! Let's also convert integers to enu

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Daniël Mantione
Op Mon, 10 Sep 2012, schreef Jonas Maebe: If you want to do that, you need to add a layer in between that converts the sets into integer bitmasks in a reliable, portable and future-proof way. Yes! Let's also convert integers to enums with a case statement rather than typecast, just in case

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Jonas Maebe
On 10 Sep 2012, at 22:58, Daniël Mantione wrote: > Op Mon, 10 Sep 2012, schreef Jonas Maebe: > >> No, sets are an opaque data type. Their internal format is undefined. > > I knew you would answer to that :) While, I disagree that a set is opaque, > but, we can skip that discussion. What's goin

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Daniël Mantione
Op Mon, 10 Sep 2012, schreef Jonas Maebe: On 10 Sep 2012, at 22:06, Daniël Mantione wrote: On Monday 10 September 2012 20:18:52 Vincent Snijders wrote: If it is the combination of enum, then the type of the parameter is set of enum. Ahum, I am talking about passing combinations of enums v

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Jonas Maebe
On 10 Sep 2012, at 20:03, Den Jean wrote: > As described in > http://bugs.freepascal.org/view.php?id=22797 > > fpc 2.7.1 does not allow anymore to pass an enum > to a function expecting integers. This has never been allowed. The only thing that was allowed was defining an enum as a default va

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Jonas Maebe
On 10 Sep 2012, at 22:06, Daniël Mantione wrote: >> On Monday 10 September 2012 20:18:52 Vincent Snijders wrote: >>> If it is the combination of enum, then the type of the parameter is set of >>> enum. >> Ahum, I am talking about passing combinations of enums values >> (usually bitmasks, assigned

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Marco van de Voort
In our previous episode, Dani?l Mantione said: > > On Monday 10 September 2012 20:18:52 Vincent Snijders wrote: > >> If it is the combination of enum, then the type of the parameter is set of > >> enum. > > Ahum, I am talking about passing combinations of enums values > > (usually bitmasks, assigne

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Daniël Mantione
Op Mon, 10 Sep 2012, schreef Den Jean: On Monday 10 September 2012 20:18:52 Vincent Snijders wrote: If it is the combination of enum, then the type of the parameter is set of enum. Ahum, I am talking about passing combinations of enums values (usually bitmasks, assigned enums, some assigned

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Den Jean
On Monday 10 September 2012 20:18:52 Vincent Snijders wrote: > If it is the combination of enum, then the type of the parameter is set of > enum. Ahum, I am talking about passing combinations of enums values (usually bitmasks, assigned enums, some assigned enums are already combinations of other) t

Re: [fpc-devel] enums and integer auto conversion

2012-09-10 Thread Vincent Snijders
2012/9/10 Den Jean : > Hi, > > As described in > http://bugs.freepascal.org/view.php?id=22797 > > fpc 2.7.1 does not allow anymore to pass an enum > to a function expecting integers. > > Note that there has always been a > {$MINENUMSIZE 4} in qt4.pas > > Is this intended behaviour ? I really hope i

[fpc-devel] enums and integer auto conversion

2012-09-10 Thread Den Jean
Hi, As described in http://bugs.freepascal.org/view.php?id=22797 fpc 2.7.1 does not allow anymore to pass an enum to a function expecting integers. Note that there has always been a {$MINENUMSIZE 4} in qt4.pas Is this intended behaviour ? I really hope it is not. I cannot define the type of t

Re: [fpc-devel] Error building branch targetandroid

2012-09-10 Thread Felipe Monteiro de Carvalho
On Mon, Sep 10, 2012 at 4:42 PM, Marco van de Voort wrote: > Afaik there was some comment later in that thread that the makefiles > sometimes detect > windows by the semicomma's in the PATH. > > Try to add ;c:\windows\system or so to your path line. Nice, that fixes the problem too =) Strange th

Re: [fpc-devel] Error building branch targetandroid

2012-09-10 Thread Marco van de Voort
In our previous episode, Felipe Monteiro de Carvalho said: > wrote: > > but I have: > > > > SET PATH=C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32 > > > > And the file C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32\pwd.exe does > > exist > > I think I found the problem. It seams that building

Re: [fpc-devel] Error building branch targetandroid

2012-09-10 Thread Felipe Monteiro de Carvalho
On Mon, Jul 9, 2012 at 12:09 PM, Felipe Monteiro de Carvalho wrote: > but I have: > > SET PATH=C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32 > > And the file C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32\pwd.exe does > exist I think I found the problem. It seams that building fails if my sou

Re: [fpc-devel] 2.7.1 rev 22341 causes crashes

2012-09-10 Thread Jonas Maebe
Mattias Gaertner wrote on Mon, 10 Sep 2012: Since revision 22341 various strange crashes appear in Lazarus and applications (Windows and Linux). See http://bugs.freepascal.org/view.php?id=22842 Log entry says: r22341 | florian | 2012-09-06 17:11:58 +0200 (Thu, 06 Sep 2012) | 1 line * when cr

[fpc-devel] 2.7.1 rev 22341 causes crashes

2012-09-10 Thread Mattias Gaertner
Hi, Since revision 22341 various strange crashes appear in Lazarus and applications (Windows and Linux). See http://bugs.freepascal.org/view.php?id=22842 Log entry says: r22341 | florian | 2012-09-06 17:11:58 +0200 (Thu, 06 Sep 2012) | 1 line * when creating method pointers, put them into regis