This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-2.91.55 19980824 error on const references



> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]