2
0
Эх сурвалжийг харах

* check whether we are explicitly typecasting untypedpointer^ before other
cases (that depend on the sizes of the typecast matching) so that we
can (internally) generate typecasts to open array/array of const

git-svn-id: trunk@29819 -

Jonas Maebe 10 жил өмнө
parent
commit
c764826bb3
1 өөрчлөгдсөн 4 нэмэгдсэн , 4 устгасан
  1. 4 4
      compiler/ncnv.pas

+ 4 - 4
compiler/ncnv.pas

@@ -2392,6 +2392,10 @@ implementation
                                  ((resultdef.typ=enumdef) and
                                   (left.resultdef.typ=objectdef))) or
 {$endif}
+                                (
+                                 is_void(left.resultdef)  and
+                                 (left.nodetype=derefn)
+                                ) or
                                 (
                                  not(is_open_array(left.resultdef)) and
                                  not(is_array_constructor(left.resultdef)) and
@@ -2406,10 +2410,6 @@ implementation
                                    { the softfloat code generates casts <const. float> to record }
                                    (nf_internal in flags)
                                  ))
-                                ) or
-                                (
-                                 is_void(left.resultdef)  and
-                                 (left.nodetype=derefn)
                                 )
                                ) then
                            CGMessage2(type_e_illegal_type_conversion,left.resultdef.typename,resultdef.typename)