|
@@ -1037,11 +1037,13 @@ implementation
|
|
{ its right field is nil }
|
|
{ its right field is nil }
|
|
sourcepara.right := sizepara;
|
|
sourcepara.right := sizepara;
|
|
|
|
|
|
- { create the call and assign the result to dest }
|
|
|
|
- { (val helpers are functions) }
|
|
|
|
- { the assignment will take care of rangechecking }
|
|
|
|
|
|
+ { create the call and assign the result to dest (val helpers are functions).
|
|
|
|
+ Use a trick to prevent a type size mismatch warning to be generated by the
|
|
|
|
+ assignment node. First convert implicitly to the resulttype. This will insert
|
|
|
|
+ the range check. The Second conversion is done explicitly to hide the implicit conversion
|
|
|
|
+ for the assignment node and therefor preventing the warning (PFV) }
|
|
addstatement(newstatement,cassignmentnode.create(
|
|
addstatement(newstatement,cassignmentnode.create(
|
|
- destpara.left,ccallnode.createintern(procname,newparas)));
|
|
|
|
|
|
+ destpara.left,ctypeconvnode.create_internal(ctypeconvnode.create(ccallnode.createintern(procname,newparas),destpara.left.resulttype),destpara.left.resulttype)));
|
|
|
|
|
|
{ dispose of the enclosing paranode of the destination }
|
|
{ dispose of the enclosing paranode of the destination }
|
|
destpara.left := nil;
|
|
destpara.left := nil;
|