From 7d986adf37220e1981a707745b784b078de4e3bc Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Fri, 20 Jan 2023 00:39:43 +0000 Subject: fix various inaccuracies exposed by the mach ppc plugin --- compiler_and_linker/FrontEnd/C/CScope.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'compiler_and_linker/FrontEnd/C/CScope.c') diff --git a/compiler_and_linker/FrontEnd/C/CScope.c b/compiler_and_linker/FrontEnd/C/CScope.c index ef5695c..6049ad0 100644 --- a/compiler_and_linker/FrontEnd/C/CScope.c +++ b/compiler_and_linker/FrontEnd/C/CScope.c @@ -1442,7 +1442,7 @@ Type *CScope_GetTagType(NameSpace *nspace, HashNameNode *name) { static Boolean CScope_DependentTemplateMember(CScopeParseResult *result, TypeTemplDep *ttempldep, Boolean flag1, Boolean flag2) { SInt32 streamstate; - short token; + int token; TypeTemplDep *newtype; TypeTemplDep *newtype2; @@ -2537,30 +2537,30 @@ void CScope_AddClassUsingDeclaration(TypeClass *tclass, TypeClass *tclass2, Hash void CScope_ParseUsingDeclaration(NameSpace *nspace, AccessType access, Boolean flag) { NameSpace *saveNSpace; - Boolean flag_r27; - Boolean flag_r26; + Boolean isTemplate; + Boolean isTypename; NameSpaceObjectList *scan; CScopeParseResult result; if (nspace->theclass) { - flag_r27 = (TYPE_CLASS(nspace->theclass)->flags & CLASS_FLAGS_100) ? 1 : 0; - flag_r26 = 0; + isTemplate = (TYPE_CLASS(nspace->theclass)->flags & CLASS_FLAGS_100) != 0; + isTypename = 0; if (tk == TK_TYPENAME) { - if (!flag_r27) + if (!isTemplate) CError_Error(CErrorStr200); - flag_r26 = 1; + isTypename = 1; tk = lex(); } - if (!CScope_ParseMemberName(nspace->theclass, &result, flag_r27)) { + if (!CScope_ParseMemberName(nspace->theclass, &result, isTemplate)) { CError_Error(CErrorStr200); return; } if (result.x8 && IS_TYPE_TEMPLATE(result.x8) && TYPE_TEMPLATE(result.x8)->dtype == TEMPLDEP_QUALNAME) { - CError_ASSERT(3578, flag_r27); + CError_ASSERT(3578, isTemplate); - if (flag_r26) { + if (isTypename) { ObjType *objtype = galloc(sizeof(ObjType)); memclrw(objtype, sizeof(ObjType)); objtype->otype = OT_TYPE; -- cgit v1.2.3