The address of dllimport variables isn't something that can be
meaningfully used in a constexpr context and isn't suitable for
evaluation at load-time. They require loads from memory to properly
evaluate.
This fixes PR19955.
Differential D4250
AST: Address of dllimport variables isn't constant majnemer on Jun 23 2014, 12:05 AM. Authored by
Details The address of dllimport variables isn't something that can be This fixes PR19955.
Diff Detail Event TimelineComment Actions Can you add a sema test for 'extern int __declspec(dllimport) y; constexpr int *x = &y;'?
Comment Actions Sure, I'll add a SemaCXX test for that.
|
How is ZeroInitialization(E) different from Error(E)?