/[ascend]/trunk/base/generic/compiler/typedef.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/typedef.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 169 by johnpye, Mon Dec 19 06:12:40 2005 UTC revision 170 by johnpye, Fri Jan 6 08:55:06 2006 UTC
# Line 2396  enum typelinterr DeriveRefinedTypes(stru Line 2396  enum typelinterr DeriveRefinedTypes(stru
2396                  "%sRefinement can only be done on array elements.\n",                  "%sRefinement can only be done on array elements.\n",
2397                  StatioLabel(3));                  StatioLabel(3));
2398              }              }
2399              FPRINTF(ASCERR,"%sIncompatible type (%s) of LHS name: ",              error_reporter_start(ASC_USER_ERROR,NULL,0);
2400                StatioLabel(3),              FPRINTF(ASCERR,"Incompatible type (%s) of LHS name: ",
2401                (d!=NULL)?SCP(GetName(d)):"UNDEFINED");                (d!=NULL)?SCP(GetName(d)):"UNDEFINED");
2402              WriteName(ASCERR,n);              WriteName(ASCERR,n);
2403              FPRINTF(ASCERR,"\n");              FPRINTF(ASCERR,"\n");
2404              error_code = DEF_ILLEGAL_REFINE;              error_code = DEF_ILLEGAL_REFINE;
2405              TypeLintError(ASCERR,s, error_code);              TypeLintError(ASCERR,s, error_code);
2406                error_reporter_end_flush();
2407    
2408              if (!g_drt_depth) {              if (!g_drt_depth) {
2409                ClearForInfo(forinfo);                ClearForInfo(forinfo);
2410              }              }
# Line 3687  enum typelinterr AddRLE(struct gl_list_t Line 3689  enum typelinterr AddRLE(struct gl_list_t
3689      /* in typelint we ensured that vl will be length 1 */      /* in typelint we ensured that vl will be length 1 */
3690      rle = CREATERLE;      rle = CREATERLE;
3691      if (rle==NULL) {      if (rle==NULL) {
3692        FPRINTF(ASCERR,"%s%s (%d) Insufficient memory error.\n",        error_reporter(ASC_PROG_FATAL,__FILE__,__LINE__,"Out of memory error");
         StatioLabel(4),__FILE__,__LINE__);  
3693        return DEF_ILLEGAL;        return DEF_ILLEGAL;
3694      }      }
3695      rle->assigned = 0;      rle->assigned = 0;
# Line 3707  enum typelinterr AddRLE(struct gl_list_t Line 3708  enum typelinterr AddRLE(struct gl_list_t
3708      while (vl != NULL) {      while (vl != NULL) {
3709        rle = CREATERLE;        rle = CREATERLE;
3710        if (rle==NULL) {        if (rle==NULL) {
3711          FPRINTF(ASCERR,"%s%s (%d) Insufficient memory error.\n",          error_reporter(ASC_PROG_FATAL,__FILE__,__LINE__,"Out of memory error");
           StatioLabel(4),__FILE__,__LINE__);  
3712          return DEF_ILLEGAL;          return DEF_ILLEGAL;
3713        }        }
3714        rle->assigned = -2; /* or more to the point, we don't care. */        rle->assigned = -2; /* or more to the point, we don't care. */
# Line 3763  enum typelinterr CheckParameterSubscript Line 3763  enum typelinterr CheckParameterSubscript
3763      /* n will be a set expression sort of name */      /* n will be a set expression sort of name */
3764      s = NameSetPtr(n);      s = NameSetPtr(n);
3765      if (SetNamesInLCL(s)==0) {      if (SetNamesInLCL(s)==0) {
3766        FPRINTF(ASCERR,"%sUndefined subscript: [",StatioLabel(3));        error_reporter_start(ASC_USER_ERROR,NULL,0);
3767          FPRINTF(ASCERR,"Undefined subscript: [");
3768        WriteSet(ASCERR,s);        WriteSet(ASCERR,s);
3769        FPRINTF(ASCERR,"]\n");        FPRINTF(ASCERR,"]\n");
3770          error_reporter_end_flush();
3771        return DEF_NAME_MISSING;        return DEF_NAME_MISSING;
3772      }      }
3773      n = NextName(n);      n = NextName(n);
# Line 3830  enum typelinterr DoParamName(CONST struc Line 3832  enum typelinterr DoParamName(CONST struc
3832      ok = AddLCL( name,type,isarray, stat, STATPARAMETRIC );      ok = AddLCL( name,type,isarray, stat, STATPARAMETRIC );
3833      if (ok < 1) {      if (ok < 1) {
3834        if (ok==0) {        if (ok==0) {
3835          FPRINTF(ASCERR,"%sParameter \"%s\" redeclared.",StatioLabel(3),          error_reporter_start(ASC_USER_ERROR,NULL,0);
3836                   SCP(name));          FPRINTF(ASCERR,"Parameter \"%s\" redeclared.",SCP(name));
3837          assert(g_lcl_pivot!=NULL);          assert(g_lcl_pivot!=NULL);
3838          if (g_lcl_pivot->e.statement != stat ) {          if (g_lcl_pivot->e.statement != stat ) {
3839            WSEM(ASCERR,g_lcl_pivot->e.statement,"  First seen:");            WSEM(ASCERR,g_lcl_pivot->e.statement,"  First seen:");
         } else {  
           FPRINTF(ASCERR,"\n");  
3840          }          }
3841            error_reporter_end_flush();
3842    
3843          return DEF_NAME_DUPLICATE;          return DEF_NAME_DUPLICATE;
3844        } else {        } else {
3845          FPRINTF(ASCERR,"%sInsufficient memory during parameter parse.\n",          error_reporter(ASC_PROG_FATAL,NULL,0,"Insufficient memory during parameter parse.");
           StatioLabel(4));  
3846          return DEF_ILLEGAL; /* well, having insufficient memory is illegal */          return DEF_ILLEGAL; /* well, having insufficient memory is illegal */
3847        }        }
3848      }      }
3849      if (isarray && checksubs == CHECKSUBS) {      if (isarray && checksubs == CHECKSUBS) {
3850        if (CheckParameterSubscripts(nptr) != DEF_OKAY) {        if (CheckParameterSubscripts(nptr) != DEF_OKAY) {
3851          FPRINTF(ASCERR,"%sArray parameter \"%s\" uses undefined subscript.\n",          error_reporter(ASC_USER_ERROR,NULL,0,"Array parameter '%s' uses undefined "
3852                  StatioLabel(3),SCP(name));              "subscript. Subscript must be defined by constant leading parameters."
3853          FPRINTF(ASCERR,              ,SCP(name)
3854            "  Subscript must be defined by constant leading parameters.\n");          );
3855          return DEF_NAME_INCORRECT;          return DEF_NAME_INCORRECT;
3856        }        }
3857      }      }
3858    } else{    } else{
3859      FPRINTF(ASCERR,"%sBad name structure found in parameter list.\n",      error_reporter(ASC_USER_ERROR,NULL,0,"Bad name structure found in parameter list.");
       StatioLabel(3));  
3860      return DEF_NAME_INCORRECT;      return DEF_NAME_INCORRECT;
3861    }    }
3862    return DEF_OKAY;    return DEF_OKAY;
# Line 4123  enum typelinterr ExtractRLEs(CONST struc Line 4123  enum typelinterr ExtractRLEs(CONST struc
4123        break;        break;
4124      case WILLBE:      case WILLBE:
4125        if (absorbed != 0) {        if (absorbed != 0) {
4126          FPRINTF(ASCERR,"%sIncorrect WILL_BE found in absorbed list.\n",          error_reporter(ASC_USER_ERROR,NULL,0,"Incorrect WILL_BE found in absorbed list.");
           StatioLabel(3));  
4127          *errloc = c;          *errloc = c;
4128          return DEF_STAT_MISLOCATED;          return DEF_STAT_MISLOCATED;
4129        }        }
# Line 4136  enum typelinterr ExtractRLEs(CONST struc Line 4135  enum typelinterr ExtractRLEs(CONST struc
4135        break;        break;
4136      case CASGN:      case CASGN:
4137        if (absorbed == 0) {        if (absorbed == 0) {
4138          FPRINTF(ASCERR,"%sIncorrect assignment found in parameter list.\n",          error_reporter(ASC_USER_ERROR,NULL,0,"Incorrect assignment found in parameter list.");
           StatioLabel(3));  
4139          *errloc = c;          *errloc = c;
4140          return DEF_STAT_MISLOCATED;          return DEF_STAT_MISLOCATED;
4141        }        }
# Line 4151  enum typelinterr ExtractRLEs(CONST struc Line 4149  enum typelinterr ExtractRLEs(CONST struc
4149        rle->assigned = 1;        rle->assigned = 1;
4150        break;        break;
4151      default: /* should be impossible due to TypedefIllegal functions */      default: /* should be impossible due to TypedefIllegal functions */
4152        FPRINTF(ASCERR,"%sIncorrect statement found in %s list.\n",        error_reporter_start(ASC_PROG_FATAL,NULL,0);
4153                StatioLabel(4),        FPRINTF(ASCERR,"Incorrect statement found in %s list.\n",
4154                (absorbed != 0) ? "absorbed" : "parameter");                (absorbed != 0) ? "absorbed" : "parameter");
4155        TypeLintError(ASCERR,s,DEF_STAT_MISLOCATED);        TypeLintError(ASCERR,s,DEF_STAT_MISLOCATED);
4156          error_reporter_end_flush();
4157    
4158        Asc_Panic(2, NULL, "%sIncorrect statement found in %s list.\n",        Asc_Panic(2, NULL, "%sIncorrect statement found in %s list.\n",
4159                  StatioLabel(4),                  StatioLabel(4),
4160                  (absorbed != 0) ? "absorbed" : "parameter");                  (absorbed != 0) ? "absorbed" : "parameter");
# Line 4180  int FindAssignedStatement(struct gl_list Line 4180  int FindAssignedStatement(struct gl_list
4180    test.olddeclstat = s;    test.olddeclstat = s;
4181    pos = gl_search(nspace,&test,(CmpFunc)CmpRLEStat);    pos = gl_search(nspace,&test,(CmpFunc)CmpRLEStat);
4182    if (pos==0) {    if (pos==0) {
4183      FPRINTF(ASCERR,"%sFindAssignedStatement called with unknown stat:\n",      error_reporter_start(ASC_PROG_FATAL,NULL,0);
4184              StatioLabel(4));      FPRINTF(ASCERR,"FindAssignedStatement called with unknown stat: ");
4185      WriteStatement(ASCERR,s,2);      WriteStatement(ASCERR,s,2);
4186        error_reporter_end_flush();
4187    
4188      Asc_Panic(2, NULL, "%sFindAssignedStatement called with unknown stat:\n",      Asc_Panic(2, NULL, "%sFindAssignedStatement called with unknown stat:\n",
4189                StatioLabel(4));                StatioLabel(4));
4190    }    }
# Line 4414  enum typelinterr MatchModelParameters(sy Line 4416  enum typelinterr MatchModelParameters(sy
4416    newlen = StatementListLength(psl);    newlen = StatementListLength(psl);
4417    oldlen = StatementListLength(pslbase);    oldlen = StatementListLength(pslbase);
4418    if (newlen < oldlen) {    if (newlen < oldlen) {
4419      FPRINTF(ASCERR,"%sParameter list mismatch with %s.\n",      error_reporter_start(ASC_USER_ERROR,NULL,0);
4420        StatioLabel(3),SCP(refname));      FPRINTF(ASCERR,"Parameter list mismatch with '%s': missing declarations in\n  ",
4421      FPRINTF(ASCERR,"  %s is missing declarations:\n",SCP(name));        SCP(refname));
4422      for (diff = 1; diff <=oldlen; diff++) {      for (diff = 1; diff <=oldlen; diff++) {
4423        if (psl==NULL || gl_search(GetList(psl),        if (psl==NULL || gl_search(GetList(psl),
4424                      GetStatement(pslbase,diff),                      GetStatement(pslbase,diff),
# Line 4428  enum typelinterr MatchModelParameters(sy Line 4430  enum typelinterr MatchModelParameters(sy
4430        }        }
4431      }      }
4432      if (firsterr!=NULL && StatementType(firsterr)==ISA) {      if (firsterr!=NULL && StatementType(firsterr)==ISA) {
4433        FPRINTF(ASCERR,        FPRINTF(ASCERR,"The first missing declaration is an IS_A;"
4434                "  The first missing declaration is an IS_A; it may be\n");          "it may be that you forgot some :== in the REFINES() list.");
4435        FPRINTF(ASCERR,"  that you forgot some :== in the REFINES() list.\n");      }
4436      }      error_reporter_end_flush();
4437      FPRINTF(ASCERR,"  Hint:\n  %s  %s  %s  %s  %s  %s  %s",      
4438        "Parameter definitions in a refining MODEL must match in order\n",      error_reporter(ASC_PROG_NOTE,NULL,0,"HINT:\n"
4439        "the parameters of the MODEL being refined. The type of a parameter\n",        "Parameter definitions in a refining MODEL must match in order\n"
4440        "in the new MODEL may be more refined than the corresponding\n",        "the parameters of the MODEL being refined. The type of a parameter\n"
4441        "parameter in the old MODEL.\n",        "in the new MODEL may be more refined than the corresponding\n"
4442        "An IS_A statement in the old MODEL whose variable is assigned\n",        "parameter in the old MODEL.\n"
4443        "in the REFINES() clause of the new MODEL must not be repeated\n",        "An IS_A statement in the old MODEL whose variable is assigned\n"
4444        "in the parameter list of the new MODEL.\n\n");        "in the REFINES() clause of the new MODEL must not be repeated\n"
4445          "in the parameter list of the new MODEL.");
4446      return DEF_ILLEGAL_PARAM;      return DEF_ILLEGAL_PARAM;
4447    }    }
4448    if (newlen==0) return DEF_OKAY; /* no parameters for either */    if (newlen==0) return DEF_OKAY; /* no parameters for either */
4449    c = CompareISLists(pslbase,psl,&diff);    c = CompareISLists(pslbase,psl,&diff);
4450    if (c != 0 && diff <= oldlen) {    if (c != 0 && diff <= oldlen) {
4451      FPRINTF(ASCERR,"%sParameter %lu mismatch between %s and %s.\n",      error_reporter_start(ASC_USER_ERROR,NULL,0);
4452        StatioLabel(3),diff,SCP(name),SCP(refname));      FPRINTF(ASCERR,"Parameter %lu mismatch between %s and %s.\n",diff,SCP(name),SCP(refname));
4453      stat = (CONST struct Statement *)gl_fetch(GetList(psl),diff);      stat = (CONST struct Statement *)gl_fetch(GetList(psl),diff);
4454      WriteStatement(ASCERR,stat,2);      WriteStatement(ASCERR,stat,2);
4455      FPRINTF(ASCERR,"  Must match:\n");      FPRINTF(ASCERR,"  Must match:\n");
4456      stat = (CONST struct Statement *)gl_fetch(GetList(pslbase),diff);      stat = (CONST struct Statement *)gl_fetch(GetList(pslbase),diff);
4457      WriteStatement(ASCERR,stat,2);      WriteStatement(ASCERR,stat,2);
4458        error_reporter_end_flush();
4459      return DEF_ILLEGAL_PARAM;      return DEF_ILLEGAL_PARAM;
4460    }    }
4461    return DEF_OKAY;    return DEF_OKAY;
# Line 4476  enum typelinterr MatchParameterWheres(sy Line 4480  enum typelinterr MatchParameterWheres(sy
4480    newlen = StatementListLength(wsl);    newlen = StatementListLength(wsl);
4481    oldlen = StatementListLength(wslbase);    oldlen = StatementListLength(wslbase);
4482    if (newlen < oldlen) {    if (newlen < oldlen) {
4483      FPRINTF(ASCERR,"%sWHERE list mismatch with %s.\n",      error_reporter_start(ASC_USER_ERROR,NULL,0);
4484              StatioLabel(3),SCP(refname));      FPRINTF(ASCERR,"WHERE list mismatch with %s.\n",SCP(refname));
4485      FPRINTF(ASCERR,"  %s is missing declarations:\n",SCP(name));      FPRINTF(ASCERR,"  %s is missing declarations:\n",SCP(name));
4486      for (diff = 1; diff <=oldlen; diff++) {      for (diff = 1; diff <=oldlen; diff++) {
4487        if (wsl==NULL || gl_search(GetList(wsl),        if (wsl==NULL || gl_search(GetList(wsl),
# Line 4486  enum typelinterr MatchParameterWheres(sy Line 4490  enum typelinterr MatchParameterWheres(sy
4490          WriteStatement(ASCERR,GetStatement(wslbase,diff),2);          WriteStatement(ASCERR,GetStatement(wslbase,diff),2);
4491        }        }
4492      }      }
4493        error_reporter_end_flush();
4494      return DEF_ILLEGAL_PARAM;      return DEF_ILLEGAL_PARAM;
4495    }    }
4496    if (newlen==0) return DEF_OKAY; /* no parameters for either */    if (newlen==0) return DEF_OKAY; /* no parameters for either */
4497    c = CompareISLists(wslbase,wsl,&diff);    c = CompareISLists(wslbase,wsl,&diff);
4498    if (c != 0 && diff <= oldlen) {    if (c != 0 && diff <= oldlen) {
4499      FPRINTF(ASCERR,"%sWHERE statement %lu mismatch between %s and %s.\n",      error_reporter_start(ASC_USER_ERROR,NULL,0);
4500        StatioLabel(3),diff,SCP(name),SCP(refname));      FPRINTF(ASCERR,"WHERE statement %lu mismatch between %s and %s.\n",
4501            diff,SCP(name),SCP(refname));
4502      stat = (CONST struct Statement *)gl_fetch(GetList(wsl),diff);      stat = (CONST struct Statement *)gl_fetch(GetList(wsl),diff);
4503      WriteStatement(ASCERR,stat,2);      WriteStatement(ASCERR,stat,2);
4504      FPRINTF(ASCERR,"  Must match:\n");      FPRINTF(ASCERR,"  Must match:\n");
4505      stat = (CONST struct Statement *)gl_fetch(GetList(wslbase),diff);      stat = (CONST struct Statement *)gl_fetch(GetList(wslbase),diff);
4506      WriteStatement(ASCERR,stat,2);      WriteStatement(ASCERR,stat,2);
4507        error_reporter_end_flush();
4508      return DEF_ILLEGAL_PARAM;      return DEF_ILLEGAL_PARAM;
4509    }    }
4510    return DEF_OKAY;    return DEF_OKAY;
# Line 4777  struct TypeDescription *CreateModelTypeD Line 4784  struct TypeDescription *CreateModelTypeD
4784    } else {    } else {
4785      rdesc=FindType(refines);      rdesc=FindType(refines);
4786      if (rdesc==NULL) {      if (rdesc==NULL) {
4787        FPRINTF(ASCERR,"%sUnable to locate type %s for %s's type definition.\n",        error_reporter_start(ASC_USER_ERROR,NULL,0);
4788                StatioLabel(3),SCP(refines),SCP(name));        FPRINTF(ASCERR,"Unable to locate type %s for %s's type definition.\n",
4789                  SCP(refines),SCP(name));
4790        DestroyTypeDefArgs(sl,pl,psl,rsl,NULL,wsl);        DestroyTypeDefArgs(sl,pl,psl,rsl,NULL,wsl);
4791          error_reporter_end_flush();
4792        return NULL;        return NULL;
4793      }      }
4794      if (GetBaseType(rdesc) != model_type){      if (GetBaseType(rdesc) != model_type){
4795        FPRINTF(ASCERR,"%sModel %s attempts to refine non-MODEL type %s.\n",        error_reporter_start(ASC_USER_ERROR,NULL,0);
4796                StatioLabel(3),SCP(name),SCP(refines));        FPRINTF(ASCERR,"Model %s attempts to refine non-MODEL type %s.\n",
4797                  SCP(name),SCP(refines));
4798        DestroyTypeDefArgs(sl,pl,psl,rsl,NULL,wsl);        DestroyTypeDefArgs(sl,pl,psl,rsl,NULL,wsl);
4799          error_reporter_end_flush();
4800        return NULL;        return NULL;
4801      }      }
4802    
# Line 4814  struct TypeDescription *CreateModelTypeD Line 4825  struct TypeDescription *CreateModelTypeD
4825        /* no parameters in rdesc. */        /* no parameters in rdesc. */
4826        if (StatementListLength(rsl) != 0L) {        if (StatementListLength(rsl) != 0L) {
4827          /* error. can't reduce what ain't there */          /* error. can't reduce what ain't there */
4828          FPRINTF(ASCERR,"%sModel %s attempts to reduce non-parameters in %s.\n",          error_reporter_start(ASC_USER_ERROR,NULL,0);
4829            StatioLabel(3),SCP(name),SCP(refines));          FPRINTF(ASCERR,"Model %s attempts to reduce non-parameters in %s.\n",
4830              SCP(name),SCP(refines));
4831          WriteStatementList(ASCERR,rsl,4);          WriteStatementList(ASCERR,rsl,4);
4832            error_reporter_end_flush();
4833          DestroyTypeDefArgs(sl,pl,psl,rsl,NULL,wsl);          DestroyTypeDefArgs(sl,pl,psl,rsl,NULL,wsl);
4834          return NULL;          return NULL;
4835        }        }
# Line 4829  struct TypeDescription *CreateModelTypeD Line 4842  struct TypeDescription *CreateModelTypeD
4842                                     EmptyStatementList());                                     EmptyStatementList());
4843          if (ParametricChildList(name,tsl,NOCHECKSUBS) != DEF_OKAY) {          if (ParametricChildList(name,tsl,NOCHECKSUBS) != DEF_OKAY) {
4844            /* contents of tsl have been checked already */            /* contents of tsl have been checked already */
4845            FPRINTF(ASCERR,"%sModel %s victim of bizarre error 1.\n",            error_reporter(ASC_USER_ERROR,NULL,0,"Model %s victim of bizarre error 1.",
4846              StatioLabel(3),SCP(name));                  SCP(name));
4847            DestroyTypeDefArgs(sl,pl,psl,rsl,tsl,wsl);            DestroyTypeDefArgs(sl,pl,psl,rsl,tsl,wsl);
4848          }          }
4849        }        }
# Line 4867  struct TypeDescription *CreateModelTypeD Line 4880  struct TypeDescription *CreateModelTypeD
4880         */         */
4881        if (ParametricChildList(name,tsl,NOCHECKSUBS) != DEF_OKAY) {        if (ParametricChildList(name,tsl,NOCHECKSUBS) != DEF_OKAY) {
4882          /* contents of tsl, if any, have been checked already */          /* contents of tsl, if any, have been checked already */
4883          FPRINTF(ASCERR,"%sModel %s victim of bizarre error 2.\n",          error_reporter_start(ASC_PROG_ERROR,NULL,0);
4884            StatioLabel(3),SCP(name));          FPRINTF(ASCERR,"Model %s victim of bizarre error 2.\n",SCP(name));
4885          WriteStatementList(ASCERR,tsl,2);          WriteStatementList(ASCERR,tsl,2);
4886            error_reporter_end_flush();
4887    
4888          DestroyTypeDefArgs(sl,pl,psl,rsl,tsl,wsl);          DestroyTypeDefArgs(sl,pl,psl,rsl,tsl,wsl);
4889          DestroyStatementList(pslbase);          DestroyStatementList(pslbase);
4890          return NULL;          return NULL;
# Line 4994  struct TypeDescription *CreateConstantTy Line 5009  struct TypeDescription *CreateConstantTy
5009    enum type_kind t;    enum type_kind t;
5010    
5011    if (err) {    if (err) {
5012      error_reporter(ASC_PROG_ERR,NULL,0,"Constant definition \"%s\" abandoned due to syntax errors.",SCP(name));      error_reporter(ASC_PROG_ERR,NULL,0,"Constant definition '%s' abandoned due to syntax errors.",SCP(name));
5013      return NULL;      return NULL;
5014    }    }
5015    if (refines==NULL) {    if (refines==NULL) {
5016      FPRINTF(ASCERR,"%sConstants must refine constant basetypes.\n",      error_reporter(ASC_USER_ERROR,NULL,0,"Constants must refine constant basetypes.");
       StatioLabel(3));  
5017      return NULL;      return NULL;
5018    }    }
5019    rdesc = FindType(refines);    rdesc = FindType(refines);
5020    if (rdesc==NULL){    if (rdesc==NULL){
5021      error_reporter(ASC_PROG_ERR,NULL,0,"Unable to locate type %s for %s's type definition.",SCP(refines),SCP(name));      error_reporter(ASC_PROG_ERR,NULL,0,"Unable to locate type '%s' for definition of type '%s'.",SCP(refines),SCP(name));
5022      return NULL;      return NULL;
5023    }    }
5024    t = GetBaseType(rdesc);    t = GetBaseType(rdesc);
# Line 5012  struct TypeDescription *CreateConstantTy Line 5026  struct TypeDescription *CreateConstantTy
5026         t != integer_constant_type &&         t != integer_constant_type &&
5027         t != symbol_constant_type &&         t != symbol_constant_type &&
5028         t != boolean_constant_type) {         t != boolean_constant_type) {
5029      error_reporter(ASC_PROG_ERR,NULL,0,"Constant %s attempts to refine a non-Constant type %s.",SCP(name),SCP(refines));      error_reporter(ASC_PROG_ERR,NULL,0,"Constant '%s' attempts to refine a non-constant type '%s'.",SCP(name),SCP(refines));
5030      return NULL;      return NULL;
5031    }    }
5032    if (GetUniversalFlag(rdesc)) univ=1;    if (GetUniversalFlag(rdesc)) univ=1;

Legend:
Removed from v.169  
changed lines
  Added in v.170

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22