On 10-May-00 Marcel Moolenaar wrote:
> Mike Smith wrote:
>>
>> Ugh. I don't actually like that, because it serves a valid purpose.
>> What irritates me mostly is just that there is no way of casting a
>> volatile object into a non-volatile type, so you can't implement any sort
>> of conditional volatility exclusion.
>
> You can however use a union and have a non-volatile object aliasing a
> volatile object as in:
>
> union u {
> volatile int vi;
> int nvi;
> };
And you know for a fact that the compiler will generate
the right code. Right? :-)
Even if it did, I feel nervous. What if, in the example
above, the generated code does not clear the structure
on time, as indicated? What about other cases where
references to volatile data are being made?
Thanx for the tip, though...!
>
> --
> Marcel Moolenaar
> mail: [EMAIL PROTECTED] / [EMAIL PROTECTED]
> tel: (408) 447-4222
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
Sincerely Yours
404.664.6401
Simon Shapiro Research Fellow, Earthlink Inc.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message