[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.31,1.32
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_oper.tc,1.31,1.32 |
Date: |
Wed, 02 Jul 2003 22:01:53 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/c
In directory subversions:/tmp/cvs-serv27204/cscc/c
Modified Files:
c_oper.tc
Log Message:
ILNode_Conditional: handle function pointers as arguments to "?:".
Index: c_oper.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_oper.tc,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** c_oper.tc 28 Jun 2003 05:42:18 -0000 1.31
--- c_oper.tc 3 Jul 2003 02:01:51 -0000 1.32
***************
*** 2082,2093 ****
--- 2082,2105 ----
return type1;
}
+ else if(CTypeIsFunctionPtr(type1) && CTypeIsFunctionPtr(type2))
+ {
+ return type1;
+ }
else if(CTypeIsPointer(type1) && IsIntegerMachineType(mtype2))
{
return type1;
}
+ else if(CTypeIsFunctionPtr(type1) && IsIntegerMachineType(mtype2))
+ {
+ return type1;
+ }
else if(CTypeIsPointer(type2) && IsIntegerMachineType(mtype1))
{
return type2;
}
+ else if(CTypeIsFunctionPtr(type2) && IsIntegerMachineType(mtype1))
+ {
+ return type2;
+ }
/* The types must be identical (e.g. for struct and union types) */
***************
*** 2122,2125 ****
--- 2134,2149 ----
{
goto error;
+ }
+
+ /* Convert function references into function pointers */
+ if(CTypeIsFunction(CSemGetType(value1)) &&
+ yyisa(node->expr2, ILNode_FunctionRef))
+ {
+ CSemSetRValue(value1, CTypeAddFunctionPtr(info,
CSemGetType(value1)));
+ }
+ if(CTypeIsFunction(CSemGetType(value2)) &&
+ yyisa(node->expr3, ILNode_FunctionRef))
+ {
+ CSemSetRValue(value2, CTypeAddFunctionPtr(info,
CSemGetType(value2)));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/c c_oper.tc,1.31,1.32,
Rhys Weatherley <address@hidden> <=