dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnet/cscc/csharp cs_misc.tc,1.14,1.15


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnet/cscc/csharp cs_misc.tc,1.14,1.15
Date: Wed, 26 Nov 2003 01:17:20 +0000

Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv10628/cscc/csharp

Modified Files:
        cs_misc.tc 
Log Message:


ILNode_NewExpression: report an error if "float[]" or "double[]" is used
in a profile that does not have the floating-point classes in the
runtime library.


Index: cs_misc.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_misc.tc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** cs_misc.tc  26 Feb 2003 12:02:47 -0000      1.14
--- cs_misc.tc  26 Nov 2003 01:17:18 -0000      1.15
***************
*** 318,321 ****
--- 318,322 ----
        int numDimensions = 0;
        int dim;
+       ILType *elemType;
  
        /* Determine if the array creation is normal or initializer-based */
***************
*** 419,422 ****
--- 420,435 ----
                        return value;
                }
+       }
+ 
+       /* Check that the element type has a class form associated with it.
+          If we are compiling in a "no floating point" profile, the
+          "System.Single" and "System.Double" classes won't exist, which
+          will lead to problems during the code generation phase */
+       elemType = ILTypeGetElemType(node->arrayType);
+       if(!ILTypeToClass(info, elemType))
+       {
+               CCErrorOnLine(yygetfilename(node->type), 
yygetlinenum(node->type),
+                                         "array of `%s' used in a profile that 
cannot support it",
+                                         CSTypeToName(elemType));
        }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]