Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-19 Thread wkitty42
On 12/19/2015 11:33 AM, Sven Barth wrote: Am 19.12.2015 15:54 schrieb [...] not really... backwards compatibility and all that... borland's TP and BP do the same... at least back as far as v6... i can't get to my v5 or v3 to test but i daresay that they, too, do the same... looking forward fro

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-19 Thread Sven Barth
Am 19.12.2015 15:54 schrieb : > > On 12/18/2015 06:16 AM, R. Diez wrote: > [...] > >> > "for loop variable value reliable after loop?" >> > http://lists.freepascal.org/pipermail/fpc-pascal/2015-October/045446.html >> > [...] >> > language behaviour that may be unexpected if you are used to >>

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-19 Thread wkitty42
On 12/18/2015 06:16 AM, R. Diez wrote: [...] > "for loop variable value reliable after loop?" > http://lists.freepascal.org/pipermail/fpc-pascal/2015-October/045446.html > [...] > language behaviour that may be unexpected if you are used to > e.g. C, but that is considered normal in Pascal

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-19 Thread Sven Barth
Am 19.12.2015 14:19 schrieb "Jonas Maebe" : > > On 18/12/15 10:12, Lukasz Sokol wrote: >> >> I know FreePascal is not Linux, the Team is not Torvalds etc;) >> but have you seen this ? >> >> https://lwn.net/Articles/233482/ > > > Maybe a "volatile" intrinsic, just like we already have an "unaligned"

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-19 Thread Jonas Maebe
On 18/12/15 10:12, Lukasz Sokol wrote: I know FreePascal is not Linux, the Team is not Torvalds etc;) but have you seen this ? https://lwn.net/Articles/233482/ Maybe a "volatile" intrinsic, just like we already have an "unaligned" intrinsic, would indeed be a better idea than adding the possi

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-19 Thread Florian Klaempfl
Am 18.12.2015 um 12:16 schrieb R. Diez: > > I see. Based on that information, and on the issue of function calls > crossing units, I guess you could rephrase that in much less-friendly > way. I'm playing evil advocate now: "FreePascal is so simple it can only > optimise properly the kind of hand-w

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-19 Thread Mark Morgan Lloyd
R. Diez wrote: Issuing a generic memory barrier is workable, but it kills performance, as all variables will be reloaded again. Performance does matter when working on microcontrollers. Could I ask for a reality check here. That sounds more like a cache flush, while a membar only ensures tha

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread R. Diez
> The reason the need for volatile on embedded systems is far > less in FPC, is the existence of the "absolute" keyword. > [...] > Only if you would take the address > of one of these variables and store it in a pointer, > you would need "volatile" in this context. Thanks for your detailed answe

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Karoly Balogh (Charlie/SGR)
Hi, On Thu, 17 Dec 2015, R. Diez wrote: > Maintaining your own independent compiler is hard, and I would have > expected that FreePascal had turned to GCC or LLVM a long time ago. Thank God that never happened (not as the first option anyway), considering the state of the GNU toolchain on some p

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > > (you also need it for variables you access from interrupt routines, as they > > might change while a procedure is running) > > If they're global variables, which they presumably are, that's no more > necessary than in the multi-threading case. True

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Jonas Maebe
marcov wrote on Fri, 18 Dec 2015: In our previous episode, Jonas Maebe said: The reason the need for volatile on embedded systems is far less in FPC, is the existence of the "absolute" keyword. In C, you have to declare [snip] (you also need it for variables you access from interrupt routin

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > The reason the need for volatile on embedded systems is far less in FPC, > is the existence of the "absolute" keyword. In C, you have to declare > all of those memory mapped registers as volatile pointers, because > otherwise things will get optimised

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Tomas Hajny
On Fri, December 18, 2015 09:59, Jonas Maebe wrote: > R. Diez wrote: Hello, Please note that the original poster doesn't seem to be subscribed to the list (in Cc: now). Tomas >> The only thing I found when searching for "FreePascal disadvantages" was >> a general dislike of the Pascal languag

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Lukasz Sokol
On 17/12/15 14:13, R. Diez wrote: > Hi all: > [...] > > And there you go, I haven't quite started yet and I already > discovered the first serious issue: there is no 'volatile' keyword. > This matter has been brought up in the past, and it worries me that > it has just been downplayed. > [...]

Re: [fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-18 Thread Jonas Maebe
R. Diez wrote: The only thing I found when searching for "FreePascal disadvantages" was a general dislike of the Pascal language, which may be justified if there are many more gotchas like this: "for loop variable value reliable after loop?" http://lists.freepascal.org/pipermail/fpc-pascal/2015

[fpc-pascal] Lack of 'volatile' a serious issue. Any other such caveats?

2015-12-17 Thread R. Diez
Hi all: I have fond memories of Turbo Pascal and Delphi, and the latest FreePascal version seems promising enough. When I read that you can also write embedded firmware with it, I decided to have a look. I need a Windows and Linux GUI for my embedded firmware, and a development environment th