for (; sym != NULL; sym = sym->next)
{
-
+ changePointer(sym);
/* if already exists in the symbol table then check if
the previous was an extern definition if yes then
then check if the type match, if the types match then
SPEC_SCLS (sym->etype) != S_XSTACK &&
SPEC_SCLS (sym->etype) != S_CONSTANT))
{
-
werror (E_AUTO_ASSUMED, sym->name);
SPEC_SCLS (sym->etype) = S_AUTO;
}
/* if parameter or local variable then change */
/* the storage class to reflect where the var will go */
- if (sym->level && SPEC_SCLS (sym->etype) == S_FIXED)
+ if (sym->level && SPEC_SCLS (sym->etype) == S_FIXED &&
+ !IS_STATIC(sym->etype))
{
if (options.stackAuto || (currFunc && IS_RENT (currFunc->etype)))
{
* control this allcoation, but the code was originally that way, and
* changing it for non-390 ports breaks the compiler badly.
*/
- bool useXdata = IS_DS390_PORT ? options.model : options.useXstack;
+ bool useXdata = TARGET_IS_DS390 ? 1 : options.useXstack;
SPEC_SCLS (sym->etype) = (useXdata ?
S_XDATA : S_FIXED);
}
DCL_TYPE (val->type) = PPOINTER;
break;
case S_FIXED:
- if (IS_DS390_PORT)
+ if (TARGET_IS_DS390)
{
/* The AUTO and REGISTER classes should probably
* also become generic pointers, but I haven't yet
value *val;
int pNum = 1;
-
/* if this function has variable argument list */
/* then make the function a reentrant one */
if (func->hasVargs)
{
/* mark it as a register parameter if
the function does not have VA_ARG
- and as port dictates
- not inhibited by command line option or #pragma */
+ and as port dictates */
if (!func->hasVargs &&
- !options.noregparms &&
- !IS_RENT (func->etype) &&
(*port->reg_parm) (val->type))
{
SPEC_REGPARM (val->etype) = 1;
pNum++;
}
- /* if this function is reentrant or */
- /* automatics r 2b stacked then nothing */
- if (IS_RENT (func->etype) || options.stackAuto)
- return;
+ /* if this is an internal generated function call */
+ if (func->cdef) {
+ /* ignore --stack-auto for this one, we don't know how it is compiled */
+ /* simply trust on --int-long-reent or --float-reent */
+ if (IS_RENT(func->etype)) {
+ return;
+ }
+ } else {
+ /* if this function is reentrant or */
+ /* automatics r 2b stacked then nothing */
+ if (IS_RENT (func->etype) || options.stackAuto)
+ return;
+ }
val = func->args;
pNum = 1;
{
if (IS_DECL (type))
{
+ if (DCL_PTR_VOLATILE(type)) {
+ fprintf (of, "volatile ");
+ }
switch (DCL_TYPE (type))
{
case FUNCTION:
if (DCL_PTR_CONST (type))
fprintf (of, "const ");
break;
-
case ARRAY:
fprintf (of, "array of ");
break;