egcs-2.91.55 19980824 error on const references

Joe Buck jbuck@Synopsys.COM
Wed Aug 26 09:38:00 GMT 1998


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



More information about the Gcc-bugs mailing list