From d904ffd42e0b20ffd6a1a9755fdade3f7665fd80 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 24 Sep 2008 11:17:37 +0100 Subject: [PATCH] Allow implicit conversion "foo*?" to "void*" For some reason, Tango's Layout template needs this on i686. --- dmd/mtype.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dmd/mtype.c b/dmd/mtype.c index b59da98..2af69b4 100644 --- a/dmd/mtype.c +++ b/dmd/mtype.c @@ -2573,6 +2573,13 @@ MATCH TypeMaybe::implicitConvTo(Type *to) // Deny (Subclass?) -> (ParentClass) // (Subclass) -> (ParentClass?) handled in TypeClass + // Can always convert Foo*? to void* + if (to->ty == Tpointer && to->next) + { + if (to->next->ty == Tvoid) + return MATCHconvert; + } + return MATCHnomatch; } -- 2.11.4.GIT