I can't find anywhere in the spec where it's clarified what can be used as a global/static initializer (only some special cases, like static struct initializers) for example it's valid to initialize a global with the address of a function, statically. however, for example, it's not allowed to cast this function pointer to an integer even though there's no technical reason this should not be allowed.
Casting a pointer to an int may require halving its size, and the object file format often does not support that.
Commit pushed to https://github.com/D-Programming-Language/d-programming-language.org https://github.com/D-Programming-Language/d-programming-language.org/commit/a23ff9898ceb21a5d6d861f7b884120f529fe631 fix Issue 2382 - spec is not clear on what is allowed as global/static initializers
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル