<html>
<head>
<base href="http://bugzilla.gdcproject.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Add support for attribute to mark data as volatile."
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=126#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Add support for attribute to mark data as volatile."
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=126">bug 126</a>
from <span class="vcard"><a class="email" href="mailto:johannespfau@gmail.com" title="Johannes Pfau <johannespfau@gmail.com>"> <span class="fn">Johannes Pfau</span></a>
</span></b>
<pre>Oh, and back to topic:
<span class="quote">> I am quite open to solutions, other than I don't think 'volatile' as a keyword > would be something reintroduced to the language am afaid.</span >
Yes, that's what I fear as well. But thinking about it volatility is a property
of the memory location and that best maps to a type qualifier. (It's not
exactly the same thing, but we also have this conflation for immutable type /
read only memory and in practice it should work fine).
That's one reason why peek/poke are dangerous, just like the old D1 volatile
statements: If a volatile memory area is typed as a normal pointer you can
still pass it to functions which access it in 'non-volatile' ways.
OTOH one of the biggest problems with volatile in C is that it's not properly
standardized. If we invent GDC/LDC only solutions these will likely be slightly
different causing the same mess as in C/C++ (or even worse, if we don't have a
standard at all). So this is something which would really benefit from being
part of the D standard. Maybe there's some chance we can introduce a new type
qualifier, if not we'll have to do the next best thing, whatever that may be.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>