-
-
Notifications
You must be signed in to change notification settings - Fork 16k
All intrinsics are callable in const fn #61495
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-intrinsicsArea: IntrinsicsArea: IntrinsicsC-bugCategory: This is a bug.Category: This is a bug.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-intrinsicsArea: IntrinsicsArea: IntrinsicsC-bugCategory: This is a bug.Category: This is a bug.
At some point we lost the check making sure that in const context (
const/staticitems,const fn), you can only call a select few whitelisted intrinsics. Instead, you can now call all of them.The issue is that the check happening here does not complain when there is an intrinsic in const context (unlike the checks here that complain about other kinds of function calls in const context).
Cc @oli-obk @eddyb