const volatile
Kalamatee
kalamatee@gmail.com
Wed Sep 26 13:06:00 GMT 2018
Hi
I am wondering if there is a reason globals marked const volatile are put
into the data section and not read-only as const should imply?
I am trying to compile code for m68k AmigaOS which is resident using the
mathlib functions which need certain constants as volatile to prevent
incorrect sequence re-ordering in gcc's optimizations - however doing so
puts the value in bss data without const.
How can we have a global that is both volatile (to prevent incorrect
sequencing) and const (so it is read only and stored in read only data
section) ?
Thanks for any insight that may be provided.
More information about the Gcc-help
mailing list