191 |
{ |
{ |
192 |
CSSemValue value; |
CSSemValue value; |
193 |
|
|
|
/* Print an error or warning for this construct if necessary */ |
|
|
CCUnsafeMessage(info, (ILNode *)node, "unsafe `sizeof' operator"); |
|
|
|
|
194 |
/* Get the semantic value for the sub-expression */ |
/* Get the semantic value for the sub-expression */ |
195 |
value = ILNode_SemAnalysis(node->expr, info, &(node->expr)); |
value = ILNode_SemAnalysis(node->expr, info, &(node->expr)); |
196 |
|
|
197 |
|
/* sizeof(primitive) is safe in C# 2.0 */ |
198 |
|
if(!ILType_IsPrimitive(CSSemGetType(value))) |
199 |
|
{ |
200 |
|
/* Print an error or warning for this construct if necessary */ |
201 |
|
CCUnsafeMessage(info, (ILNode *)node, "unsafe `sizeof' operator"); |
202 |
|
} |
203 |
|
|
204 |
/* Convert native types into their value type forms */ |
/* Convert native types into their value type forms */ |
205 |
if(CSSemIsType(value)) |
if(CSSemIsType(value)) |
206 |
{ |
{ |