projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
[fw/sdcc]
/
src
/
SDCCglue.c
diff --git
a/src/SDCCglue.c
b/src/SDCCglue.c
index 1a4913767ad331b6a58c8b801cf55487f272b63d..222b11d23a0d758c7dcbe9258d140d77a11f3a2d 100644
(file)
--- a/
src/SDCCglue.c
+++ b/
src/SDCCglue.c
@@
-304,7
+304,7
@@
emitRegularMap (memmap * map, bool addPublics, bool arFlag)
ival = initAggregates (sym, sym->ival, NULL);
} else {
if (getNelements(sym->type, sym->ival)>1) {
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)),
sym->name);
}
ival = newNode ('=', newAst_VALUE (symbolVal (sym)),
@@
-351,7
+351,7
@@
emitRegularMap (memmap * map, bool addPublics, bool arFlag)
else {
int size = getSize (sym->type);
if (size==0) {
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) {
}
/* allocate space */
if (options.debug) {
@@
-746,7
+746,7
@@
printIvalStruct (symbol * sym, sym_link * type,
sflds = SPEC_STRUCT (type)->fields;
if (ilist->type != INIT_DEEP) {
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;
}
return;
}
@@
-760,7
+760,7
@@
printIvalStruct (symbol * sym, sym_link * type,
}
}
if (iloop) {
}
}
if (iloop) {
- werrorfl (
filename
, sym->lineDef, W_EXCESS_INITIALIZERS, "struct", sym->name);
+ werrorfl (
sym->fileDef
, sym->lineDef, W_EXCESS_INITIALIZERS, "struct", sym->name);
}
return;
}
}
return;
}
@@
-810,7
+810,7
@@
printIvalArray (symbol * sym, sym_link * type, initList * ilist,
/* by a string */
if (IS_CHAR (type->next)) {
if (!IS_LITERAL(list2val(ilist)->etype)) {
/* 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,
return;
}
if (printIvalChar (type,
@@
-821,7
+821,7
@@
printIvalArray (symbol * sym, sym_link * type, initList * ilist,
/* not the special case */
if (ilist->type != INIT_DEEP)
{
/* 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;
}
return;
}
@@
-830,7
+830,7
@@
printIvalArray (symbol * sym, sym_link * type, initList * ilist,
printIval (sym, type->next, iloop, oFile);
if (++size > DCL_ELEM(type)) {
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;
}
}
break;
}
}
@@
-869,7
+869,7
@@
printIvalFuncPtr (sym_link * type, initList * ilist, FILE * oFile)
if (IS_LITERAL(val->etype)) {
if (compareType(type,val->etype)==0) {
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);
printFromToType (val->type, type);
}
printIvalCharPtr (NULL, type, val, oFile);
@@
-980,7
+980,7
@@
printIvalCharPtr (symbol * sym, sym_link * type, value * val, FILE * oFile)
case 3:
if (IS_GENPTR(type) && floatFromVal(val)!=0) {
// non-zero mcs51 generic pointer
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",
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s\n",
@@
-997,7
+997,7
@@
printIvalCharPtr (symbol * sym, sym_link * type, value * val, FILE * oFile)
case 4:
if (IS_GENPTR(type) && floatFromVal(val)!=0) {
// non-zero ds390 generic pointer
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",
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s,%s\n",
@@
-1055,7
+1055,7
@@
printIvalPtr (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
/* check the type */
if (compareType (type, val->type) == 0) {
/* 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);
}
printFromToType (val->type, type);
}
@@
-1143,7
+1143,7
@@
printIval (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
if (ilist->type!=INIT_NODE) {
// or a 1-element list
if (ilist->init.deep->next) {
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;
sym->name);
} else {
ilist=ilist->init.deep;
@@
-1160,7
+1160,7
@@
printIval (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
IS_PTR(type) && DCL_TYPE(type)==CPOINTER) {
// no sweat
} else {
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);
}
}
printFromToType(itype, type);
}
}
@@
-1259,7
+1259,7
@@
emitStaticSeg (memmap * map, FILE * out)
int size = getSize (sym->type);
if (size==0) {
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 */
}
fprintf (out, "%s:\n", sym->rname);
/* special case for character strings */
@@
-1515,7
+1515,7
@@
emitOverlay (FILE * afile)
int size = getSize(sym->type);
if (size==0) {
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");
}
if (options.debug)
fprintf (afile, "==.\n");