Re: Union an alias when the difference is the volatile qualifier?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> It's OK to cast a pointer to int to a pointer to volatile int and then
>>> dereference that pointer, but not vice versa.  So, GCC must assume
>>> that a pointer to volatile int may point to a non-volatile int object.
>>> But the reverse is not true: GCC need not assume that a pointer to int
>>> may point to a volatile int.
>>
>> One last question, and then I will be done. Is it OK to do in C++03 and above.
>
> I don't think that there is any difference between C and C++ in this
> regard, nor any intention to change it in later standards.  To break
> compatibility in this way would be catastrophic for a lot of software.

Thanks Andrew. /EOM.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux