[PATCH] D131012: No longer place const volatile global variables in a read only section

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 11:57:23 PDT 2022


rjmccall added a comment.

On the one hand, we can certainly just have different behavior on BPF targets if this is a common expectation there.

On the other hand, if there isn't a requirement to put `const volatile` objects in writable memory, then I'd rather not.  If someone has specific expectations about the section a symbol ends up in that don't match the standard interpretation in the language, they really ought to enforce their expectations with a section attribute.  The use case of volatile memory-mapped I/O needs something like that anyway (or something even worse).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131012/new/

https://reviews.llvm.org/D131012



More information about the cfe-commits mailing list