Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About volatile attribute..

0 views
Skip to first unread message

amin...@gmail.com

unread,
Jan 18, 2020, 12:30:38 PM1/18/20
to
Hello,


About volatile attribute..

I have just read the following about volatile from Barry Kelly:

"Specifically, volatile prevents the compiler from changing the number of reads or writes to or from a location from the number that are
explicitly indicated in the source. That doesn't mean that the reads or
writes to volatile locations will act as memory barriers.

To my knowledge, current implementations of Win32 Delphi never change
the number or order of reads or writes to global variables or fields of
objects."

Read more here:

http://borland.newsgroups.archived.at/public.delphi.language.delphi.win32/200606/0606232337.html

So i think the old Delphi compilers that don't support volatile never change
the number or order of reads or writes to global variables or fields of
objects, and i think since Freepascal in the Delphi mode is compatible with the old Delphi compilers that don't support volatile, so then Freepascal in the Delphi mode never change the number or order of reads or writes to global variables or fields of objects.


Thank you,
Amine Moulay Ramdane.
0 new messages