[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_oper.tc,1.27,1.28
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_oper.tc,1.27,1.28 |
Date: |
Wed, 25 Jun 2003 05:39:00 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/c
In directory subversions:/tmp/cvs-serv9177/cscc/c
Modified Files:
c_oper.tc
Log Message:
ILNode_CastType: it is always possible to cast to "void" in C.
Index: c_oper.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_oper.tc,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** c_oper.tc 25 Jun 2003 09:29:46 -0000 1.27
--- c_oper.tc 25 Jun 2003 09:38:58 -0000 1.28
***************
*** 2052,2057 ****
value = ILNode_CSemAnalysis(node->expr, info, &(node->expr), stmtLevel);
! /* Bail out if not an r-value */
! if(!CSemIsRValue(value))
{
if(!CSemIsError(value))
--- 2052,2058 ----
value = ILNode_CSemAnalysis(node->expr, info, &(node->expr), stmtLevel);
! /* Bail out if not an r-value or a "void"-to-"void" cast */
! if(!CSemIsRValue(value) &&
! (!CSemIsVoid(value) || node->type != ILType_Void))
{
if(!CSemIsError(value))
***************
*** 2062,2065 ****
--- 2063,2073 ----
CSemSetRValue(value, node->type);
return value;
+ }
+
+ /* It is always possible to cast to "void" */
+ if(node->type == ILType_Void)
+ {
+ *parent = node->expr;
+ return CSemValueDefault;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/c c_oper.tc,1.27,1.28,
Rhys Weatherley <address@hidden> <=