Allow const fn pointers to arbitrary memory address #117250
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
I'm developing a library for embedded environment. The microcontroller I'm working with features ROM filled with preflashed code.
I'd like to create a listing of the functions there, similarly to what the C library does, and put them as
const
s. This is arguably not UB at all, because it's absolutely certain that such functions exist at given addresses.Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: