ival = initAggregates (sym, sym->ival, NULL);
} else {
if (getNelements(sym->type, sym->ival)>1) {
- werrorfl (filename, sym->lineDef, W_EXCESS_INITIALIZERS, "scalar",
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "scalar",
sym->name);
}
ival = newNode ('=', newAst_VALUE (symbolVal (sym)),
else {
int size = getSize (sym->type);
if (size==0) {
- werrorfl (filename, sym->lineDef, E_UNKNOWN_SIZE, sym->name);
+ werrorfl (sym->fileDef, sym->lineDef, E_UNKNOWN_SIZE, sym->name);
}
/* allocate space */
if (options.debug) {
sflds = SPEC_STRUCT (type)->fields;
if (ilist->type != INIT_DEEP) {
- werrorfl (filename, sym->lineDef, E_INIT_STRUCT, sym->name);
+ werrorfl (sym->fileDef, sym->lineDef, E_INIT_STRUCT, sym->name);
return;
}
}
}
if (iloop) {
- werrorfl (filename, sym->lineDef, W_EXCESS_INITIALIZERS, "struct", sym->name);
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "struct", sym->name);
}
return;
}
/* by a string */
if (IS_CHAR (type->next)) {
if (!IS_LITERAL(list2val(ilist)->etype)) {
- werrorfl (filename, ilist->lineno, E_CONST_EXPECTED);
+ werrorfl (ilist->filename, ilist->lineno, E_CONST_EXPECTED);
return;
}
if (printIvalChar (type,
/* not the special case */
if (ilist->type != INIT_DEEP)
{
- werrorfl (filename, ilist->lineno, E_INIT_STRUCT, sym->name);
+ werrorfl (ilist->filename, ilist->lineno, E_INIT_STRUCT, sym->name);
return;
}
printIval (sym, type->next, iloop, oFile);
if (++size > DCL_ELEM(type)) {
- werrorfl (filename, sym->lineDef, W_EXCESS_INITIALIZERS, "array", sym->name);
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "array", sym->name);
break;
}
}
if (IS_LITERAL(val->etype)) {
if (compareType(type,val->etype)==0) {
- werrorfl (filename, ilist->lineno, E_INCOMPAT_TYPES);
+ werrorfl (ilist->filename, ilist->lineno, E_INCOMPAT_TYPES);
printFromToType (val->type, type);
}
printIvalCharPtr (NULL, type, val, oFile);
case 3:
if (IS_GENPTR(type) && floatFromVal(val)!=0) {
// non-zero mcs51 generic pointer
- werrorfl (filename, sym->lineDef, E_LITERAL_GENERIC);
+ werrorfl (sym->fileDef, sym->lineDef, E_LITERAL_GENERIC);
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s\n",
case 4:
if (IS_GENPTR(type) && floatFromVal(val)!=0) {
// non-zero ds390 generic pointer
- werrorfl (filename, sym->lineDef, E_LITERAL_GENERIC);
+ werrorfl (sym->fileDef, sym->lineDef, E_LITERAL_GENERIC);
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s,%s\n",
/* check the type */
if (compareType (type, val->type) == 0) {
- werrorfl (filename, ilist->lineno, W_INIT_WRONG);
+ werrorfl (ilist->filename, ilist->lineno, W_INIT_WRONG);
printFromToType (val->type, type);
}
if (ilist->type!=INIT_NODE) {
// or a 1-element list
if (ilist->init.deep->next) {
- werrorfl (filename, sym->lineDef, W_EXCESS_INITIALIZERS, "scalar",
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "scalar",
sym->name);
} else {
ilist=ilist->init.deep;
IS_PTR(type) && DCL_TYPE(type)==CPOINTER) {
// no sweat
} else {
- werrorfl (filename, ilist->lineno, E_TYPE_MISMATCH, "assignment", " ");
+ werrorfl (ilist->filename, ilist->lineno, E_TYPE_MISMATCH, "assignment", " ");
printFromToType(itype, type);
}
}
int size = getSize (sym->type);
if (size==0) {
- werrorfl (filename, sym->lineDef, E_UNKNOWN_SIZE,sym->name);
+ werrorfl (sym->fileDef, sym->lineDef, E_UNKNOWN_SIZE,sym->name);
}
fprintf (out, "%s:\n", sym->rname);
/* special case for character strings */
int size = getSize(sym->type);
if (size==0) {
- werrorfl (filename, sym->lineDef, E_UNKNOWN_SIZE);
+ werrorfl (sym->fileDef, sym->lineDef, E_UNKNOWN_SIZE);
}
if (options.debug)
fprintf (afile, "==.\n");