Showing with 0 additions and 34 deletions.
  1. +0 −1 src/magicport.json
  2. +0 −33 src/mtype.c
1 change: 0 additions & 1 deletion src/magicport.json
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,6 @@
[
"variable LOGDOTEXP",
"variable LOGDEFAULTINIT",
"variable IMPLICIT_ARRAY_TO_PTR",
"variable Tsize_t",
"variable Tptrdiff_t",
"function MODimplicitConv",
Expand Down
33 changes: 0 additions & 33 deletions src/mtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
#define LOGDOTEXP 0 // log ::dotExp()
#define LOGDEFAULTINIT 0 // log ::defaultInit()

// Allow implicit conversion of T[] to T* --> Removed in 2.063
#define IMPLICIT_ARRAY_TO_PTR 0

int Tsize_t = Tuns32;
int Tptrdiff_t = Tint32;

Expand Down Expand Up @@ -4170,20 +4167,6 @@ MATCH TypeSArray::implicitConvTo(Type *to)
{
//printf("TypeSArray::implicitConvTo(to = %s) this = %s\n", to->toChars(), toChars());

// Allow implicit conversion of static array to pointer or dynamic array
if (IMPLICIT_ARRAY_TO_PTR && to->ty == Tpointer)
{
TypePointer *tp = (TypePointer *)to;

if (!MODimplicitConv(next->mod, tp->next->mod))
return MATCHnomatch;

if (tp->next->ty == Tvoid || next->constConv(tp->next) > MATCHnomatch)
{
return MATCHconvert;
}
return MATCHnomatch;
}
if (to->ty == Tarray)
{
TypeDArray *ta = (TypeDArray *)to;
Expand Down Expand Up @@ -4451,22 +4434,6 @@ MATCH TypeDArray::implicitConvTo(Type *to)
if (equals(to))
return MATCHexact;

// Allow implicit conversion of array to pointer
if (IMPLICIT_ARRAY_TO_PTR && to->ty == Tpointer)
{
TypePointer *tp = (TypePointer *)to;

/* Allow conversion to void*
*/
if (tp->next->ty == Tvoid &&
MODimplicitConv(next->mod, tp->next->mod))
{
return MATCHconvert;
}

return next->constConv(tp->next) ? MATCHconvert : MATCHnomatch;
}

if (to->ty == Tarray)
{
TypeDArray *ta = (TypeDArray *)to;
Expand Down