This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-2.91.55 19980824 error on const references
- To: tv at pobox dot com (Todd Vierling)
- Subject: Re: egcs-2.91.55 19980824 error on const references
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Wed, 26 Aug 98 8:24:50 PDT
- Cc: hymie at prolifics dot com, egcs at cygnus dot com, egcs-bugs at cygnus dot com
> What is the defined behavior with "volatile const"? Is it defined as the
> same as "volatile"--that is, no const behavior at all?
No. Since it is const, it may not be modified by the user code. Since
it is volatile, it may be changed by "something else". Think of a
hardware register that can be read from but not written to.
It seems that there isn't a way to declare that an object is write-only,
but calling it volatile and never reading it from code is as close as
you can get.