{
bucket *bp;
- bp = Safe_calloc (1, sizeof (bucket));
+ bp = Safe_alloc ( sizeof (bucket));
return bp;
}
/* the symbols are always added at the head of the list */
i = hashKey (sname);
/* get a free entry */
- bp = Safe_calloc (1, sizeof (bucket));
+ bp = Safe_alloc ( sizeof (bucket));
bp->sym = sym; /* update the symbol pointer */
bp->level = level; /* update the nest level */
{
symbol *sym;
- sym = Safe_calloc (1, sizeof (symbol));
+ sym = Safe_alloc ( sizeof (symbol));
strcpy (sym->name, name); /* copy the name */
sym->level = scope; /* set the level */
{
sym_link *p;
- p = Safe_calloc (1, sizeof (sym_link));
+ p = Safe_alloc ( sizeof (sym_link));
return p;
}
{
structdef *s;
- s = Safe_calloc (1, sizeof (structdef));
+ s = Safe_alloc ( sizeof (structdef));
strcpy (s->tag, tag); /* copy the tag */
return s;
(!IS_LITERAL(type2) && SPEC_USIGN (etype2))) &&
!IS_FLOAT (reType))
SPEC_USIGN (reType) = 1;
+ else
+ SPEC_USIGN (reType) = 0;
/* if result is a literal then make not so */
if (IS_LITERAL (reType))
void
aggregateArgToPointer (value * val)
{
+ int wasArray=IS_ARRAY(val->type);
+
if (IS_AGGREGATE (val->type))
{
/* if this is a structure */
default:
DCL_TYPE (val->type) = GPOINTER;
}
+
+ if (wasArray) {
+ /* there is NO way to specify the storage of the pointer
+ associated with an array, so we make it the default */
+ SPEC_SCLS(val->etype) = S_FIXED;
+ }
/* is there is a symbol associated then */
/* change the type of the symbol as well */
werror (E_PREV_DEF_CONFLICT, csym->name, "_naked");
}
- /* compare expected agrs with actual args */
+ /* compare expected args with actual args */
exargs = csym->args;
acargs = sym->args;