digitalmars.D.learn - pointer cast from const(Y) to immutable(void*)** is not supported at
- Hakan Aras (4/4) Aug 01 2018 Why does the following work in DMD 2.080 and LDC 1.10, but not in
- Hakan Aras (2/3) Aug 01 2018 Whoops, that was the wrong one. It's fixed now.
- Nicholas Wilson (9/14) Aug 01 2018 https://issues.dlang.org/show_bug.cgi?id=19134
- Hakan Aras (7/15) Aug 01 2018 I wasn't quite sure whether it's a bug since it happens in both
- Nicholas Wilson (6/25) Aug 01 2018 For future reference the only time you should consider LDC/GDC
- kinke (4/5) Aug 02 2018 Totally understandable; that's a regression and needs to be
Why does the following work in DMD 2.080 and LDC 1.10, but not in DMD 2.081 and LDC 1.11 beta: https://run.dlang.io/is/dSVruv And is there a way to enforce the cast like a static_cast in C++?
Aug 01 2018
On Wednesday, 1 August 2018 at 16:25:28 UTC, Hakan Aras wrote:https://run.dlang.io/is/dSVruvWhoops, that was the wrong one. It's fixed now.
Aug 01 2018
On Wednesday, 1 August 2018 at 20:10:44 UTC, Hakan Aras wrote:On Wednesday, 1 August 2018 at 16:25:28 UTC, Hakan Aras wrote:https://issues.dlang.org/show_bug.cgi?id=19134 As a workaround remove static, as that causes y to be initialised at compile time. static here has nothing to do with static_cast in C++. The analogy to a static_cast would be const X x = new Y(); casting up the hierarchy, as opposed to dynamic casting down the hierarchy.https://run.dlang.io/is/dSVruvWhoops, that was the wrong one. It's fixed now.
Aug 01 2018
On Thursday, 2 August 2018 at 01:39:58 UTC, Nicholas Wilson wrote:https://issues.dlang.org/show_bug.cgi?id=19134I wasn't quite sure whether it's a bug since it happens in both compilers. Thanks for opening the issue.As a workaround remove static, as that causes y to be initialised at compile time.I do want it at compiletime though.static here has nothing to do with static_cast in C++. The analogy to a static_cast would be const X x = new Y(); casting up the hierarchy, as opposed to dynamic casting down the hierarchy.Sorry, I actually meant a reinterpret_cast. I always get those mixed up. But now that I look at it again I don't see how that would help me, since my code isn't the one trying to to casting.
Aug 01 2018
On Thursday, 2 August 2018 at 02:13:41 UTC, Hakan Aras wrote:On Thursday, 2 August 2018 at 01:39:58 UTC, Nicholas Wilson wrote:For future reference the only time you should consider LDC/GDC distinct from DMD is codegen, i.e. compiler causes your code to crash. This is a frontend bug so it affects all the major compilers.https://issues.dlang.org/show_bug.cgi?id=19134I wasn't quite sure whether it's a bug since it happens in both compilers. Thanks for opening the issue.Ah, unfortunately you're stuck then.As a workaround remove static, as that causes y to be initialised at compile time.I do want it at compiletime though.static here has nothing to do with static_cast in C++. The analogy to a static_cast would be const X x = new Y(); casting up the hierarchy, as opposed to dynamic casting down the hierarchy.Sorry, I actually meant a reinterpret_cast. I always get those mixed up. But now that I look at it again I don't see how that would help me, since my code isn't the one trying to to casting.
Aug 01 2018
On Thursday, 2 August 2018 at 02:13:41 UTC, Hakan Aras wrote:I do want it at compiletime though.Totally understandable; that's a regression and needs to be fixed. See https://github.com/dlang/dmd/pull/8362#pullrequestreview-142565787.
Aug 02 2018