diff --git a/dmd/mtype.h b/dmd/mtype.h index ebac3854..ccfbd8be 100644 --- a/dmd/mtype.h +++ b/dmd/mtype.h @@ -167,7 +167,7 @@ struct Type : Object #define tshiftcnt tint32 // right side of shift expression // #define tboolean tint32 // result of boolean expression #define tboolean tbool // result of boolean expression - #define tindex tint32 // array/ptr index + #define tindex tsize_t // array/ptr index static Type *tvoidptr; // void* #define terror basic[Terror] // for error recovery diff --git a/dmd/template.c b/dmd/template.c index 767e7c97..62fc13aa 100644 --- a/dmd/template.c +++ b/dmd/template.c @@ -3681,7 +3681,7 @@ void TemplateInstance::semantic(Scope *sc) // Give additional context info if error occurred during instantiation if (global.errors != errorsave) { - error("error instantiating"); + error(loc, "error instantiating"); if (tinst) { tinst->printInstantiationTrace(); if (!global.gag)