}
if (IS_CHAR (type))
return RESULT_TYPE_CHAR;
- if ( IS_INT (type)
- && !IS_LONG (type))
+ if (IS_INT (type) && !IS_LONG (type))
return RESULT_TYPE_INT;
return RESULT_TYPE_OTHER;
}
there is resultType available */
dtr = tree->right;
break;
+ case SIZEOF:
+ /* don't allocate string if it is a sizeof argument */
+ ++noAlloc;
+ dtr = decorateType (tree->right, resultTypeProp);
+ --noAlloc;
+ break;
default:
dtr = decorateType (tree->right, resultTypeProp);
break;
/* change the type to a integer */
{
int size = getSize (tree->right->ftype);
+
SNPRINTF(buffer, sizeof(buffer), "%d", size);
if (!size && !IS_VOID(tree->right->ftype))
werrorfl (tree->filename, tree->lineno, E_SIZEOF_INCOMPLETE_TYPE);
tree->right = tree->left = NULL;
TETYPE (tree) = getSpec (TTYPE (tree) =
tree->opval.val->type);
+
return tree;
/*------------------------------------------------------------------*/
ex = newNode (FUNCTION, ex, body);
ex->values.args = FUNC_ARGS(name->type);
ex->decorated=1;
- if (options.dump_tree) PA(ex);
+ if (options.dump_tree)
+ PA(ex);
if (fatalError)
- {
- werror (E_FUNC_NO_CODE, name->name);
- goto skipall;
- }
+ goto skipall;
/* Do not generate code for inline functions unless extern also */
if (FUNC_ISINLINE (name->type) && !IS_EXTERN (fetype))
name->generated = 1;
if (fatalError)
- {
- werror (E_FUNC_NO_CODE, name->name);
- goto skipall;
- }
+ goto skipall;
eBBlockFromiCode (piCode);