From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1499) id CD5673836028; Mon, 2 Aug 2021 08:47:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD5673836028 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Gaius Mulley To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/gaius/heads/devel/modula-2)] Remove unused variables, parameters and procedures. X-Act-Checkin: gcc X-Git-Author: Gaius Mulley X-Git-Refname: refs/users/gaius/heads/devel/modula-2 X-Git-Oldrev: b81ede39530c009498789190cc86a1179a45ce82 X-Git-Newrev: 48199ff6ed1858039f1116095a5e45905fa48d75 Message-Id: <20210802084714.CD5673836028@sourceware.org> Date: Mon, 2 Aug 2021 08:47:14 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Aug 2021 08:47:15 -0000 https://gcc.gnu.org/g:48199ff6ed1858039f1116095a5e45905fa48d75 commit 48199ff6ed1858039f1116095a5e45905fa48d75 Author: Gaius Mulley Date: Mon Aug 2 09:44:33 2021 +0100 Remove unused variables, parameters and procedures. 2021-08-02 Gaius Mulley gcc/m2/ * gm2-compiler/M2BasicBlock.mod (ConvertQuads2BasicBlock): Assign CurrentBB to NIL. (Sub): Commented out. (DisplayBasicBlocks): Commented out. (DisplayBlock): Commented out. * gm2-compiler/M2Code.mod (PrintModule): Commented out. (DisplayQuadsInScope): Commented out. (DisplayQuadNumbers): Commented out. * gm2-compiler/M2Error.mod: Import NulName. (DoFormat1) initialize n. (DoFormat2) initialize n. * gm2-compiler/M2Optimize.mod (DeleteUnReachableProcedures): Commented out. * gm2-compiler/M2Options.mod: Commented out string garbage debugging procedures. (SetDebugging) Commented out. * gm2-compiler/M2Printf.mod (IsDigit): Commented out. * gm2-compiler/P1SymBuild.mod (CheckProcedure): Removed. (CheckFileName) Commented out. (BuildHiddenType) Remove Sym. Use Assert to check return value. * gm2-compiler/P2SymBuild.def (SeenBoolean): Remove sym parameter. (SeenZType): Remove sym parameter. (SeenRType): Remove sym parameter. (SeenCType): Remove sym parameter. * gm2-compiler/P2SymBuild.mod (SeenBoolean): Remove sym parameter. (SeenZType): Remove sym parameter. (SeenRType): Remove sym parameter. (SeenCType): Remove sym parameter. (StartBuildEnumeration): Remove name. (FailParameter) Use default ELSE and Assert. (BuildNulParam) Removed. (BuildFieldRecord) Remove name. Assign Field to NulSym. (BuildVarientSelector) Remove Parent. * gm2-compiler/SymbolTable.def (GCFieldVarient): Removed. (FillInUnboundedFields): Remove field. * gm2-compiler/gm2lcc.mod (CollectObjects): remove s. (WriteModuleName) Removed. * gm2-compiler/gm2lorder.mod (InitRuntimeModules) Remove l. * gm2-gcc/m2expr.c (divFloorOverflowPosPos) Remove unused parameters. (divFloorOverflowPosNeg) Remove unused parameters. (divFloorOverflowNegPos) Remove unused parameters. libgm2/ * libm2pim/Makefile.in: (Rebuilt). Signed-off-by: Gaius Mulley Diff: --- gcc/m2/gm2-compiler/M2BasicBlock.mod | 5 +++ gcc/m2/gm2-compiler/M2Code.mod | 6 ++++ gcc/m2/gm2-compiler/M2Error.mod | 5 ++- gcc/m2/gm2-compiler/M2Optimize.mod | 4 ++- gcc/m2/gm2-compiler/M2Options.mod | 7 +++-- gcc/m2/gm2-compiler/M2Printf.mod | 2 ++ gcc/m2/gm2-compiler/P1SymBuild.mod | 13 +++----- gcc/m2/gm2-compiler/P2SymBuild.def | 8 ++--- gcc/m2/gm2-compiler/P2SymBuild.mod | 61 ++++++++++++------------------------ gcc/m2/gm2-compiler/SymbolTable.def | 9 ------ gcc/m2/gm2-compiler/SymbolTable.mod | 32 ++++--------------- gcc/m2/gm2-compiler/gm2lcc.mod | 8 ++--- gcc/m2/gm2-compiler/gm2lorder.mod | 6 ++-- gcc/m2/gm2-gcc/m2expr.c | 17 +++++----- gm2tools/Makefile.in | 2 +- libgm2/libm2pim/Makefile.in | 24 +++++++------- 16 files changed, 87 insertions(+), 122 deletions(-) diff --git a/gcc/m2/gm2-compiler/M2BasicBlock.mod b/gcc/m2/gm2-compiler/M2BasicBlock.mod index 3d9f511f6e8..5908eeb5e59 100644 --- a/gcc/m2/gm2-compiler/M2BasicBlock.mod +++ b/gcc/m2/gm2-compiler/M2BasicBlock.mod @@ -175,6 +175,7 @@ BEGIN since they will never be executed. *) LastBB := NIL ; + CurrentBB := NIL ; Quad := Start ; LastQuadConditional := TRUE ; (* Force Rule (i) *) LastQuadCall := FALSE ; @@ -299,6 +300,7 @@ END Add ; Sub deletes an element from the specified queue. *) +(* PROCEDURE Sub (VAR Head: BasicBlock; b: BasicBlock) ; BEGIN @@ -314,12 +316,14 @@ BEGIN b^.Right^.Left := b^.Left END END Sub ; +*) (* DisplayBasicBlocks - displays the basic block data structure. *) +(* PROCEDURE DisplayBasicBlocks (bb: BasicBlock) ; VAR b: BasicBlock ; @@ -343,6 +347,7 @@ BEGIN WriteString(' end ') ; WriteCard(EndQuad, 6) ; END END DisplayBlock ; +*) BEGIN diff --git a/gcc/m2/gm2-compiler/M2Code.mod b/gcc/m2/gm2-compiler/M2Code.mod index 8552b35d899..84208dc3bc0 100644 --- a/gcc/m2/gm2-compiler/M2Code.mod +++ b/gcc/m2/gm2-compiler/M2Code.mod @@ -178,6 +178,7 @@ END DoModuleDeclare ; PrintModule - *) +(* PROCEDURE PrintModule (sym: CARDINAL) ; VAR n: Name ; @@ -185,6 +186,7 @@ BEGIN n := GetSymName (sym) ; printf1 ('module %a\n', n) END PrintModule ; +*) (* @@ -388,12 +390,14 @@ END BasicBlockVariableAnalysis ; DisplayQuadsInScope - *) +(* PROCEDURE DisplayQuadsInScope (sb: ScopeBlock) ; BEGIN printf0 ('Quads in scope\n') ; ForeachScopeBlockDo (sb, DisplayQuadRange) ; printf0 ('===============\n') END DisplayQuadsInScope ; +*) (* @@ -425,6 +429,7 @@ END OptimizeScopeBlock ; DisplayQuadNumbers - the range, start..end. *) +(* PROCEDURE DisplayQuadNumbers (start, end: CARDINAL) ; BEGIN IF DisplayQuadruples @@ -432,6 +437,7 @@ BEGIN printf2 ('Coding [%d..%d]\n', start, end) END END DisplayQuadNumbers ; +*) (* diff --git a/gcc/m2/gm2-compiler/M2Error.mod b/gcc/m2/gm2-compiler/M2Error.mod index c29901a0b22..29de1878f34 100644 --- a/gcc/m2/gm2-compiler/M2Error.mod +++ b/gcc/m2/gm2-compiler/M2Error.mod @@ -21,7 +21,7 @@ along with GNU Modula-2; see the file COPYING3. If not see IMPLEMENTATION MODULE M2Error ; -FROM NameKey IMPORT Name, KeyToCharStar ; +FROM NameKey IMPORT NulName, Name, KeyToCharStar ; FROM DynamicStrings IMPORT String, InitString, InitStringCharStar, ConCat, ConCatChar, Mark, string, KillString, Dup ; FROM FIO IMPORT StdOut, WriteNBytes, Close, FlushBuffer ; FROM StrLib IMPORT StrLen, StrEqual ; @@ -196,6 +196,7 @@ VAR s: String ; n: Name ; BEGIN + n := NulName ; IF TranslateNameToCharStar(a, 1) THEN Cast(n, w) ; @@ -250,6 +251,7 @@ VAR b : BITSET ; BEGIN b := {} ; + n := NulName ; IF TranslateNameToCharStar(a, 1) THEN Cast(n, w1) ; @@ -298,6 +300,7 @@ VAR b : BITSET ; BEGIN b := {} ; + n := NulName ; IF TranslateNameToCharStar(a, 1) THEN Cast(n, w1) ; diff --git a/gcc/m2/gm2-compiler/M2Optimize.mod b/gcc/m2/gm2-compiler/M2Optimize.mod index 4c2cc1db00d..4369ad03db7 100644 --- a/gcc/m2/gm2-compiler/M2Optimize.mod +++ b/gcc/m2/gm2-compiler/M2Optimize.mod @@ -220,7 +220,7 @@ BEGIN From := GetNextQuad (From) END END ; - RETURN TRUE + RETURN TRUE END IsBasicBlock ; @@ -383,6 +383,7 @@ END KnownReach ; DeleteUnReachableProcedures - Deletes all procedures that are unreachable. *) +(* PROCEDURE DeleteUnReachableProcedures ; VAR ProcName: Name ; @@ -464,6 +465,7 @@ BEGIN END END END Delete ; +*) (* diff --git a/gcc/m2/gm2-compiler/M2Options.mod b/gcc/m2/gm2-compiler/M2Options.mod index 2624514d051..a26435d9d1f 100644 --- a/gcc/m2/gm2-compiler/M2Options.mod +++ b/gcc/m2/gm2-compiler/M2Options.mod @@ -58,6 +58,8 @@ VAR ForcedLocationValue: location_t ; +(* String garbage collection debugging routines. + (* doDSdbEnter - *) @@ -94,7 +96,7 @@ END DSdbEnter ; PROCEDURE DSdbExit (s: String) ; BEGIN END DSdbExit ; - +*) (* #define DSdbEnter doDSdbEnter @@ -465,6 +467,7 @@ BEGIN END SetUnboundedByReference ; +(* (* SetDebugging - sets the debugging flag to, v. *) @@ -474,7 +477,7 @@ BEGIN GenerateDebugging := value END SetDebugging ; -(* + (* SetProfiling - dummy procedure, as profiling is implemented in the gcc backend. *) diff --git a/gcc/m2/gm2-compiler/M2Printf.mod b/gcc/m2/gm2-compiler/M2Printf.mod index 9bd62ab63af..f7e0973f71b 100644 --- a/gcc/m2/gm2-compiler/M2Printf.mod +++ b/gcc/m2/gm2-compiler/M2Printf.mod @@ -33,10 +33,12 @@ FROM NameKey IMPORT Name, KeyToCharStar ; IsDigit - returns TRUE if, ch, is a character 0..9 *) +(* PROCEDURE IsDigit (ch: CHAR) : BOOLEAN ; BEGIN RETURN (ch>='0') AND (ch<='9') END IsDigit ; +*) (* diff --git a/gcc/m2/gm2-compiler/P1SymBuild.mod b/gcc/m2/gm2-compiler/P1SymBuild.mod index 5cb9808b77e..9060ee5de57 100644 --- a/gcc/m2/gm2-compiler/P1SymBuild.mod +++ b/gcc/m2/gm2-compiler/P1SymBuild.mod @@ -96,15 +96,12 @@ FROM M2Comp IMPORT CompilingDefinitionModule, CONST Debugging = FALSE ; -VAR - CheckProcedure: BOOLEAN ; (* Set if currently implementing a defined *) - (* procedure. *) - (* - CheckName - checks to see that the module name matches the file name. + CheckFileName - checks to see that the module name matches the file name. *) +(* PROCEDURE CheckFileName (tok: CARDINAL; name: Name; ModuleType: ARRAY OF CHAR) ; VAR ext, @@ -133,6 +130,7 @@ BEGIN MetaErrorString2 (s, MakeError (tok, name), MakeErrorS (tok, FileName)) END END CheckFileName ; +*) (* @@ -888,12 +886,11 @@ PROCEDURE BuildHiddenType ; VAR name : Name ; tokno: CARDINAL ; - Sym : CARDINAL ; BEGIN - PopTtok(name, tokno) ; + PopTtok (name, tokno) ; (* WriteString('Hidden type encountered: ') ; *) (* WriteKey(Name) ; WriteLn ; *) - Sym := MakeHiddenType(tokno, name) + Assert (MakeHiddenType (tokno, name) # NulSym) END BuildHiddenType ; diff --git a/gcc/m2/gm2-compiler/P2SymBuild.def b/gcc/m2/gm2-compiler/P2SymBuild.def index 6caede99f1c..109120d82b2 100644 --- a/gcc/m2/gm2-compiler/P2SymBuild.def +++ b/gcc/m2/gm2-compiler/P2SymBuild.def @@ -1216,28 +1216,28 @@ PROCEDURE SeenString ; SeenBoolean - sets the operand type to a BOOLEAN. *) -PROCEDURE SeenBoolean (sym: CARDINAL) ; +PROCEDURE SeenBoolean ; (* SeenZType - sets the operand type to a Z type. *) -PROCEDURE SeenZType (sym: CARDINAL) ; +PROCEDURE SeenZType ; (* SeenRType - sets the operand type to a R type. *) -PROCEDURE SeenRType (sym: CARDINAL) ; +PROCEDURE SeenRType ; (* SeenCType - sets the operand type to a C type. *) -PROCEDURE SeenCType (sym: CARDINAL) ; +PROCEDURE SeenCType ; (* diff --git a/gcc/m2/gm2-compiler/P2SymBuild.mod b/gcc/m2/gm2-compiler/P2SymBuild.mod index 9695a47ee0c..dab4cb2124a 100644 --- a/gcc/m2/gm2-compiler/P2SymBuild.mod +++ b/gcc/m2/gm2-compiler/P2SymBuild.mod @@ -70,7 +70,7 @@ FROM SymbolTable IMPORT NulSym, GetExported, PutExported, PutExportQualified, PutExportUnQualified, PutExportUnImplemented, - PutFieldVarient, GCFieldVarient, PutVarientTag, + PutFieldVarient, PutVarientTag, IsFieldVarient, IsVarient, CheckForEnumerationInCurrentModule, CheckForExportedImplementation, @@ -734,19 +734,18 @@ END BuildConst ; PROCEDURE StartBuildEnumeration ; VAR - name: Name ; n, Type: CARDINAL ; tok : CARDINAL ; BEGIN - PopT(n) ; (* n := # *) - name := OperandT(n+1) ; - tok := OperandTok(n+1) ; - GetEnumerationFromFifoQueue(Type) ; - CheckForExportedImplementation(Type) ; (* May be an exported hidden type *) - PopN(n) ; - PushTtok(Type, tok) ; - Annotate("%1s(%1d)|%3d||enumerated type") + PopT (n) ; (* n := # *) + (* name is in OperandT(n+1) but we dont need it here. *) + tok := OperandTok (n+1) ; + GetEnumerationFromFifoQueue (Type) ; + CheckForExportedImplementation (Type) ; (* May be an exported hidden type *) + PopN (n) ; + PushTtok (Type, tok) ; + Annotate ("%1s(%1d)|%3d||enumerated type") END StartBuildEnumeration ; @@ -1795,8 +1794,8 @@ BEGIN THEN FirstModule := InitString('implementation module') ; SecondModule := InitString('definition module') - ELSIF CompilingProgramModule() - THEN + ELSE + Assert (CompilingProgramModule ()) ; FirstModule := InitString('program module') ; SecondModule := InitString('definition module') END ; @@ -1983,24 +1982,6 @@ BEGIN END BuildOptFunction ; -(* - BuildNulParam - Builds a nul parameter on the stack. - The Stack: - - Entry Exit - - <- Ptr - Empty +------------+ - | 0 | - |------------| -*) - -PROCEDURE BuildNulParam ; -BEGIN - PushT(0) -END BuildNulParam ; - - (* BuildPointerType - builds a pointer type. The Stack: @@ -2205,7 +2186,7 @@ END HandleRecordFieldPragmas ; PROCEDURE BuildFieldRecord ; VAR - name, n1 : Name ; + n1 : Name ; tok, fsym, Field, @@ -2219,7 +2200,7 @@ VAR BEGIN PopT(NoOfPragmas) ; Type := OperandT(NoOfPragmas*2+1) ; - name := OperandF(NoOfPragmas*2+1) ; + (* name := OperandF(NoOfPragmas*2+1) ; *) NoOfFields := OperandT(NoOfPragmas*2+2) ; Record := OperandT(NoOfPragmas*2+NoOfFields+3) ; IF IsRecord(Record) @@ -2243,6 +2224,7 @@ BEGIN WriteKey(n1) ; WriteLn END END ; + Field := NulSym ; i := 1 ; WHILE i<=NoOfFields DO IF Debugging @@ -2265,7 +2247,7 @@ BEGIN END ; (* adjust the location of declaration to the one on the stack (rather than GetTokenNo). *) tok := OperandTok(NoOfPragmas*2+NoOfFields+3-i) ; - IF tok # UnknownTokenNo + IF (tok # UnknownTokenNo) AND (Field # NulSym) THEN PutDeclared (tok, Field) END ; @@ -2308,7 +2290,6 @@ VAR Field, Type, Varient, - Parent, VarField, Record : CARDINAL ; BEGIN @@ -2317,7 +2298,6 @@ BEGIN Record := OperandT(1) ; IF IsRecord(Record) THEN - Parent := Record ; Varient := NulSym ; InternalError ('not expecting a record symbol') ELSIF IsVarient(Record) @@ -2341,7 +2321,6 @@ BEGIN END ELSE (* Record maybe FieldVarient *) - Parent := GetParent(Record) ; Assert(IsFieldVarient(Record)) ; Varient := OperandT(1+2) ; Assert(IsVarient(Varient)) ; @@ -2687,7 +2666,7 @@ BEGIN name := OperandT (1) ; tok := OperandTok (1) ; ProcTypeSym := MakeProcType (tok, name) ; - CheckForExportedImplementation (ProcTypeSym) ; (* May be an exported hidden type *) + CheckForExportedImplementation (ProcTypeSym) ; (* May be an exported hidden type *) Annotate ("%1n||procedure type name") ; PushTtok (ProcTypeSym, tok) ; Annotate ("%1s(%1d)|%3d||proc type|token no") @@ -2848,7 +2827,7 @@ END SeenCast ; SeenBoolean - sets the operand type to a BOOLEAN. *) -PROCEDURE SeenBoolean (sym: CARDINAL) ; +PROCEDURE SeenBoolean ; BEGIN type := boolean END SeenBoolean ; @@ -2858,7 +2837,7 @@ END SeenBoolean ; SeenZType - sets the operand type to a Z type. *) -PROCEDURE SeenZType (sym: CARDINAL) ; +PROCEDURE SeenZType ; BEGIN type := ztype END SeenZType ; @@ -2868,7 +2847,7 @@ END SeenZType ; SeenRType - sets the operand type to a R type. *) -PROCEDURE SeenRType (sym: CARDINAL) ; +PROCEDURE SeenRType ; BEGIN type := rtype END SeenRType ; @@ -2878,7 +2857,7 @@ END SeenRType ; SeenCType - sets the operand type to a C type. *) -PROCEDURE SeenCType (sym: CARDINAL) ; +PROCEDURE SeenCType ; BEGIN type := ctype END SeenCType ; diff --git a/gcc/m2/gm2-compiler/SymbolTable.def b/gcc/m2/gm2-compiler/SymbolTable.def index 34f8b399743..a5187a6c38c 100644 --- a/gcc/m2/gm2-compiler/SymbolTable.def +++ b/gcc/m2/gm2-compiler/SymbolTable.def @@ -149,7 +149,6 @@ EXPORT QUALIFIED NulSym, PutFieldRecord, PutFieldVarient, GetVarient, - GCFieldVarient, GetVarientTag, PutVarientTag, @@ -1351,14 +1350,6 @@ PROCEDURE PutFieldVarient (Field, Sym: CARDINAL) ; PROCEDURE GetVarient (Field: CARDINAL) : CARDINAL ; -(* - GCFieldVarient - garbage collect the field varient symbol, Sym. - This must only be called once per Sym. -*) - -PROCEDURE GCFieldVarient (Sym: CARDINAL) ; - - (* IsRecordFieldAVarientTag - returns TRUE if record field, sym, is a varient tag. diff --git a/gcc/m2/gm2-compiler/SymbolTable.mod b/gcc/m2/gm2-compiler/SymbolTable.mod index 833b164eb22..49dd55c1f84 100644 --- a/gcc/m2/gm2-compiler/SymbolTable.mod +++ b/gcc/m2/gm2-compiler/SymbolTable.mod @@ -5902,25 +5902,6 @@ BEGIN END GetVarient ; -(* - GCFieldVarient - garbage collect the field varient symbol, Sym. - This must only be called once per Sym. -*) - -PROCEDURE GCFieldVarient (Sym: CARDINAL) ; -BEGIN -(* - IF IsItemInList(UsedFVarientList, Sym) - THEN - RemoveItemFromList(UsedFVarientList, Sym) - ELSE - RemoveItemFromList(UsedFVarientList, Sym) ; - PutItemIntoList(FreeFVarientList, Sym) - END -*) -END GCFieldVarient ; - - (* EnsureOrder - providing that both symbols, a, and, b, exist in list, l. Ensure that, b, is placed after a. @@ -10282,7 +10263,6 @@ PROCEDURE FillInUnboundedFields (tok: CARDINAL; sym: CARDINAL; SimpleType: CARDINAL; ndim: CARDINAL) ; VAR pSym : PtrToSymbol ; - field : CARDINAL ; Contents: CARDINAL ; i : CARDINAL ; BEGIN @@ -10302,15 +10282,15 @@ BEGIN FillInPointerFields(Contents, NulName, GetScope(SimpleType), NulSym) ; PutPointer(Contents, SimpleType) ; (* create the contents field for the unbounded array. *) - field := PutFieldRecord(RecordType, - MakeKey(UnboundedAddressName), - Contents, NulSym) ; + Assert (PutFieldRecord(RecordType, + MakeKey(UnboundedAddressName), + Contents, NulSym) # NulSym) ; (* create all the high fields for the unbounded array. *) i := 1 ; WHILE i<=ndim DO - field := PutFieldRecord(RecordType, - makekey(string(Mark(Sprintf1(Mark(InitString(UnboundedHighName)), i)))), - Cardinal, NulSym) ; + Assert (PutFieldRecord(RecordType, + makekey(string(Mark(Sprintf1(Mark(InitString(UnboundedHighName)), i)))), + Cardinal, NulSym) # NulSym) ; INC(i) END ; Dimensions := ndim diff --git a/gcc/m2/gm2-compiler/gm2lcc.mod b/gcc/m2/gm2-compiler/gm2lcc.mod index b5c096c1971..5ef2f78aaa7 100644 --- a/gcc/m2/gm2-compiler/gm2lcc.mod +++ b/gcc/m2/gm2-compiler/gm2lcc.mod @@ -63,7 +63,6 @@ VAR ProfileFound : BOOLEAN ; LibrariesFound: BOOLEAN ; TargetFound : BOOLEAN ; - PathFound : BOOLEAN ; ExecCommand : BOOLEAN ; (* should we execute the final cmd *) UseAr : BOOLEAN ; (* use 'ar' and create archive *) UseRanlib : BOOLEAN ; (* use 'ranlib' to index archive *) @@ -333,8 +332,7 @@ END FindModulesInFileList ; PROCEDURE CollectObjects (Command: String) : String ; VAR i, h: CARDINAL ; - name, - s : String ; + name: String ; BEGIN i := 1 ; h := HighIndice (CmdLineObjects) ; @@ -438,6 +436,7 @@ END GenCC ; after the string. *) +(* PROCEDURE WriteModuleName (ModuleName: String) ; BEGIN ModuleName := WriteS (fo, ModuleName) ; @@ -445,6 +444,7 @@ BEGIN THEN END END WriteModuleName ; +*) (* @@ -641,7 +641,7 @@ END AdditionalFOptions ; (* - DisplayHelp - + DisplayHelp - *) PROCEDURE DisplayHelp ; diff --git a/gcc/m2/gm2-compiler/gm2lorder.mod b/gcc/m2/gm2-compiler/gm2lorder.mod index d1a7b1006ad..025a0f851cd 100644 --- a/gcc/m2/gm2-compiler/gm2lorder.mod +++ b/gcc/m2/gm2-compiler/gm2lorder.mod @@ -62,15 +62,13 @@ VAR PROCEDURE InitRuntimeModules (s: String) ; VAR a : CARDINAL ; - i, l, - j : INTEGER ; + i, j: INTEGER ; BEGIN IF runTime # NIL THEN runTime := KillIndex (runTime) END ; runTime := InitIndex (0) ; - l := Length (s) ; i := 0 ; a := 0 ; REPEAT @@ -252,7 +250,7 @@ END ScanArgs ; (* - Init - + Init - *) PROCEDURE Init ; diff --git a/gcc/m2/gm2-gcc/m2expr.c b/gcc/m2/gm2-gcc/m2expr.c index 6e114e22d83..90060736bcc 100644 --- a/gcc/m2/gm2-gcc/m2expr.c +++ b/gcc/m2/gm2-gcc/m2expr.c @@ -2212,8 +2212,8 @@ END divFloorOverflowNegNeg ; (* divFloorOverflowNegPos - precondition: i, j are in range values. i < 0, j >= 0. - postcondition: TRUE is returned if i divfloor will - result in an overflow/underflow. + postcondition: TRUE is returned if i divfloor will + result in an overflow/underflow. *) PROCEDURE divFloorOverflowNegPos (i, j: INTEGER) : BOOLEAN ; @@ -2252,8 +2252,7 @@ END divFloorOverflowPosNeg ; RETURN i < j_mult_min. */ static tree -divFloorOverflowPosPos (location_t location, tree i, tree j, tree lowest, - tree min, tree max) +divFloorOverflowPosPos (location_t location, tree i, tree j, tree min) { tree j_mult_min = m2expr_BuildMult (location, j, min, FALSE); tree i_lt_j_mult_min = m2expr_BuildLessThan (location, i, j_mult_min); @@ -2316,7 +2315,7 @@ divFloorOverflowNegNeg (location_t location, tree i, tree j, tree lowest, return i_ge_j_mult_min_sub_j. */ static tree -divFloorOverflowPosNeg (location_t location, tree i, tree j, tree lowest, tree min, tree max) +divFloorOverflowPosNeg (location_t location, tree i, tree j, tree min) { tree j_mult_min = m2expr_BuildMult (location, j, min, FALSE); tree j_mult_min_sub_j = m2expr_BuildSub (location, j_mult_min, j, FALSE); @@ -2337,7 +2336,7 @@ divFloorOverflowPosNeg (location_t location, tree i, tree j, tree lowest, tree m RETURN i < j_mult_min. */ static tree -divFloorOverflowNegPos (location_t location, tree i, tree j, tree lowest, tree min, tree max) +divFloorOverflowNegPos (location_t location, tree i, tree j, tree min) { tree j_mult_min = m2expr_BuildMult (location, j, min, FALSE); tree i_lt_j_mult_min = m2expr_BuildLessThan (location, i, j_mult_min); @@ -2372,13 +2371,13 @@ divFloorOverflowCases (location_t location, tree i, tree j, tree lowest, tree i_lt_zero = m2expr_BuildLessThanZero (location, i, lowest, min, max); tree j_lt_zero = m2expr_BuildLessThanZero (location, j, lowest, min, max); tree a = m2expr_Build3TruthAndIf (location, i_gt_zero, j_gt_zero, - divFloorOverflowPosPos (location, i, j, lowest, min, max)); + divFloorOverflowPosPos (location, i, j, min)); tree b = m2expr_Build3TruthAndIf (location, i_lt_zero, j_lt_zero, divFloorOverflowNegNeg (location, i, j, lowest, min, max)); tree c = m2expr_Build3TruthAndIf (location, i_gt_zero, j_lt_zero, - divFloorOverflowPosNeg (location, i, j, lowest, min, max)); + divFloorOverflowPosNeg (location, i, j, min)); tree d = m2expr_Build3TruthAndIf (location, i_lt_zero, j_gt_zero, - divFloorOverflowNegPos (location, i, j, lowest, min, max)); + divFloorOverflowNegPos (location, i, j, min)); return m2expr_Build4TruthOrIf (location, a, b, c, d); } diff --git a/gm2tools/Makefile.in b/gm2tools/Makefile.in index c9845041b2c..af4f623a5ca 100644 --- a/gm2tools/Makefile.in +++ b/gm2tools/Makefile.in @@ -647,8 +647,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@NATIVE_FALSE@uninstall-local: @NATIVE_FALSE@install-exec-local: +@NATIVE_FALSE@uninstall-local: clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am diff --git a/libgm2/libm2pim/Makefile.in b/libgm2/libm2pim/Makefile.in index 42068db161d..80e9bd6bb5c 100644 --- a/libgm2/libm2pim/Makefile.in +++ b/libgm2/libm2pim/Makefile.in @@ -175,7 +175,7 @@ libm2pim_la_LIBADD = @BUILD_PIMLIB_TRUE@ libm2pim_la-termios.lo \ @BUILD_PIMLIB_TRUE@ libm2pim_la-SysExceptions.lo \ @BUILD_PIMLIB_TRUE@ libm2pim_la-target.lo libm2pim_la-wrapc.lo \ -@BUILD_PIMLIB_TRUE@ libm2pim_la-getopt.lo +@BUILD_PIMLIB_TRUE@ libm2pim_la-cgetopt.lo libm2pim_la_OBJECTS = $(am_libm2pim_la_OBJECTS) @BUILD_PIMLIB_TRUE@am_libm2pim_la_rpath = -rpath $(toolexeclibdir) AM_V_P = $(am__v_P_@AM_V@) @@ -196,9 +196,9 @@ am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libm2pim_la-Selective.Plo \ ./$(DEPDIR)/libm2pim_la-SysExceptions.Plo \ ./$(DEPDIR)/libm2pim_la-UnixArgs.Plo \ + ./$(DEPDIR)/libm2pim_la-cgetopt.Plo \ ./$(DEPDIR)/libm2pim_la-dtoa.Plo \ ./$(DEPDIR)/libm2pim_la-errno.Plo \ - ./$(DEPDIR)/libm2pim_la-getopt.Plo \ ./$(DEPDIR)/libm2pim_la-ldtoa.Plo \ ./$(DEPDIR)/libm2pim_la-sckt.Plo \ ./$(DEPDIR)/libm2pim_la-target.Plo \ @@ -516,7 +516,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_PIMLIB_TRUE@ termios.def TimeString.def \ @BUILD_PIMLIB_TRUE@ UnixArgs.def wrapc.def \ @BUILD_PIMLIB_TRUE@ GetOpt.def OptLib.def \ -@BUILD_PIMLIB_TRUE@ getopt.def +@BUILD_PIMLIB_TRUE@ cgetopt.def @BUILD_PIMLIB_TRUE@libm2pim_la_SOURCES = $(M2MODS) \ @BUILD_PIMLIB_TRUE@ UnixArgs.c \ @@ -524,7 +524,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_PIMLIB_TRUE@ errno.c dtoa.c \ @BUILD_PIMLIB_TRUE@ ldtoa.c termios.c \ @BUILD_PIMLIB_TRUE@ SysExceptions.c target.c \ -@BUILD_PIMLIB_TRUE@ wrapc.c getopt.c +@BUILD_PIMLIB_TRUE@ wrapc.c cgetopt.c @BUILD_PIMLIB_TRUE@libm2pimdir = libm2pim @BUILD_PIMLIB_TRUE@libm2pim_la_DEPENDENCIES = SYSTEM.def @@ -616,9 +616,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-Selective.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-SysExceptions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-UnixArgs.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-cgetopt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-dtoa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-errno.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-getopt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-ldtoa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-sckt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libm2pim_la-target.Plo@am__quote@ # am--include-marker @@ -722,12 +722,12 @@ libm2pim_la-wrapc.lo: wrapc.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libm2pim_la_CFLAGS) $(CFLAGS) -c -o libm2pim_la-wrapc.lo `test -f 'wrapc.c' || echo '$(srcdir)/'`wrapc.c -libm2pim_la-getopt.lo: getopt.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libm2pim_la_CFLAGS) $(CFLAGS) -MT libm2pim_la-getopt.lo -MD -MP -MF $(DEPDIR)/libm2pim_la-getopt.Tpo -c -o libm2pim_la-getopt.lo `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libm2pim_la-getopt.Tpo $(DEPDIR)/libm2pim_la-getopt.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getopt.c' object='libm2pim_la-getopt.lo' libtool=yes @AMDEPBACKSLASH@ +libm2pim_la-cgetopt.lo: cgetopt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libm2pim_la_CFLAGS) $(CFLAGS) -MT libm2pim_la-cgetopt.lo -MD -MP -MF $(DEPDIR)/libm2pim_la-cgetopt.Tpo -c -o libm2pim_la-cgetopt.lo `test -f 'cgetopt.c' || echo '$(srcdir)/'`cgetopt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libm2pim_la-cgetopt.Tpo $(DEPDIR)/libm2pim_la-cgetopt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cgetopt.c' object='libm2pim_la-cgetopt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libm2pim_la_CFLAGS) $(CFLAGS) -c -o libm2pim_la-getopt.lo `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libm2pim_la_CFLAGS) $(CFLAGS) -c -o libm2pim_la-cgetopt.lo `test -f 'cgetopt.c' || echo '$(srcdir)/'`cgetopt.c mostlyclean-libtool: -rm -f *.lo @@ -837,9 +837,9 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/libm2pim_la-Selective.Plo -rm -f ./$(DEPDIR)/libm2pim_la-SysExceptions.Plo -rm -f ./$(DEPDIR)/libm2pim_la-UnixArgs.Plo + -rm -f ./$(DEPDIR)/libm2pim_la-cgetopt.Plo -rm -f ./$(DEPDIR)/libm2pim_la-dtoa.Plo -rm -f ./$(DEPDIR)/libm2pim_la-errno.Plo - -rm -f ./$(DEPDIR)/libm2pim_la-getopt.Plo -rm -f ./$(DEPDIR)/libm2pim_la-ldtoa.Plo -rm -f ./$(DEPDIR)/libm2pim_la-sckt.Plo -rm -f ./$(DEPDIR)/libm2pim_la-target.Plo @@ -893,9 +893,9 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libm2pim_la-Selective.Plo -rm -f ./$(DEPDIR)/libm2pim_la-SysExceptions.Plo -rm -f ./$(DEPDIR)/libm2pim_la-UnixArgs.Plo + -rm -f ./$(DEPDIR)/libm2pim_la-cgetopt.Plo -rm -f ./$(DEPDIR)/libm2pim_la-dtoa.Plo -rm -f ./$(DEPDIR)/libm2pim_la-errno.Plo - -rm -f ./$(DEPDIR)/libm2pim_la-getopt.Plo -rm -f ./$(DEPDIR)/libm2pim_la-ldtoa.Plo -rm -f ./$(DEPDIR)/libm2pim_la-sckt.Plo -rm -f ./$(DEPDIR)/libm2pim_la-target.Plo