diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-20 00:39:43 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-20 00:39:43 +0000 |
commit | 7d986adf37220e1981a707745b784b078de4e3bc (patch) | |
tree | 831dea5f470c0c6b3c373f38d3a5f0354bc22600 /compiler_and_linker/FrontEnd/C/CScope.c | |
parent | 4d670146b4054e11e90227f96a3a1c66410e8d0b (diff) | |
download | MWCC-7d986adf37220e1981a707745b784b078de4e3bc.tar.gz MWCC-7d986adf37220e1981a707745b784b078de4e3bc.zip |
fix various inaccuracies exposed by the mach ppc plugin
Diffstat (limited to 'compiler_and_linker/FrontEnd/C/CScope.c')
-rw-r--r-- | compiler_and_linker/FrontEnd/C/CScope.c | 20 |
1 files changed, 10 insertions, 10 deletions
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; |