Daily bump.
[official-gcc.git] / gcc / m2 / ChangeLog
blobed51728aa31e11f81a4df8f2c31b2488825960cf
1 2024-03-08  Gaius Mulley  <gaiusmod2@gmail.com>
3         * gm2-compiler/M2Quads.mod (Init): Use InitIndexTuned with
4         default size 65K.
5         * gm2-compiler/SymbolConversion.mod (Init): Ditto.
6         * gm2-compiler/SymbolTable.mod (BEGIN): Ditto.
7         * mc-boot/GM2Dependent.cc: Rebuild.
8         * mc-boot/GM2Dependent.h: Rebuild.
9         * mc-boot/GM2RTS.cc: Rebuild.
10         * pge-boot/GIndexing.cc: Rebuild.
11         * pge-boot/GIndexing.h: Rebuild.
12         * pge-boot/GM2Dependent.cc: Rebuild.
13         * pge-boot/GM2Dependent.h: Rebuild.
14         * pge-boot/GM2RTS.cc: Rebuild.
16 2024-03-07  Gaius Mulley  <gaiusmod2@gmail.com>
18         PR modula2/109969
19         * gm2-compiler/M2LexBuf.def (TokenToLineNo): Rename parameter.
20         (TokenToColumnNo): Rename parameter.
21         (TokenToLocation): Rename parameter.
22         (FindFileNameFromToken): Rename parameter.
23         (DumpTokens): Rewrite comment.
24         * gm2-compiler/M2LexBuf.mod: Rewrite.
25         * gm2-compiler/P0SyntaxCheck.bnf (CheckInsertCandidate):
26         DumpTokens before and after inserting recovery token.
27         * gm2-gcc/m2builtins.cc (do_target_support_exists): Add
28         bf_c99_compl case.
29         * gm2-libs/Indexing.def (InitIndexTuned): New procedure
30         function.
31         (IsEmpty): New procedure function.
32         * gm2-libs/Indexing.mod (InitIndexTuned): New procedure
33         function.
34         (IsEmpty): New procedure function.
35         (Index): New field GrowFactor.
36         (PutIndice): Use GrowFactor to extend dynamic array.
38 2024-03-04  Gaius Mulley  <gaiusmod2@gmail.com>
40         PR modula2/114227
41         * gm2-libs-iso/M2RTS.mod (ProcedureChain): Remove.
42         (ProcedureList): Remove.
43         (ExecuteReverse): Remove.
44         (ExecuteTerminationProcedures): Rewrite.
45         (ExecuteInitialProcedures): Rewrite.
46         (AppendProc): Remove.
47         (InstallTerminationProcedure): Rewrite.
48         (InstallInitialProcedure): Rewrite.
49         (InitProcList): Remove.
50         * gm2-libs/M2Dependent.def (InstallTerminationProcedure):
51         New procedure.
52         (ExecuteTerminationProcedures): New procedure.
53         (InstallInitialProcedure): New procedure.
54         (ExecuteInitialProcedures): New procedure.
55         * gm2-libs/M2Dependent.mod (ProcedureChain): New type.
56         (ProcedureList): New type.
57         (ExecuteReverse): New procedure.
58         (ExecuteTerminationProcedures): New procedure.
59         (ExecuteInitialProcedures): New procedure.
60         (AppendProc): New procedure.
61         (InstallTerminationProcedure): New procedure.
62         (InstallInitialProcedure): New procedure.
63         (InitProcList): New procedure.
64         * gm2-libs/M2RTS.mod (ProcedureChain): Remove.
65         (ProcedureList): Remove.
66         (ExecuteReverse): Remove.
67         (ExecuteTerminationProcedures): Rewrite.
68         (ExecuteInitialProcedures): Rewrite.
69         (AppendProc): Remove.
70         (InstallTerminationProcedure): Rewrite.
71         (InstallInitialProcedure): Rewrite.
72         (InitProcList): Remove.
74 2024-02-25  Gaius Mulley  <gaiusmod2@gmail.com>
76         PR modula2/113749
77         * Make-lang.in (BUILD-PGE-O): Add m2/pge-boot/Gwrapc.o.
78         * gm2-libs-ch/wrapc.c (wrapc_SeekSet): New function.
79         (wrapc_SeekEnd): Ditto.
80         (wrapc_ReadOnly): Ditto.
81         (wrapc_WriteOnly): Ditto.
82         * gm2-libs/FIO.mod (SEEK_SET): Remove.
83         (SEEK_END): Remove.
84         (UNIXREADONLY): Remove.
85         (UNIXWRITEONLY): Remove.
86         (ConnectToUnix): Replace UNIXWRITEONLY with a call to WriteOnly.
87         Replace UNIXREADONLY with a call to ReadOnly.
88         (SetPositionFromBeginning): Replace SEEK_SET with a call to
89         SeekSet.
90         (SetPositionFromEnd): Replace SEEK_END with a call to
91         SeekEnd.
92         * gm2-libs/wrapc.def (SeekSet): New procedure function.
93         (SeekEnd): New procedure function.
94         (ReadOnly): New procedure function.
95         (WriteOnly): New procedure function.
96         * mc-boot-ch/Glibc.c (BUILD_MC_LIBC_TRACE): Undef.
97         (check_init): New function.
98         (tracedb): Ditto.
99         (tracedb_open): Ditto.
100         (tracedb_result): Ditto.
101         (libc_read): Ditto.
102         (libc_write): Ditto.
103         (libc_close): Ditto.
104         (libc_creat): Ditto.
105         (libc_open): Ditto.
106         (libc_lseek): Ditto.
107         * mc-boot-ch/Gwrapc.c (wrapc_SeekSet): New function.
108         (wrapc_SeekEnd): Ditto.
109         (wrapc_ReadOnly): Ditto.
110         (wrapc_WriteOnly): Ditto.
111         * mc-boot/GDynamicStrings.cc: Rebuilt.
112         * mc-boot/GFIO.cc: Ditto.
113         * mc-boot/GIndexing.cc: Ditto.
114         * mc-boot/GM2Dependent.cc: Ditto.
115         * mc-boot/GM2EXCEPTION.cc: Ditto.
116         * mc-boot/GPushBackInput.cc: Ditto.
117         * mc-boot/GRTExceptions.cc: Ditto.
118         * mc-boot/GRTint.cc: Ditto.
119         * mc-boot/GSArgs.cc: Ditto.
120         * mc-boot/GStdIO.cc: Ditto.
121         * mc-boot/GStringConvert.cc: Ditto.
122         * mc-boot/GSysStorage.cc: Ditto.
123         * mc-boot/Gdecl.cc: Ditto.
124         * mc-boot/Gkeyc.cc: Ditto.
125         * mc-boot/Glibc.h: Ditto.
126         * mc-boot/GmcComment.cc: Ditto.
127         * mc-boot/GmcComp.cc: Ditto.
128         * mc-boot/GmcDebug.cc: Ditto.
129         * mc-boot/GmcMetaError.cc: Ditto.
130         * mc-boot/GmcStack.cc: Ditto.
131         * mc-boot/GmcStream.cc: Ditto.
132         * mc-boot/GnameKey.cc: Ditto.
133         * mc-boot/GsymbolKey.cc: Ditto.
134         * mc-boot/Gvarargs.cc: Ditto.
135         * mc-boot/Gwrapc.h: Ditto.
136         * mc/decl.mod (getSymName): Add pointerref clause.
137         * mc/mcStream.mod (copy): Check for an error after every read.
138         * mc/varargs.mod (copy): Rewrite pointer arithmetic using INC to
139         avoid type incompatibility.
140         * pge-boot/GDynamicStrings.cc: Rebuilt.
141         * pge-boot/GDynamicStrings.h: Ditto.
142         * pge-boot/GFIO.cc: Ditto.
143         * pge-boot/GFIO.h: Ditto.
144         * pge-boot/GIO.cc: Ditto.
145         * pge-boot/GIndexing.cc: Ditto.
146         * pge-boot/GM2Dependent.cc: Ditto.
147         * pge-boot/GM2EXCEPTION.cc: Ditto.
148         * pge-boot/GNameKey.cc: Ditto.
149         * pge-boot/GPushBackInput.cc: Ditto.
150         * pge-boot/GRTExceptions.cc: Ditto.
151         * pge-boot/GStdIO.cc: Ditto.
152         * pge-boot/GSymbolKey.cc: Ditto.
153         * pge-boot/GSysStorage.cc: Ditto.
154         * pge-boot/Glibc.h: Ditto.
155         * pge-boot/Gwrapc.cc: Ditto.
156         * pge-boot/Gwrapc.h: Ditto.
158 2024-02-22  Gaius Mulley  <gaiusmod2@gmail.com>
160         PR modula2/114055
161         * gm2-compiler/M2Check.mod (Import): IsConstLitInternal and
162         IsConstLit.
163         (isInternal): New procedure function.
164         (doCheck): Test for isInternal in either operand and early
165         return true.
166         * gm2-compiler/M2Quads.mod (PushOne): Rewrite with extra
167         parameter internal.
168         (BuildPseudoBy): Add TRUE parameter to PushOne call.
169         (BuildIncProcedure): Add FALSE parameter to PushOne call.
170         (BuildDecProcedure): Add FALSE parameter to PushOne call.
171         * gm2-compiler/M2Range.mod (ForLoopBeginTypeCompatible):
172         Uncomment code and tidy up error string.
173         * gm2-compiler/SymbolTable.def (PutConstLitInternal):
174         New procedure.
175         (IsConstLitInternal): New procedure function.
176         * gm2-compiler/SymbolTable.mod (PutConstLitInternal):
177         New procedure.
178         (IsConstLitInternal): New procedure function.
179         (SymConstLit): New field IsInternal.
180         (CreateConstLit): Initialize IsInternal to FALSE.
182 2024-02-21  Gaius Mulley  <gaiusmod2@gmail.com>
184         PR modula2/114026
185         * gm2-compiler/M2GenGCC.mod (Import): Remove DisplayQuadruples.
186         Remove DisplayQuadList.
187         (MixTypesBinary): Replace check with overflowCheck.
188         New variable typeChecking.
189         Use GenQuadOTypetok to retrieve typeChecking.
190         Use typeChecking to suppress error message.
191         * gm2-compiler/M2LexBuf.def (MakeVirtual2Tok): New procedure
192         function.
193         * gm2-compiler/M2LexBuf.mod (MakeVirtualTok): Improve comment.
194         (MakeVirtual2Tok): New procedure function.
195         * gm2-compiler/M2Quads.def (GetQuadOTypetok): New procedure.
196         * gm2-compiler/M2Quads.mod (QuadFrame): New field CheckType.
197         (PutQuadO): Rewrite using PutQuadOType.
198         (PutQuadOType): New procedure.
199         (GetQuadOTypetok): New procedure.
200         (BuildPseudoBy): Rewrite.
201         (BuildForToByDo): Remove type checking.
202         Add parameters e2, e2tok, BySym, bytok to
203         InitForLoopBeginRange.
204         Push the RangeId.
205         (BuildEndFor): Pop the RangeId.
206         Use GenQuadOTypetok to generate AddOp without type checking.
207         Call PutRangeForIncrement with the RangeId and IncQuad.
208         (GenQuadOtok): Rewrite using GenQuadOTypetok.
209         (GenQuadOTypetok): New procedure.
210         * gm2-compiler/M2Range.def (InitForLoopBeginRangeCheck):
211         Rename d as des, e as expr.
212         Add expr1, expr1tok, expr2, expr2tok, byconst, byconsttok
213         parameters.
214         (PutRangeForIncrement): New procedure.
215         * gm2-compiler/M2Range.mod (Import): MakeVirtual2Tok.
216         (Range): Add expr2, byconst, destok, exprtok, expr2tok,
217         incrementquad.
218         (InitRange): Initialize expr2 to NulSym.
219         Initialize byconst to NulSym.
220         Initialize tokenNo, destok, exprtok, expr2tok, byconst to
221         UnknownTokenNo.
222         Initialize incrementquad to 0.
223         (PutRangeForIncrement): New procedure.
224         (PutRangeDesExpr2): New procedure.
225         (InitForLoopBeginRangeCheck): Rewrite.
226         (ForLoopBeginTypeCompatible): New procedure function.
227         (CodeForLoopBegin): Call ForLoopBeginTypeCompatible and
228         only code the for loop assignment if all the type checks
229         succeed.
231 2024-02-19  Gaius Mulley  <gaiusmod2@gmail.com>
233         PR modula2/113889
234         * gm2-compiler/M2ALU.mod (StringFitsArray): Add tokeno parameter
235         to GetStringLength.
236         (InitialiseArrayOfCharWithString): Add tokeno parameter to
237         GetStringLength.
238         (CheckGetCharFromString): Add tokeno parameter to GetStringLength.
239         * gm2-compiler/M2Const.mod (constResolveViaMeta): Replace
240         PutConstString with PutConstStringKnown.
241         * gm2-compiler/M2GCCDeclare.mod (DeclareCharConstant): Add tokenno
242         parameter and add assert.  Use tokenno to generate location.
243         (DeclareStringConstant): Add tokenno and add asserts.
244         Add tokenno parameter to calls to GetStringLength.
245         (PromoteToString): Add assert and add tokenno parameter to
246         GetStringLength.
247         (PromoteToCString): Add assert and add tokenno parameter to
248         GetStringLength.
249         (DeclareConstString): New procedure function.
250         (TryDeclareConst): Remove size local variable.
251         Check IsConstStringKnown.
252         Call DeclareConstString.
253         (PrintString): New procedure.
254         (PrintVerboseFromList): Call PrintString.
255         (CheckResolveSubrange): Check IsConstStringKnown before creating
256         subrange for char or issuing an error.
257         * gm2-compiler/M2GenGCC.mod (ResolveConstantExpressions): Add
258         StringLengthOp, StringConvertM2nulOp, StringConvertCnulOp case
259         clauses.
260         (FindSize): Add assert IsConstStringKnown.
261         (StringToChar): New variable tokenno.
262         Add tokenno parameter to GetStringLength.
263         (FoldStringLength): New procedure.
264         (FoldStringConvertM2nul): New procedure.
265         (FoldStringConvertCnul): New procedure.
266         (CodeAddr): Add tokenno parameter.
267         Replace CurrentQuadToken with tokenno.
268         Add tokenno parameter to GetStringLength.
269         (PrepareCopyString): Rewrite.
270         (IsConstStrKnown): New procedure function.
271         (FoldAdd): Detect conststring op2 and op3 which are known and
272         concat.  Place result into op1.
273         (FoldStandardFunction): Pass tokenno as a parameter to
274         GetStringLength.
275         (CodeXIndr): Rewrite comment.
276         Rename op1 to left, op3 to right.
277         Pass rightpos to GetStringLength.
278         * gm2-compiler/M2Quads.def (QuadrupleOp): Add
279         StringConvertCnulOp, StringConvertM2nulOp and StringLengthOp.
280         * gm2-compiler/M2Quads.mod (import): Remove MakeConstLitString.
281         Add CopyConstString and PutConstStringKnown.
282         (IsInitialisingConst): Add StringConvertCnulOp,
283         StringConvertM2nulOp and StringLengthOp.
284         (callRequestDependant): Replace MakeConstLitString with
285         MakeConstString.
286         (DeferMakeConstStringCnul): New procedure function.
287         (DeferMakeConstStringM2nul): New procedure function.
288         (CheckParameter): Add early return if the string const is unknown.
289         (DescribeType): Add token parameter to GetStringLength.
290         Check for IsConstStringKnown.
291         (ManipulateParameters): Use DeferMakeConstStringCnul and
292         DeferMakeConstStringM2nul.
293         (MakeLengthConst): Remove and replace with...
294         (DeferMakeLengthConst): ... this.
295         (doBuildBinaryOp): Create ConstString and set it to contents
296         unknown.
297         Check IsConstStringKnown before generating error message.
298         (WriteQuad): Add StringConvertCnulOp, StringConvertM2nulOp and
299         StringLengthOp.
300         (WriteOperator): Add StringConvertCnulOp, StringConvertM2nulOp and
301         StringLengthOp.
302         * gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Add
303         StringConvertCnulOp, StringConvertM2nulOp and StringLengthOp.
304         * gm2-compiler/NameKey.mod (LengthKey): Allow NulName to return 0.
305         * gm2-compiler/P2SymBuild.mod (BuildString): Replace
306         MakeConstLitString with MakeConstString.
307         (DetermineType): Replace PutConstString with PutConstStringKnown.
308         * gm2-compiler/SymbolTable.def (MakeConstVar): Tidy up comment.
309         (MakeConstLitString): Remove.
310         (MakeConstString): New procedure function.
311         (MakeConstStringCnul): New procedure function.
312         (MakeConstStringM2nul): New procedure function.
313         (PutConstStringKnown): New procedure.
314         (CopyConstString): New procedure.
315         (IsConstStringKnown): New procedure function.
316         (IsConstStringM2): New procedure function.
317         (IsConstStringC): New procedure function.
318         (IsConstStringM2nul): New procedure function.
319         (IsConstStringCnul): New procedure function.
320         (GetStringLength): Add token parameter.
321         (PutConstString): Remove.
322         (GetConstStringM2): Remove.
323         (GetConstStringC): Remove.
324         (GetConstStringM2nul): Remove.
325         (GetConstStringCnul): Remove.
326         (MakeConstStringC): Remove.
327         * gm2-compiler/SymbolTable.mod (SymConstString): Remove
328         M2Variant, NulM2Variant, CVariant, NulCVariant.
329         Add Known.
330         (CheckAnonymous): Replace $$ with __anon.
331         (IsNameAnonymous): Replace $$ with __anon.
332         (MakeConstVar): Detect whether the name is nul and treat as
333         a temporary constant.
334         (MakeConstLitString): Remove.
335         (BackFillString): Remove.
336         (InitConstString): Rewrite.
337         (GetConstStringM2): Remove.
338         (GetConstStringC): Remove.
339         (GetConstStringContent): New procedure function.
340         (GetConstStringM2nul): Remove.
341         (GetConstStringCnul): Remove.
342         (MakeConstStringCnul): Rewrite.
343         (MakeConstStringM2nul): Rewrite.
344         (MakeConstStringC): Remove.
345         (MakeConstString): Rewrite.
346         (PutConstStringKnown): New procedure.
347         (CopyConstString): New procedure.
348         (PutConstString): Remove.
349         (IsConstStringKnown): New procedure function.
350         (IsConstStringM2): New procedure function.
351         (IsConstStringC): Rewrite.
352         (IsConstStringM2nul): Rewrite.
353         (IsConstStringCnul): Rewrite.
354         (GetConstStringKind): New procedure function.
355         (GetString): Check Known.
356         (GetStringLength): Add token parameter and check Known.
358 2024-02-10  Gaius Mulley  <gaiusmod2@gmail.com>
360         PR modula2/113848
361         * gm2-libs/SArgs.mod (GetArg): Re-write address arithmetic
362         to avoid (void *) computation.
364 2024-02-03  Gaius Mulley  <gaiusmod2@gmail.com>
366         PR modula2/113730
367         * gm2-compiler/M2Base.mod (IsUserType): New procedure function.
368         (MixTypes): Use IsUserType instead of IsType before calling MixTypes.
369         * gm2-compiler/M2GenGCC.mod (GetTypeMode): Remove and import from
370         SymbolTable.
371         (CodeBinaryCheck): Replace call to MixTypes with MixTypesBinary.
372         (CodeBinary): Replace call to MixTypes with MixTypesBinary.
373         (CodeIfLess): Replace MixTypes with ComparisonMixTypes.
374         (CodeIfGre): Replace MixTypes with ComparisonMixTypes.
375         (CodeIfLessEqu): Replace MixTypes with ComparisonMixTypes.
376         (CodeIfGreEqu): Replace MixTypes with ComparisonMixTypes.
377         (CodeIfEqu): Replace MixTypes with ComparisonMixTypes.
378         (CodeIfNotEqu): Replace MixTypes with ComparisonMixTypes.
379         (ComparisonMixTypes): New procedure function.
380         * gm2-compiler/M2Quads.mod (BuildEndFor): Replace GenQuadO
381         with GenQuadOtok and pass tokenpos for the operands to the AddOp
382         and XIndrOp.
383         (CheckRangeIncDec): Check etype against NulSym and dtype for a
384         pointer and set etype to Address.
385         (BuildAddAdrFunction): New variable opa.  Convert operand to an
386         address and save result in opa.  Replace GenQuad with GenQuadOtok.
387         (BuildSubAdrFunction): New variable opa.  Convert operand to an
388         address and save result in opa.  Replace GenQuad with GenQuadOtok.
389         (BuildDiffAdrFunction): New variable opa.  Convert operand to an
390         address and save result in opa.  Replace GenQuad with GenQuadOtok.
391         (calculateMultipicand): Replace GenQuadO with GenQuadOtok.
392         (ConvertToAddress): New procedure function.
393         (BuildDynamicArray): Convert index to address before adding to
394         the base.
395         * gm2-compiler/SymbolTable.def (GetTypeMode): New procedure function.
396         * gm2-compiler/SymbolTable.mod (GetTypeMode): New procedure
397         function implemented (moved from M2GenGCC.mod).
398         * gm2-libs/SArgs.mod (GetArg): Replace cast to PtrToChar with ADDRESS.
400 2024-02-01  Gaius Mulley  <gaiusmod2@gmail.com>
402         PR modula2/111627
403         PR modula2/112506
404         * gm2-compiler/M2Comp.mod (Pass0CheckMod): Test IsDefImp before
405         checking IsDefinitionForC.
407 2024-01-31  Gaius Mulley  <gaiusmod2@gmail.com>
409         * gm2-compiler/M2Comp.mod (Pass0CheckMod): Tidy up comment.
410         * gm2-compiler/P1Build.bnf (PossiblyExportIdent): Replace
411         PushTF with PushTFtok.
413 2024-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
415         * gm2-compiler/M2Check.mod (dumpIndice): New procedure.
416         (dumpIndex): New procedure.
417         (dumptInfo): New procedure.
418         (buildError4): Add comment and pass formal and actual to
419         MetaError4.  Improve text describing error.
420         (buildError2): Generate different error descriptions for
421         the three error kinds.
422         (checkConstMeta): Add block comment.  Add more meta checks
423         and call doCheckPair to complete string const checking.
424         Add tinfo parameter.
425         (checkConstEquivalence): Add tinfo parameter.
426         * gm2-compiler/M2GCCDeclare.mod (PrintVerboseFromList):
427         Print the length of a const string.
428         * gm2-compiler/M2GenGCC.mod (CodeParam): Remove parameters
429         op1, op2 and op3.
430         (doParam): Add paramtok parameter.  Use paramtok instead rather
431         than CurrentQuadToken.
432         (CodeParam): Rewrite.
433         * gm2-compiler/M2Quads.mod (CheckProcedureParameters):
434         Add comments explaining that const strings are not checked
435         in M2Quads.mod.
436         (FailParameter): Use MetaErrorT2 with tokpos rather than
437         MetaError2.
438         (doBuildBinaryOp): Assign OldPos and OperatorPos before the
439         IF block.
440         * gm2-compiler/SymbolTable.mod (PutConstString): Add call to
441         InitWhereDeclaredTok.
443 2024-01-25  Gaius Mulley  <gaiusmod2@gmail.com>
445         * gm2-libs/libc.def (lseek): Change the second parameter
446         type to CSSIZE_T and make the return value optional.
448 2024-01-24  Gaius Mulley  <gaiusmod2@gmail.com>
450         PR modula2/113559
451         * gm2-libs/FIO.mod (SetPositionFromBeginning): Convert pos into
452         CSSIZE_T during call to lseek.
453         (SetPositionFromEnd): Convert pos into CSSIZE_T during call to
454         lseek.
456 2024-01-23  H.J. Lu  <hjl.tools@gmail.com>
458         PR bootstrap/113554
459         * mc/mc.flex (alloca): Don't redefine.
460         (handleDate): Replace (long *)0 with (time_t *)0 when calling
461         time.
463 2024-01-19  Gaius Mulley  <gaiusmod2@gmail.com>
465         * gm2-compiler/M2BasicBlock.mod (InitBasicBlocks): Rename
466         ForeachScopeBlockDo to ForeachScopeBlockDo3.
467         * gm2-compiler/M2Code.mod: Import ForeachScopeBlockDo2.
468         (OptimizeScopeBlock): Call ForeachScopeBlockDo3 for
469         procedures with three parameters and ForeachScopeBlockDo2
470         for two parameters.
471         (CodeBlock): Ditto.
472         * gm2-compiler/M2GCCDeclare.mod (DeclareTypesConstantsProcedures):
473         Rename ForeachScopeBlockDo to ForeachScopeBlockDo3.
474         * gm2-compiler/M2GenGCC.def (ConvertQuadsToTree): Remove Scope
475         parameter.
476         * gm2-compiler/M2GenGCC.mod (ConvertQuadsToTree): Remove Scope
477         parameter.
478         (MaybeDebugBuiltinMemcpy): Remove parameter tok.
479         (MaybeDebugBuiltinMemset): Remove.
480         (MakeCopyUse): Remove tokenno from call to
481         MaybeDebugBuiltinMemcpy.
482         (PerformFoldBecomes): Remove desloc and exprloc.
483         (checkArrayElements): Remove location.  Remove virtpos
484         as a parameter to MaybeDebugBuiltinMemcpy.
485         (NoWalkProcedure): Add attribute unused.
486         (CheckElementSetTypes): Remove parameter p.
487         Remove CurrentQuadToken in call to MaybeDebugBuiltinMemcpy.
488         Remove NoWalkProcedure from call to CheckElementSetTypes.
489         Remove tokenno from call to MaybeDebugBuiltinMemcpy.
490         * gm2-compiler/M2Optimize.mod (RemoveProcedures): Replace
491         two parameter indirect procedure iterator with
492         ForeachScopeBlockDo2.
493         * gm2-compiler/M2SSA.mod: Remove ForeachScopeBlockDo.
494         * gm2-compiler/M2Scope.def (ForeachScopeBlockDo2): New
495         declaration.
496         (ForeachScopeBlockDo): Rename ...
497         (ForeachScopeBlockDo3): ... to this.
498         (ScopeProcedure2): New declaration.
499         * gm2-compiler/M2Scope.mod (ForeachScopeBlockDo2): New
500         procedure.
501         (ForeachScopeBlockDo): Rename ...
502         (ForeachScopeBlockDo3): ... to this.
504 2024-01-18  Gaius Mulley  <gaiusmod2@gmail.com>
506         PR modula2/111956
507         * Make-lang.in (host_mc_longreal): Remove.
508         * configure: Regenerate.
509         * configure.ac (M2C_LONGREAL_FLOAT128): Remove.
510         (M2C_LONGREAL_PPC64LE): Remove.
511         * gm2-compiler/M2Options.def (SetIBMLongDouble): New procedure.
512         (GetIBMLongDouble): New procedure function.
513         (SetIEEELongDouble): New procedure.
514         (GetIEEELongDouble): New procedure function.
515         * gm2-compiler/M2Options.mod (SetIBMLongDouble): New procedure.
516         (GetIBMLongDouble): New procedure function.
517         (SetIEEELongDouble): New procedure.
518         (GetIEEELongDouble): New procedure function.
519         (InitializeLongDoubleFlags): New procedure called during
520         module block initialization.
521         * gm2-gcc/m2configure.cc: Remove duplicate includes.
522         (m2configure_M2CLongRealFloat128): Remove.
523         (m2configure_M2CLongRealIBM128): Remove.
524         (m2configure_M2CLongRealLongDouble): Remove.
525         (m2configure_M2CLongRealLongDoublePPC64LE): Remove.
526         (m2configure_TargetIEEEQuadDefault): New function.
527         * gm2-gcc/m2configure.def (M2CLongRealFloat128): Remove.
528         (M2CLongRealIBM128): Remove.
529         (M2CLongRealLongDouble): Remove.
530         (M2CLongRealLongDoublePPC64LE): Remove.
531         (TargetIEEEQuadDefault): New function.
532         * gm2-gcc/m2configure.h (m2configure_M2CLongRealFloat128): Remove.
533         (m2configure_M2CLongRealIBM128): Remove.
534         (m2configure_M2CLongRealLongDouble): Remove.
535         (m2configure_M2CLongRealLongDoublePPC64LE): Remove.
536         (m2configure_TargetIEEEQuadDefault): New function.
537         * gm2-gcc/m2options.h (M2Options_SetIBMLongDouble): New prototype.
538         (M2Options_GetIBMLongDouble): New prototype.
539         (M2Options_SetIEEELongDouble): New prototype.
540         (M2Options_GetIEEELongDouble): New prototype.
541         * gm2-gcc/m2type.cc (build_m2_long_real_node): Re-implement using
542         results of M2Options_GetIBMLongDouble and M2Options_GetIEEELongDouble.
543         * gm2-lang.cc (gm2_langhook_handle_option): Add case
544         OPT_mabi_ibmlongdouble and call M2Options_SetIBMLongDouble.
545         Add case OPT_mabi_ieeelongdouble and call M2Options_SetIEEELongDouble.
546         * gm2config.aci.in: Regenerate.
547         * gm2spec.cc (lang_specific_driver): Remove block defined by
548         M2C_LONGREAL_PPC64LE.
549         Remove case OPT_mabi_ibmlongdouble.
550         Remove case OPT_mabi_ieeelongdouble.
552 2024-01-11  Gaius Mulley  <gaiusmod2@gmail.com>
554         PR modula2/112946
555         * gm2-compiler/M2GenGCC.mod (IsExpressionCompatible): Import.
556         (ExpressionTypeCompatible): Import.
557         (CodeStatement): Remove op1, op2, op3 parameters from CodeSetOr,
558         CodeSetAnd, CodeSetSymmetricDifference, CodeSetLogicalDifference.
559         (checkArrayElements): Rename op1 to des and op3 to expr.
560         Use despos and exprpos instead of CurrentQuadToken.
561         (checkRecordTypes): Rename op1 to des and op2 to expr.
562         Use virtpos instead of CurrentQuadToken.
563         (checkIncorrectMeta): Ditto.
564         (checkBecomes): Rename op1 to des and op3 to expr.
565         Use virtpos instead of CurrentQuadToken.
566         (NoWalkProcedure): New procedure stub.
567         (CheckBinaryExpressionTypes): New procedure function.
568         (CheckElementSetTypes): New procedure function.
569         (CodeBinarySet): Re-write.
570         (FoldBinarySet): Re-write.
571         (CodeSetOr): Remove parameters op1, op2 and op3.
572         (CodeSetAnd): Ditto.
573         (CodeSetLogicalDifference): Ditto.
574         (CodeSetSymmetricDifference): Ditto.
575         (CodeIfIn): Call CheckBinaryExpressionTypes and
576         CheckElementSetTypes.
577         * gm2-compiler/M2Quads.mod (BuildRotateFunction): Correct
578         parameters to MakeVirtualTok to reflect parameter block
579         passed to Rotate.
581 2024-01-09  Gaius Mulley  <gaiusmod2@gmail.com>
583         PR modula2/112920
584         * gm2-compiler/M2GCCDeclare.mod (Group): New declaration.
585         Import MakeSubrange, MakeConstVar, MakeConstLit and DivTrunc.
586         (FreeGroup): New declaration.
587         (GlobalGroup): New declaration.
588         (ToBeSolvedByQuads): Remove.
589         (NilTypedArrays): Remove.
590         (PartiallyDeclared): Remove.
591         (HeldByAlignment): Remove.
592         (FinishedAlignment): Remove.
593         (ToDoList): Remove.
594         (DebugSet): Re-format.
595         (DebugNumber): Re-format.
596         (DebugSetNumbers): Reference sets using GlobalGroup.
597         (AddSymToWatch): Re-format.
598         (WatchIncludeList): Reference sets using GlobalGroup.
599         (WatchRemoveList): Reference sets using GlobalGroup.
600         (NewGroup): New procedure.
601         (DisposeGroup): New procedure.
602         (InitGroup): New procedure.
603         (KillGroup): New procedure.
604         (DupGroup): New procedure.
605         (EqualGroup): New procedure.
606         (LookupSet): New procedure.
607         (CanDeclareTypePartially): Reference sets using GlobalGroup.
608         (CompletelyResolved): Reference sets using GlobalGroup.
609         (IsNilTypedArrays): Reference sets using GlobalGroup.
610         (IsFullyDeclared): Reference sets using GlobalGroup.
611         (IsPartiallyDeclared): Reference sets using GlobalGroup.
612         (IsPartiallyOrFullyDeclared): Reference sets using GlobalGroup.
613         (DeclareTypeConstFully): Reference sets using GlobalGroup.
614         (bodyl): Remove.
615         (Body): Use bodyt and to lookup the required set.
616         (ForeachTryDeclare): Remove parameter l.  Lookup set instead.
617         (DeclareOutstandingTypes): Add new rules setarraynul and setfully.
618         Reference sets using GlobalGroup.
619         (ActivateWatch): New procedure.
620         (DeclareTypesConstantsProceduresInRange): Re-written to check
621         group change.
622         (DeclareTypesConstantsProcedures): Re-written to check
623         group change.
624         (DeclareBoolean): Reference sets using GlobalGroup.
625         (DeclarePackedBoolean): Ditto.
626         (DeclareDefaultConstants): Ditto.
627         (FreeGroup): Initialized.
628         (GlobalGroup): Ditto.
629         * gm2-compiler/Sets.def (EqualSet): New procedure function.
630         Remove export qualified list of identifiers.
631         * gm2-compiler/Sets.mod (EqualSet): New procedure function.
633 2024-01-04  David Malcolm  <dmalcolm@redhat.com>
635         * lang.opt.urls: New file, autogenerated by
636         regenerate-opt-urls.py.
638 2023-12-15  Gaius Mulley  <gaiusmod2@gmail.com>
640         PR modula2/112946
641         * gm2-compiler/M2Check.mod (checkConstMeta): New procedure
642         function.
643         (checkConstEquivalence): New procedure function.
644         (doCheckPair): Add call to checkConstEquivalence.
645         * gm2-compiler/M2GenGCC.mod (ResolveConstantExpressions): Call
646         FoldBecomes with reduced parameters.
647         (FoldBecomes): Re-write.
648         (TryDeclareConst): New procedure.
649         (RemoveQuads): New procedure.
650         (DeclaredOperandsBecomes): New procedure function.
651         (TypeCheckBecomes): New procedure function.
652         (PerformFoldBecomes): New procedure.
653         * gm2-compiler/M2Range.mod (FoldAssignment): Call
654         AssignmentTypeCompatible to check des expr compatibility.
655         * gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Remove
656         parameter lst.
657         (FilterCheckReadBeforeInitQuad): Remove parameter lst.
658         (CheckReadBeforeInitFirstBasicBlock): Remove parameter lst.
659         Call FilterCheckReadBeforeInitQuad without lst.
661 2023-12-13  Gaius Mulley  <gaiusmod2@gmail.com>
663         PR modula2/112921
664         * gm2-libs-iso/ConvStringShort.def: New file.
665         * gm2-libs-iso/ConvStringShort.mod: New file.
666         * gm2-libs-iso/ShortConv.def: New file.
667         * gm2-libs-iso/ShortConv.mod: New file.
668         * gm2-libs-iso/ShortMath.def: New file.
669         * gm2-libs-iso/ShortMath.mod: New file.
670         * gm2-libs-iso/ShortStr.def: New file.
671         * gm2-libs-iso/ShortStr.mod: New file.
673 2023-12-12  Gaius Mulley  <gaiusmod2@gmail.com>
675         PR modula2/112984
676         * gm2-libs-coroutines/SYSTEM.mod: Remove redundant import of memcpy.
677         * gm2-libs-iso/ClientSocket.mod: Remove redundant import of IOConsts.
678         * gm2-libs-iso/IOChan.mod: Remove redundant import of IOConsts.
679         * gm2-libs-iso/IOLink.mod: Remove redundant import of IOChan and SYSTEM.
680         * gm2-libs-iso/IOResult.mod: Remove redundant import of IOChan.
681         * gm2-libs-iso/LongIO.mod: Remove redundant import of writeString.
682         * gm2-libs-iso/LongWholeIO.mod: Remove redundant import of IOChan.
683         * gm2-libs-iso/M2RTS.mod: Remove redundant import of ADDRESS.
684         * gm2-libs-iso/MemStream.mod: Remove redundant import of ADDRESS.
685         * gm2-libs-iso/RTdata.mod: Remove redundant import of DeviceTablePtr.
686         * gm2-libs-iso/RTfio.mod: Remove redundant import of DeviceTablePtr.
687         * gm2-libs-iso/RTgen.mod: Remove redundant import of DeviceTablePtr.
688         * gm2-libs-iso/RealIO.mod: Remove redundant import of writeString.
689         * gm2-libs-iso/RndFile.mod: Remove redundant import of SYSTEM.
690         * gm2-libs-iso/SYSTEM.mod: Remove redundant import of memcpy.
691         * gm2-libs-iso/ShortWholeIO.mod: Remove redundant import of IOConsts.
692         * gm2-libs-iso/TextIO.mod: Remove redundant import of IOChan.
693         * gm2-libs-iso/TextUtil.mod: Remove redundant import of IOChan.
694         * gm2-libs-iso/WholeIO.mod: Remove redundant import of IOChan.
695         * gm2-libs-log/BitByteOps.mod: Remove redundant import of BYTE.
696         * gm2-libs-log/FileSystem.mod: Remove redundant import of BYTE and ADDRESS.
697         * gm2-libs-log/InOut.mod: Remove redundant import of String.
698         * gm2-libs-log/RealConversions.mod: Remove redundant import of StringToLongreal.
699         * gm2-libs/FIO.mod: Remove redundant import of SIZE.
700         * gm2-libs/FormatStrings.mod: Remove redundant import of String
701         and ConCatChar.
702         * gm2-libs/IO.mod: Remove redundant import of SIZE.
703         * gm2-libs/Indexing.mod: Remove redundant import of ADDRESS.
704         * gm2-libs/M2Dependent.mod: Remove redundant import of SIZE.
705         * gm2-libs/M2RTS.mod: Remove redundant import of ADDRESS.
706         * gm2-libs/OptLib.mod: Remove redundant import of DynamicStrings.
707         * gm2-libs/SYSTEM.mod: Remove redundant import of memcpy.
708         * gm2-libs/StringConvert.mod: Remove redundant import of String.
710 2023-12-07  Gaius Mulley  <gaiusmod2@gmail.com>
712         PR modula2/112893
713         * gm2-compiler/M2Base.mod (Ass): Extend array to include proc row
714         and column.  Allow PIM to assign cardinal variables to address
715         variables.
716         (Expr): Ditto.
717         (Comp): Ditto.
718         * gm2-compiler/M2Check.mod (getSType): New procedure function.
719         Replace all occurances of GetSType with getSType.
720         * gm2-compiler/M2GenGCC.mod (CodeParam): Rewrite format specifier
721         error message.
722         * gm2-compiler/M2Quads.mod (CheckProcTypeAndProcedure): Add tokno
723         parameter.
724         * gm2-compiler/M2Range.def (InitTypesParameterCheck): Add tokno
725         parameter.
726         (InitParameterRangeCheck): Add tokno parameter.
727         Remove EXPORT QUALIFIED list.
728         (InitParameterRangeCheck): Add tokno parameter.
729         * gm2-compiler/M2Range.mod (InitTypesParameterCheck): Add tokno
730         parameter and pass tokno to PutRangeParam.
731         (InitParameterRangeCheck): Add tokno parameter and pass tokno to
732         PutRangeParam.
733         (PutRangeParam): Add tokno parameter and assign to tokenNo.
734         (FoldTypeParam): Rewrite format string.
736 2023-12-06  Thomas Schwinge  <thomas@codesourcery.com>
738         * lang.opt (-isysroot): New.
740 2023-12-05  Gaius Mulley  <gaiusmod2@gmail.com>
742         PR modula2/112865
743         * gm2-compiler/M2Quads.mod (BuildReFunction): Use
744         GetDType to retrieve the type of the operand when
745         converting the complex type to its scalar equivalent.
746         (BuildImFunction): Use GetDType to retrieve the type of the
747         operand when converting the complex type to its scalar
748         equivalent.
750 2023-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
752         * mc/mc.flex [__GNUC__]: Define alloca as __builtin_alloca.
753         (handleDate): Use strchr instead of index.
755 2023-12-04  Gaius Mulley  <gaiusmod2@gmail.com>
757         PR modula2/112825
758         * tools-src/makeSystem: Change all occurrences of -c to -S.
760 2023-11-01  Gaius Mulley  <gaiusmod2@gmail.com>
762         PR modula2/102989
763         * gm2-compiler/SymbolTable.mod (OverflowZType): Import from m2expr.
764         (ConstantStringExceedsZType): Remove import.
765         (GetConstLitType): Replace ConstantStringExceedsZType with OverflowZType.
766         * gm2-gcc/m2decl.cc (m2decl_ConstantStringExceedsZType): Remove.
767         (m2decl_BuildConstLiteralNumber): Re-write.
768         * gm2-gcc/m2decl.def (ConstantStringExceedsZType): Remove.
769         * gm2-gcc/m2decl.h (m2decl_ConstantStringExceedsZType): Remove.
770         * gm2-gcc/m2expr.cc (m2expr_StrToWideInt): Rewrite to check overflow.
771         (m2expr_OverflowZType): New function.
772         (ToWideInt): New function.
773         * gm2-gcc/m2expr.def (OverflowZType): New procedure function declaration.
774         * gm2-gcc/m2expr.h (m2expr_OverflowZType): New prototype.
776 2023-10-27  Gaius Mulley  <gaiusmod2@gmail.com>
778         PR modula2/111530
779         * gm2-libs-ch/cgetopt.c (cgetopt_cgetopt_long): Re-format.
780         (cgetopt_cgetopt_long_only): Re-format.
781         (cgetopt_SetOption):  Re-format and assign flag to NULL
782         if name is also NULL.
783         * gm2-libs/GetOpt.def (AddLongOption): Add index parameter
784         and change flag to be a VAR parameter rather than a pointer.
785         (GetOptLong): Re-format.
786         (GetOpt): Correct comment.
787         * gm2-libs/GetOpt.mod: Re-write to rely on cgetopt rather
788         than implement long option creation in GetOpt.
789         * gm2-libs/cgetopt.def (SetOption): has_arg type is INTEGER.
791 2023-10-25  Gaius Mulley  <gaiusmod2@gmail.com>
793         PR modula2/111955
794         * gm2-gcc/m2builtins.cc (gm2_isnan_node): New tree.
795         (DoBuiltinIsnan): New function.
796         (m2builtins_BuiltInIsnan): New function.
797         (m2builtins_init): Initialize gm2_isnan_node.
798         (list_of_builtins): Add define for __builtin_isnan.
799         * gm2-libs-ch/wrapc.c (wrapc_isnan): New function.
800         (wrapc_isnanf): New function.
801         (wrapc_isnanl): New function.
802         * gm2-libs/Builtins.def (isnanf): New procedure function.
803         (isnan): New procedure function.
804         (isnanl): New procedure function.
805         * gm2-libs/Builtins.mod:
806         * gm2-libs/wrapc.def (isnan): New function.
807         (isnanf): New function.
808         (isnanl): New function.
810 2023-10-24  Gaius Mulley  <gaiusmod2@gmail.com>
812         * gm2-libs/M2Dependent.mod (InitDependencyList): New
813         procedure.
814         (CreateModule): Call InitDependencyList to initialize
815         all fields of DependencyList.
817 2023-10-24  Gaius Mulley  <gaiusmod2@gmail.com>
819         * gm2-libs/M2Dependent.mod (CreateModule): Initialize all
820         dependency fields for DependencyList.
822 2023-10-17  Gaius Mulley  <gaiusmod2@gmail.com>
824         PR modula2/111756
825         * Make-lang.in (CM2DEP): New define conditionally set if
826         ($(CXXDEPMODE),depmode=gcc3).
827         (GM2_1): Use $(CM2DEP).
828         (m2/gm2-gcc/%.o): Ensure $(@D)/$(DEPDIR) is created.
829         Add $(CM2DEP) to the $(COMPILER) command and use $(POSTCOMPILE).
830         (m2/gm2-gcc/m2configure.o): Ditto.
831         (m2/gm2-lang.o): Ditto.
832         (m2/m2pp.o): Ditto.
833         (m2/gm2-gcc/rtegraph.o): Ditto.
834         (m2/mc-boot/$(SRC_PREFIX)%.o): Ditto.
835         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
836         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
837         (m2/mc-boot/main.o): Ditto.
838         (mcflex.o): Ditto.
839         (m2/gm2-libs-boot/M2RTS.o): Ditto.
840         (m2/gm2-libs-boot/%.o): Ditto.
841         (m2/gm2-libs-boot/%.o): Ditto.
842         (m2/gm2-libs-boot/RTcodummy.o): Ditto.
843         (m2/gm2-libs-boot/RTintdummy.o): Ditto.
844         (m2/gm2-libs-boot/wrapc.o): Ditto.
845         (m2/gm2-libs-boot/UnixArgs.o): Ditto.
846         (m2/gm2-libs-boot/choosetemp.o): Ditto.
847         (m2/gm2-libs-boot/errno.o): Ditto.
848         (m2/gm2-libs-boot/dtoa.o): Ditto.
849         (m2/gm2-libs-boot/ldtoa.o): Ditto.
850         (m2/gm2-libs-boot/termios.o): Ditto.
851         (m2/gm2-libs-boot/SysExceptions.o): Ditto.
852         (m2/gm2-libs-boot/SysStorage.o): Ditto.
853         (m2/gm2-compiler-boot/M2GCCDeclare.o): Ditto.
854         (m2/gm2-compiler-boot/M2Error.o): Ditto.
855         (m2/gm2-compiler-boot/%.o): Ditto.
856         (m2/gm2-compiler-boot/%.o): Ditto.
857         (m2/gm2-compiler-boot/m2flex.o): Ditto.
858         (m2/gm2-compiler/%.o): Ditto.
859         (m2/gm2-compiler/m2flex.o): Ditto.
860         (m2/gm2-libs-iso/%.o): Ditto.
861         (m2/gm2-libs/%.o): Ditto.
862         (m2/gm2-libs/%.o): Ditto.
863         (m2/gm2-libs/choosetemp.o): Ditto.
864         (m2/boot-bin/mklink$(exeext)): Ditto.
865         (m2/pge-boot/%.o): Ditto.
866         (m2/pge-boot/%.o): Ditto.
867         (m2/gm2-compiler/%.o): Ensure $(@D)/$(DEPDIR) is created and use
868         $(POSTCOMPILE).
869         (m2/gm2-compiler/%.o): Ditto.
870         (m2/gm2-libs-iso/%.o): Ditto.
871         (m2/gm2-libs/%.o): Ditto.
872         * README: Purge out of date info.
873         * gm2-compiler/M2Comp.mod (MakeSaveTempsFileNameExt): Import.
874         (OnExitDelete): Import.
875         (GetModuleDefImportStatementList): Import.
876         (GetModuleModImportStatementList): Import.
877         (GetImportModule): Import.
878         (IsImportStatement): Import.
879         (IsImport): Import.
880         (GetImportStatementList): Import.
881         (File): Import.
882         (Close): Import.
883         (EOF): Import.
884         (IsNoError): Import.
885         (WriteLine): Import.
886         (WriteChar): Import.
887         (FlushOutErr): Import.
888         (WriteS): Import.
889         (OpenToRead): Import.
890         (OpenToWrite): Import.
891         (ReadS): Import.
892         (WriteS): Import.
893         (GetM): Import.
894         (GetMM): Import.
895         (GetDepTarget): Import.
896         (GetMF): Import.
897         (GetMP): Import.
898         (GetObj): Import.
899         (GetMD): Import.
900         (GetMMD): Import.
901         (GenerateDefDependency): New procedure.
902         (GenerateDependenciesFromImport): New procedure.
903         (GenerateDependenciesFromList): New procedure.
904         (GenerateDependencies): New procedure.
905         (Compile): Re-write.
906         (compile): Re-format.
907         (CreateFileStem): New procedure function.
908         (DoPass0): Re-write.
909         (IsLibrary): New procedure function.
910         (IsUnique): New procedure function.
911         (Append): New procedure.
912         (MergeDep): New procedure.
913         (GetRuleTarget): New procedure function.
914         (ReadDepContents): New procedure function.
915         (WriteDep): New procedure.
916         (WritePhonyDep): New procedure.
917         (WriteDepContents): New procedure.
918         (CreateDepFilename): New procedure function.
919         (Pass0CheckDef): New procedure function.
920         (Pass0CheckMod): New procedure function.
921         (DoPass0): Re-write.
922         (DepContent): New variable.
923         (DepOutput): New variable.
924         (BaseName): New procedure function.
925         * gm2-compiler/M2GCCDeclare.mod (PrintTerse): Handle IsImport.
926         Replace IsGnuAsmVolatile with IsGnuAsm.
927         * gm2-compiler/M2Options.def (EXPORT QUALIFIED): Remove list.
928         (SetM): New procedure.
929         (GetM): New procedure function.
930         (SetMM): New procedure.
931         (GetMM): New procedure function.
932         (SetMF): New procedure.
933         (GetMF): New procedure function.
934         (SetPPOnly): New procedure.
935         (GetB): New procedure function.
936         (SetMD): New procedure.
937         (GetMD): New procedure function.
938         (SetMMD): New procedure.
939         (GetMMD): New procedure function.
940         (SetMQ): New procedure.
941         (SetMT): New procedure.
942         (GetMT): New procedure function.
943         (GetDepTarget): New procedure function.
944         (SetMP): New procedure.
945         (GetMP): New procedure function.
946         (SetObj): New procedure.
947         (SetSaveTempsDir): New procedure.
948         * gm2-compiler/M2Options.mod (SetM): New procedure.
949         (GetM): New procedure function.
950         (SetMM): New procedure.
951         (GetMM): New procedure function.
952         (SetMF): New procedure.
953         (GetMF): New procedure function.
954         (SetPPOnly): New procedure.
955         (GetB): New procedure function.
956         (SetMD): New procedure.
957         (GetMD): New procedure function.
958         (SetMMD): New procedure.
959         (GetMMD): New procedure function.
960         (SetMQ): New procedure.
961         (SetMT): New procedure.
962         (GetMT): New procedure function.
963         (GetDepTarget): New procedure function.
964         (SetMP): New procedure.
965         (GetMP): New procedure function.
966         (SetObj): New procedure.
967         (SetSaveTempsDir): New procedure.
968         * gm2-compiler/M2Preprocess.def (PreprocessModule): New parameters
969         topSource and outputDep.  Re-write.
970         (MakeSaveTempsFileNameExt): New procedure function.
971         (OnExitDelete): New procedure function.
972         * gm2-compiler/M2Preprocess.mod (GetM): Import.
973         (GetMM): Import.
974         (OnExitDelete): Add debugging message.
975         (RemoveFile): Add debugging message.
976         (BaseName): Remove.
977         (BuildCommandLineExecute): New procedure function.
978         * gm2-compiler/M2Search.def (SetDefExtension): Remove unnecessary
979         spacing.
980         * gm2-compiler/SymbolTable.mod (GetSymName): Handle ImportSym and
981         ImportStatementSym.
982         * gm2-gcc/m2options.h (M2Options_SetMD): New function.
983         (M2Options_GetMD): New function.
984         (M2Options_SetMMD): New function.
985         (M2Options_GetMMD): New function.
986         (M2Options_SetM): New function.
987         (M2Options_GetM): New function.
988         (M2Options_SetMM): New function.
989         (M2Options_GetMM): New function.
990         (M2Options_GetMQ): New function.
991         (M2Options_SetMF): New function.
992         (M2Options_GetMF): New function.
993         (M2Options_SetMT): New function.
994         (M2Options_SetMP): New function.
995         (M2Options_GetMP): New function.
996         (M2Options_GetDepTarget): New function.
997         * gm2-lang.cc (gm2_langhook_init): Correct comment case.
998         (gm2_langhook_init_options): Add case OPT_M and
999         OPT_MM.
1000         (gm2_langhook_post_options): Add case OPT_MF, OPT_MT,
1001         OPT_MD and OPT_MMD.
1002         * lang-specs.h (M2CPP): Pass though MF option.
1003         (MDMMD): New define.  Add MDMMD to "@modula-2".
1005 2023-10-15  Gaius Mulley  <gaiusmod2@gmail.com>
1007         * Make-lang.in (m2.tags): New rule.
1009 2023-10-11  Gaius Mulley  <gaiusmod2@gmail.com>
1011         * gm2-compiler/M2GCCDeclare.mod (DeclareSubrange): Check
1012         the base type of the subrange against the ZTYPE and call
1013         DeclareSubrangeNarrow if necessary.
1014         (DeclareSubrangeNarrow): New procedure function.
1016 2023-10-11  Gaius Mulley  <gaiusmod2@gmail.com>
1018         PR modula2/111675
1019         * gm2-compiler/M2CaseList.mod (appendTree): Replace
1020         InitStringCharStar with InitString.
1021         * gm2-compiler/M2GCCDeclare.mod: Import AreConstantsEqual.
1022         (DeclareSubrange): Add zero alignment test and call
1023         BuildSmallestTypeRange if necessary.
1024         (WalkSubrangeDependants): Walk the align expression.
1025         (IsSubrangeDependants): Test the align expression.
1026         * gm2-compiler/M2Quads.mod (BuildStringAdrParam): Correct end name.
1027         * gm2-compiler/P2SymBuild.mod (BuildTypeAlignment): Allow subranges
1028         to be zero aligned (packed).
1029         * gm2-compiler/SymbolTable.mod (Subrange): Add Align field.
1030         (MakeSubrange): Set Align to NulSym.
1031         (PutAlignment): Assign Subrange.Align to align.
1032         (GetAlignment): Return Subrange.Align.
1033         * gm2-gcc/m2expr.cc (noBitsRequired): Rewrite.
1034         (calcNbits): Rename ...
1035         (m2expr_calcNbits): ... to this and test for negative values.
1036         (m2expr_BuildTBitSize): Replace calcNBits with m2expr_calcNbits.
1037         * gm2-gcc/m2expr.def (calcNbits): Export.
1038         * gm2-gcc/m2expr.h (m2expr_calcNbits): New prototype.
1039         * gm2-gcc/m2type.cc (noBitsRequired): Remove.
1040         (m2type_BuildSmallestTypeRange): Call m2expr_calcNbits.
1041         (m2type_BuildSubrangeType): Create range_type from
1042         build_range_type (type, lowval, highval).
1044 2023-09-29  Gaius Mulley  <gaiusmod2@gmail.com>
1046         * gm2-compiler/M2Quads.mod (EndBuildFor): Improve
1047         block comments.
1048         * gm2-libs-iso/SysClock.mod (ExtractDate): Replace
1049         testDays with yearOfDays.  New local variable monthOfDays.
1051 2023-09-26  Gaius Mulley  <gaiusmod2@gmail.com>
1053         PR modula2/111510
1054         * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Minor spacing changes.
1055         (BuildTrashTreeFromInterface): Minor spacing changes.
1056         * gm2-compiler/M2Options.mod (GetRuntimeModuleOverride): Call
1057         string to generate a nul terminated C style string.
1058         * gm2-compiler/M2Quads.mod (BuildStringAdrParam): New procedure.
1059         (BuildM2InitFunction): Replace inline parameter generation with
1060         calls to BuildStringAdrParam.
1062 2023-09-19  Gaius Mulley  <gaiusmod2@gmail.com>
1064         * Make-lang.in (host_mc_longreal): Detect hosting on powerpc64le
1065         and if so use __float128 for longreal in mc.
1066         (MC_ARGS): Append host_mc_longreal.
1067         * config-make.in (TEST_TARGET_CPU_DEFAULT): New variable.
1068         (TEST_HOST_CPU_DEFAULT): New variable.
1069         * configure: Regenerate.
1070         * configure.ac (M2C_LONGREAL_FLOAT128): New define set if target
1071         is powerpc64le.
1072         (M2C_LONGREAL_PPC64LE): New define set if target is powerpc64le.
1073         * gm2-compiler/M2GCCDeclare.mod: Correct comment case.
1074         * gm2-compiler/M2GenGCC.mod (MaybeDebugBuiltinAlloca): Call
1075         SetLastFunction for the builtin function call.
1076         (MaybeDebugBuiltinMemcpy): Call SetLastFunction for the builtin
1077         function call.
1078         (MaybeDebugBuiltinMemset): New procedure function.
1079         (MakeCopyUse): Use GNU formatting.
1080         (UseBuiltin): Rewrite to check BuiltinExists.
1081         (CodeDirectCall): Rewrite to check BuiltinExists and call
1082         SetLastFunction.
1083         (CodeMakeAdr): Re-format.
1084         * gm2-compiler/M2Options.def (SetDebugBuiltins): New procedure.
1085         * gm2-compiler/M2Options.mod (SetUninitVariableChecking): Allow
1086         "cond" to switch UninitVariableConditionalChecking separately.
1087         (SetDebugBuiltins): New procedure.
1088         * gm2-compiler/M2Quads.def (BuildFunctionCall): Add parameter
1089         ConstExpr.
1090         * gm2-compiler/M2Quads.mod (BuildRealProcedureCall): Add parameter
1091         to BuildRealFuncProcCall.
1092         (BuildRealFuncProcCall): Add ConstExpr parameter.  Pass ConstExpr
1093         to BuildFunctionCall.
1094         (BuildFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
1095         BuildRealFunctionCall.
1096         (BuildConstFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
1097         BuildFunctionCall.
1098         (BuildRealFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
1099         BuildRealFuncProcCall.
1100         * gm2-compiler/P3Build.bnf (SetOrDesignatorOrFunction): Pass FALSE
1101         to BuildFunctionCall.
1102         (AssignmentOrProcedureCall): Pass FALSE to BuildFunctionCall.
1103         * gm2-compiler/SymbolTable.def (IsProcedureBuiltinAvailable): New
1104         procedure function.
1105         * gm2-compiler/SymbolTable.mod (CanUseBuiltin): New procedure
1106         function.
1107         (IsProcedureBuiltinAvailable): New procedure function.
1108         * gm2-gcc/m2builtins.cc (DEBUGGING): Undef.
1109         (bf_category): New enum type.
1110         (struct builtin_function_entry): New field function_avail.
1111         (m2builtins_BuiltInMemCopy): Rename from ...
1112         (m2builtins_BuiltinMemCopy): ... this.
1113         (DoBuiltinMemSet): New function.
1114         (m2builtins_BuiltinMemSet): New function.
1115         (do_target_support_exists): New function.
1116         (target_support_exists): New function.
1117         (m2builtins_BuiltinExists): Return true or false.
1118         (m2builtins_BuildBuiltinTree): Rename local variables.
1119         Replace long_double_type_node with GetM2LongRealType.
1120         (m2builtins_init): Use GetM2LongRealType rather than
1121         long_double_type_node.
1122         * gm2-gcc/m2builtins.def (BuiltInMemCopy): Rename to ...
1123         (BuiltinMemCopy): ... this.
1124         (BuiltinMemSet): New procedure function.
1125         * gm2-gcc/m2builtins.h (m2builtins_BuiltInMemCopy): Rename to ...
1126         (m2builtins_BuiltinMemCopy): ... this.
1127         (m2builtins_BuiltinMemSet): New procedure function.
1128         * gm2-gcc/m2configure.cc (m2configure_M2CLongRealFloat128): New
1129         procedure function.
1130         (m2configure_M2CLongRealIBM128): New procedure function.
1131         (m2configure_M2CLongRealLongDouble): New procedure function.
1132         (m2configure_M2CLongRealLongDoublePPC64LE): New procedure function.
1133         * gm2-gcc/m2configure.def (M2CLongRealFloat128): New procedure function.
1134         (M2CLongRealIBM128): New procedure function.
1135         (M2CLongRealLongDouble): New procedure function.
1136         (M2CLongRealLongDoublePPC64LE): New procedure function.
1137         * gm2-gcc/m2configure.h (m2configure_FullPathCPP): New procedure function.
1138         (m2configure_M2CLongRealFloat128): New procedure function.
1139         (m2configure_M2CLongRealIBM128): New procedure function.
1140         (m2configure_M2CLongRealLongDouble): New procedure function.
1141         (m2configure_M2CLongRealLongDoublePPC64LE): New procedure function.
1142         * gm2-gcc/m2convert.cc (m2convert_BuildConvert): Use convert_loc.
1143         * gm2-gcc/m2options.h (M2Options_SetDebugBuiltins): New function.
1144         * gm2-gcc/m2statement.cc (m2statement_BuildAssignmentTree): Set
1145         TREE_USED to true.
1146         (m2statement_BuildGoto):Set TREE_USED to true.
1147         (m2statement_BuildParam): Set TREE_USED to true.
1148         (m2statement_BuildBuiltinCallTree): New function.
1149         (m2statement_BuildFunctValue): Set TREE_USED to true.
1150         * gm2-gcc/m2statement.def (BuildBuiltinCallTree): New procedure function.
1151         * gm2-gcc/m2statement.h (m2statement_BuildBuiltinCallTree): New
1152         procedure function.
1153         * gm2-gcc/m2treelib.cc (m2treelib_DoCall0): Remove spacing.
1154         (m2treelib_DoCall1): Remove spacing.
1155         (m2treelib_DoCall2): Remove spacing.
1156         (m2treelib_DoCall3): Remove spacing.
1157         (add_stmt): Rename parameter.
1158         * gm2-gcc/m2type.cc (build_set_type): Remove spacing.
1159         (build_m2_specific_size_type): Remove spacing.
1160         (finish_build_pointer_type): Remove spacing.
1161         (m2type_BuildVariableArrayAndDeclare): Remove spacing.
1162         (build_m2_short_real_node): Remove spacing.
1163         (build_m2_real_node): Remove spacing.
1164         (build_m2_long_real_node): Use float128_type_node if
1165         M2CLongRealFloat128 is set.
1166         (build_m2_ztype_node): Remove spacing.
1167         (build_m2_long_int_node): Remove spacing.
1168         (build_m2_long_card_node): Remove spacing.
1169         (build_m2_short_int_node): Remove spacing.
1170         (build_m2_short_card_node): Remove spacing.
1171         (build_m2_iso_loc_node): Remove spacing.
1172         (m2type_SameRealType): New function.
1173         (m2type_InitBaseTypes): Create m2_c_type_node using
1174         m2_long_complex_type_node.
1175         (m2type_SetAlignment): Tidy up comment.
1176         * gm2-gcc/m2type.def (SameRealType):  New procedure function.
1177         * gm2-gcc/m2type.h (m2type_SameRealType): New procedure function.
1178         * gm2-lang.cc (gm2_langhook_type_for_mode): Build long complex
1179         node from m2 language specific long double node.
1180         * gm2-libs-log/RealConversions.mod (IsNan): New procedure
1181         function.
1182         (doPowerOfTen): Re-implement.
1183         * gm2-libs/Builtins.mod: Add newline.
1184         * gm2-libs/DynamicStrings.def (ReplaceChar): New procedure function.
1185         * gm2-libs/DynamicStrings.mod (ReplaceChar): New procedure function.
1186         * gm2config.aci.in (M2C_LONGREAL_FLOAT128): New config value.
1187         (M2C_LONGREAL_PPC64LE): New config value.
1188         * gm2spec.cc (lang_specific_driver): New local variable
1189         need_default_mabi set to default value depending upon
1190         M2C_LONGREAL_PPC64LE and M2C_LONGREAL_FLOAT128.
1191         * lang.opt (Wcase-enum): Moved to correct section.
1192         * m2pp.cc (m2pp_real_type): New function.
1193         (m2pp_type): Call m2pp_real_type.
1194         (m2pp_print_mode): New function.
1195         (m2pp_simple_type): Call m2pp_simple_type.
1196         (m2pp_float): New function.
1197         (m2pp_expression): Call m2pp_float.
1198         * mc-boot/GDynamicStrings.cc: Rebuild.
1199         * mc-boot/GDynamicStrings.h: Rebuild.
1200         * mc-boot/GFIO.cc: Rebuild.
1201         * mc-boot/GFIO.h: Rebuild.
1202         * mc-boot/GIO.cc: Rebuild.
1203         * mc-boot/GRTint.cc: Rebuild.
1204         * mc-boot/Gdecl.cc: Rebuild.
1205         * mc-boot/GmcOptions.cc: Rebuild.
1206         * mc-boot/GmcOptions.h: Rebuild.
1207         * mc/decl.mod: Rebuild.
1208         * mc/mcOptions.def (getCRealType): New procedure function.
1209         (getCLongRealType): New procedure function.
1210         (getCShortRealType): New procedure function.
1211         * mc/mcOptions.mod (getCRealType): New procedure function.
1212         (getCLongRealType): New procedure function.
1213         (getCShortRealType): New procedure function.
1215 2023-09-14  Gaius Mulley  <gaiusmod2@gmail.com>
1217         * gm2-compiler/M2CaseList.mod (NewRanges): Add block
1218         comment.
1219         (NewSet): Add block comment.
1220         (DisplayRanges): Add block comment.
1221         (IncludeElement): Add block comment.
1222         (IncludeElements): Add block comment.
1223         (appendString): Add block comment.
1224         (appendEnum): Add block comment.
1225         (appendTree): Add block comment.
1226         (SubrangeErrors): Add block comment.
1228 2023-09-14  Gaius Mulley  <gaiusmod2@gmail.com>
1230         * gm2-compiler/M2CaseList.mod (appendString): New procedure.
1231         (appendEnum): Re-implement.
1232         (NoOfSetElements): New procedure function.
1233         (isPrintableChar): New procedure function.
1234         (appendTree): New procedure.
1235         (SubrangeErrors): New procedure.
1236         (EmitMissingRangeErrors): Call SubrangeErrors if appropriate.
1237         * gm2-compiler/M2SymInit.mod (SetFieldInitializedNo): Avoid
1238         using a temporary variable once.
1239         (IsLocalVar): Comment out.
1240         (RecordContainsVarient): Remove fieldtype.
1241         (GenerateNoteFlow): Remove lst parameter.
1242         (CheckDeferredRecordAccess): Remove lst parameter.
1243         (CheckUnary): Remove lst parameter.  Remove procSym.
1244         (CheckBinary): Remove lst parameter.  Remove procSym.
1245         (CheckIndrX): Remove lst parameter.  Remove procSym.
1246         (CheckXIndr): Remove bblst and procSym parameters.
1247         (CheckRecordField): Remove procSym, op1tok, op2tok and op2.
1248         (CheckBecomes): Remove procSym and bblst.
1249         (CheckComparison): Remove procSym and bblst.
1250         (CheckAddr): Remove procSym parameter.
1251         * gm2-gcc/m2expr.cc (m2expr_CSTIntToString): New function.
1252         (m2expr_CSTIntToChar): New function.
1253         * gm2-gcc/m2expr.def (CSTIntToString): New procedure function
1254         declaration.
1255         (CSTIntToChar): New procedure function declaration.
1256         * gm2-gcc/m2expr.h (m2expr_CSTIntToChar): New prototype.
1257         (m2expr_CSTIntToString): New prototype.
1259 2023-09-13  Gaius Mulley  <gaiusmod2@gmail.com>
1261         * Make-lang.in (GM2_FLAGS): Add -Wcase-enum.
1262         (GM2_ISO_FLAGS): Add -Wcase-enum.
1263         * gm2-compiler/M2CaseList.mod (EnumerateErrors): Issue
1264         singular or plural start text prior to the enum list.
1265         Remove unused parameter tokenno.
1266         (EmitMissingRangeErrors): New procedure.
1267         (MissingCaseBounds): Call EmitMissingRangeErrors.
1268         (MissingCaseStatementBounds): Call EmitMissingRangeErrors.
1269         * gm2-libs-iso/TextIO.mod: Fix spacing.
1271 2023-09-12  Gaius Mulley  <gaiusmod2@gmail.com>
1273         * gm2-compiler/M2CaseList.def (PushCase): Rename parameters
1274         r to rec and v to va.  Add expr parameter.
1275         (MissingCaseStatementBounds): New procedure function.
1276         * gm2-compiler/M2CaseList.mod (RangePair): Add expression.
1277         (PushCase): Rename parameters r to rec and v to va.  Add
1278         expr parameter.
1279         (RemoveRange): New procedure function.
1280         (SubBitRange): Detect the case when the range in the set matches
1281         lo..hi.
1282         (CheckLowHigh): New procedure.
1283         (ExcludeCaseRanges): Rename parameter c to cd.  Rename local
1284         variables q to cl and r to rp.
1285         (High): Remove.
1286         (Low): Remove.
1287         (DoEnumValues): Remove.
1288         (IncludeElement): New procedure.
1289         (IncludeElements): New procedure.
1290         (ErrorRangeEnum): New procedure.
1291         (ErrorRange): Remove.
1292         (ErrorRanges): Remove.
1293         (appendEnum): New procedure.
1294         (appendStr): New procedure.
1295         (EnumerateErrors): New procedure.
1296         (MissingCaseBounds): Re-implement.
1297         (InRangeList): Remove.
1298         (MissingCaseStatementBounds): New procedure function.
1299         (checkTypes): Re-format.
1300         (inRange): Re-format.
1301         (TypeCaseBounds): Re-format.
1302         * gm2-compiler/M2Error.mod (GetAnnounceScope): Add noscope to
1303         case label list.
1304         * gm2-compiler/M2GCCDeclare.mod: Replace ForeachFieldEnumerationDo
1305         with ForeachLocalSymDo.
1306         * gm2-compiler/M2Options.def (SetCaseEnumChecking): New procedure.
1307         (CaseEnumChecking): New variable.
1308         * gm2-compiler/M2Options.mod (SetCaseEnumChecking): New procedure.
1309         (Module initialization): set CaseEnumChecking to FALSE.
1310         * gm2-compiler/M2Quads.def (QuadOperator): Alphabetically ordered.
1311         * gm2-compiler/M2Quads.mod (IsBackReferenceConditional): Add else
1312         clause.
1313         (BuildCaseStart): Pass selector expression to InitCaseBounds.
1314         (CheckUninitializedVariablesAreUsed): Remove.
1315         (IsInlineWithinBlock): Remove.
1316         (AsmStatementsInBlock): Remove.
1317         (CheckVariablesInBlock): Remove commented code.
1318         (BeginVarient): Pass NulSym to InitCaseBounds.
1319         * gm2-compiler/M2Range.mod (FoldCaseBounds): New local variable
1320         errorGenerated.  Add call to MissingCaseStatementBounds.
1321         * gm2-compiler/P3Build.bnf (CaseEndStatement): Call ElseCase.
1322         * gm2-compiler/PCSymBuild.mod (InitDesExpr): Add else clause.
1323         (InitFunction): Add else clause.
1324         (InitConvert): Add else clause.
1325         (InitLeaf): Add else clause.
1326         (InitBinary): Add else clause.
1327         (InitUnary): Add else clause.
1328         * gm2-compiler/SymbolTable.def (GetNth): Re-write comment.
1329         (ForeachFieldEnumerationDo): Re-write comment stating alphabetical
1330         traversal.
1331         * gm2-compiler/SymbolTable.mod (GetNth): Re-write comment.
1332         Add case label for EnumerationSym and call GetItemFromList.
1333         (ForeachFieldEnumerationDo): Re-write comment stating alphabetical
1334         traversal.
1335         (SymEnumeration): Add ListOfFields used for declaration order.
1336         (MakeEnumeration): Initialize ListOfFields.
1337         (PutFieldEnumeration): Include Field in ListOfFields.
1338         * gm2-gcc/m2options.h (M2Options_SetCaseEnumChecking): New
1339         function.
1340         * gm2-lang.cc (gm2_langhook_handle_option): Add
1341         OPT_Wcase_enum case and call M2Options_SetCaseEnumChecking.
1342         * lang.opt (Wcase-enum): Add.
1344 2023-09-11  Gaius Mulley  <gaiusmod2@gmail.com>
1346         PR modula2/111330
1347         * gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Add
1348         case labels LogicalDiffOp, DummyOp, OptParamOp and
1349         InitAddressOp.
1351 2023-08-20  Gaius Mulley  <gaiusmod2@gmail.com>
1353         PR modula2/111085
1354         * gm2-libs/Builtins.def (nexttoward): Alter the second
1355         parameter to LONGREAL.
1356         (nexttowardf): Alter the second parameter to LONGREAL.
1357         * gm2-libs/Builtins.mod (nexttoward): Alter the second
1358         parameter to LONGREAL.
1359         (nexttowardf): Alter the second parameter to LONGREAL.
1360         * gm2-libs/cbuiltin.def (nexttoward): Alter the second
1361         parameter to LONGREAL.
1362         (nexttowardf): Alter the second parameter to LONGREAL.
1364 2023-08-13  Iain Sandoe  <iain@sandoe.co.uk>
1366         * Make-lang.in: Update suffix spellings to use 'soext'.
1367         Add libc to the plugin link.
1369 2023-08-12  Gaius Mulley  <gaiusmod2@gmail.com>
1371         PR modula2/110779
1372         * gm2-libs-iso/SysClock.mod (EpochTime): New procedure.
1373         (GetClock): Call EpochTime if the C time functions are
1374         unavailable.
1375         * gm2-libs-iso/wrapclock.def (istimezone): New function
1376         definition.
1378 2023-08-12  Gaius Mulley  <gaiusmod2@gmail.com>
1380         PR modula2/108119
1381         * Make-lang.in (M2RTE_PLUGIN_SO): Assigned to
1382         plugin/m2rte$(exeext).so if enable_plugin is yes.
1383         (m2.all.cross): Replace plugin/m2rte$(soext) with
1384         $(M2RTE_PLUGIN_SO).
1385         (m2.all.encap): Replace plugin/m2rte$(soext) with
1386         $(M2RTE_PLUGIN_SO).
1387         (m2.install-plugin): Add dummy rule when enable_plugin
1388         is not yes.
1389         (plugin/m2rte$(exeext).so): Add dummy rule when enable_plugin
1390         is not yes.
1391         (m2/stage2/cc1gm2$(exeext)): Replace plugin/m2rte$(soext) with
1392         $(M2RTE_PLUGIN_SO).
1393         (m2/stage1/cc1gm2$(exeext)): Replace plugin/m2rte$(soext) with
1394         $(M2RTE_PLUGIN_SO).
1395         * gm2spec.cc (lang_specific_driver): Set need_plugin to false
1396         by default.
1398 2023-08-09  Gaius Mulley  <gaiusmod2@gmail.com>
1400         PR modula2/110779
1401         * gm2-libs-iso/SysClock.mod (GetClock): Test GetTimespec
1402         return value.
1403         (SetClock): Test SetTimespec return value.
1404         * gm2-libs-iso/wrapclock.def (GetTimespec): Add integer
1405         return type.
1406         (SetTimespec): Add integer return type.
1408 2023-08-05  Gaius Mulley  <gaiusmod2@gmail.com>
1410         PR modula2/110779
1411         * gm2-libs-iso/SysClock.mod: Re-implement using wrapclock.
1412         * gm2-libs-iso/wrapclock.def: New file.
1414 2023-08-01  Gaius Mulley  <gaiusmod2@gmail.com>
1416         PR modula2/110161
1417         * gm2-compiler/M2Check.mod (checkProcTypeEquivalence): New
1418         procedure function.
1419         (checkTypeKindEquivalence): Call checkProcTypeEquivalence
1420         if either left or right is a proc type.
1421         * gm2-compiler/M2Quads.mod (BuildRelOp): Create
1422         combinedTok prior to creating the range check quadruple.
1423         Use combinedTok when creating the range check quadruple.
1425 2023-08-01  Gaius Mulley  <gaiusmod2@gmail.com>
1427         PR modula2/110865
1428         * gm2-compiler/M2Quads.mod (BuildDesignatorArray):
1429         Rename t as type and d as dim.  New variable result.
1430         Allow constants of an array type to be indexed.
1432 2023-07-25  Gaius Mulley  <gaiusmod2@gmail.com>
1434         PR modula2/110174
1435         * gm2-compiler/M2GCCDeclare.def (PromoteToCString): New procedure
1436         function.
1437         * gm2-compiler/M2GCCDeclare.mod (PromoteToCString): New procedure
1438         function.
1439         * gm2-compiler/M2GenGCC.mod (BuildTreeFromInterface): Call
1440         skip_const_decl before chaining the parameter value.
1441         Use PromoteToCString to ensure the string is nul terminated.
1442         (CodeInline): Remove all parameters and replace with quad.
1443         Use GetQuadOtok to get operand token numbers.
1444         Remove call to DeclareConstant and replace it with PromoteToCString.
1445         * gm2-compiler/M2Quads.def (BuildInline): Rename into ...
1446         (BuildAsm): ... this.
1447         * gm2-compiler/M2Quads.mod: (BuildInline): Rename into ...
1448         (BuildAsm): ... this.
1449         (BuildAsmElement): Add debugging.
1450         * gm2-compiler/P1Build.bnf: Remove import of BuildInline.
1451         * gm2-compiler/P2Build.bnf: Remove import of BuildInline.
1452         * gm2-compiler/P3Build.bnf: Remove import of BuildInline and
1453         import BuildAsm.
1454         * gm2-compiler/PHBuild.bnf: Remove import of BuildInline.
1455         * gm2-libs-iso/SysClock.mod (foo): Remove.
1456         * gm2-libs/FIO.mod (BufferedRead): Rename parameter a to dest.
1457         Rename variable t to src.
1458         * m2pp.cc (pf): Correct block comment.
1459         (pe): Correct block comment.
1460         (m2pp_asm_expr): New function.
1461         (m2pp_statement): Call m2pp_asm_expr.
1463 2023-07-22  Gaius Mulley  <gaiusmod2@gmail.com>
1465         PR modula2/110631
1466         * gm2-libs/FIO.def (ReadAny): Correct comment as
1467         HIGH (a) + 1 is number of bytes.
1468         (WriteAny): Correct comment as HIGH (a) + 1 is number of
1469         bytes.
1470         * gm2-libs/FIO.mod (ReadAny): Correct comment as
1471         HIGH (a) + 1 is number of bytes.  Also pass HIGH (a) + 1
1472         to BufferedRead.
1473         (WriteAny): Correct comment as HIGH (a) + 1 is number of
1474         bytes.  Also pass HIGH (a) + 1 to BufferedWrite.
1475         (BufferedWrite): Rename parameter a to src, rename variable
1476         t to dest.  Correct parameter order to memcpy.
1478 2023-07-20  Gaius Mulley  <gaiusmod2@gmail.com>
1480         * gm2-compiler/M2SymInit.mod (IsExempt): Remove parameter exemption.
1481         (CheckIndrX): Call SetupLAlias between lhs and content.
1482         (trashParam): Re-write.
1483         (SetVarLRInitialized): Indicate shadow and heap are initialized.
1484         Call SetupIndr between shadow and heap.
1485         * gm2-compiler/P2SymBuild.mod: Import
1486         PutProcedureParameterHeapVars.
1487         (EndBuildProcedure): Call PutProcedureParameterHeapVars.
1488         * gm2-compiler/SymbolTable.def (GetParameterHeapVar): New
1489         procedure function.
1490         (PutProcedureParameterHeapVars): New procedure function.
1491         * gm2-compiler/SymbolTable.mod (MakeParameterHeapVar): New
1492         procedure function.
1493         (GetParameterHeapVar): New procedure function.
1494         (PuttParameterHeapVar): New procedure function.
1495         (PutProcedureParameterHeapVars): New procedure.
1496         (VarParam): HeapVar new record field.
1497         (PutVarParam): HeapVar assigned to NulSym.
1499 2023-07-19  Gaius Mulley  <gaiusmod2@gmail.com>
1501         PR modula2/110284
1502         * Make-lang.in (m2_OBJS): Add m2/gm2-gcc/rtegraph.o and
1503         m2/gm2-compiler-boot/m2flex.o.
1504         (c-family/m2pp.o): Remove.
1505         * Make-maintainer.in (c-family/m2pp.o): Add.
1507 2023-07-19  Gaius Mulley  <gaiusmod2@gmail.com>
1509         * gm2-compiler/M2Quads.mod (BuildDifAdrFunction): Removed
1510         unnecessary in error message.  Use vartok for location.
1511         (BuildOddFunction): Use optok for location.
1512         (BuildAbsFunction): Use vartok for location.  Bugfix set vartok.
1513         (BuildCapFunction): Use optok for location.
1514         (BuildOrdFunction): Use optok for location and correct format
1515         specifier.
1516         (BuildShiftFunction): Use vartok for location.
1517         (BuildRotateFunction): Use vartok for location.
1518         (BuildTruncFunction): Use vartok for location.
1519         (BuildFloatFunction): Use vartok for location.
1520         (BuildReFunction): Use vartok for location.
1521         (BuildImFunction): Use vartok for location.
1522         * gm2-compiler/M2SymInit.mod (trashParam): Remove commented code.
1524 2023-07-19  Gaius Mulley  <gaiusmod2@gmail.com>
1526         * gm2-compiler/M2Quads.mod (BuildRealFuncProcCall): Set the trash
1527         parameter value to NIL if DEALLOCATE is detected.
1528         * gm2-compiler/M2SymInit.mod (CheckDeferredRecordAccess): Pass
1529         tok to SetVarInitialized.  Pass tok to GetVarComponentInitialized.
1530         (ComponentFindVar): Add tok parameter.  Check aliased pointer
1531         against Nil and generate warning if necessary.
1532         (deRefComponent): Add tok and sym parameters and pass them to
1533         getContent.
1534         (SetVarComponentInitialized): Add tok parameter.  Pass tok to
1535         ComponentFindVar.  Pass tok and sym to deRefComponent.
1536         (GetVarComponentInitialized): Add tok parameter.  Pass tok to
1537         ComponentFindVar.  Pass tok to deRefComponent.
1538         (SetVarInitialized): Add tok parameter.  Pass tok to
1539         SetVarComponentInitialized.
1540         (doGetVarInitialized): Add tok parameter.  Pass tok to
1541         GetVarComponentInitialized.
1542         (CheckXIndr): Pass lhs and lhstok to getContent.
1543         (CheckIndrX): Pass rhs and rhstok to getContent.
1544         (CheckBecomes): Pass destok to ComponentFindVar.  Pass des and
1545         destok to deRefComponent.
1546         (CheckAddr): Pass contenttok to GetVarInitialized.  Pass ptrtok
1547         to SetVarInitialized.
1548         (CheckReadBeforeInitQuad): Pass op1tok to SetVarInitialized for
1549         op1 cases and op3tok for op3 cases.
1550         (trashParam): Get operand tokens.  Pass op3tok to
1551         SetVarInitialized.  Pass op3 and op3tok to getContent.
1552         Alias ptr to NIL if procedure is DEALLOCATE.  Pass op3tok to
1553         SetVarInitialized.
1554         (IsDeallocate): New procedure function.
1555         (DetectTrash): Use IsDeallocate.
1556         (SetupLAlias): Allow exp to be Nil.
1557         (getContent): Generate warning message if ptr is Nil.
1559 2023-07-18  Gaius Mulley  <gaiusmod2@gmail.com>
1561         * Make-lang.in: Minor formatting change.
1562         * gm2-compiler/M2GCCDeclare.mod
1563         (DeclareUnboundedProcedureParameters): Rename local variables.
1564         (WalkUnboundedProcedureParameters): Rename local variables.
1565         (DoVariableDeclaration): Avoid declaration of a variable if
1566         it is on the heap (used by static analysis only).
1567         * gm2-compiler/M2GenGCC.mod: Formatting.
1568         * gm2-compiler/M2Quads.def (GetQuadTrash): New procedure function.
1569         * gm2-compiler/M2Quads.mod (GetQuadTrash): New procedure function.
1570         (QuadFrame): Add Trash field.
1571         (BuildRealFuncProcCall): Detect ALLOCATE and DEALLOCATE and create
1572         a heap variable for parameter 1 saving it as the trashed variable
1573         for static analysis.
1574         (GenQuadOTrash): New procedure.
1575         (DisplayQuadRange): Bugfix.  Write the scope number.
1576         * gm2-compiler/M2SymInit.mod: Rewritten to separate LValue
1577         equivalence from LValue to RValue pairings.  Comprehensive
1578         detection of variant record implemented.  Allow dereferencing
1579         of pointers through LValue/RValue chains.
1580         * gm2-compiler/SymbolTable.def (PutVarHeap): New procedure.
1581         (IsVarHeap): New procedure function.
1582         (ForeachParamSymDo): New procedure.
1583         * gm2-compiler/SymbolTable.mod (PutVarHeap): New procedure.
1584         (IsVarHeap): New procedure function.
1585         (ForeachParamSymDo): New procedure.
1586         (MakeVariableForParam): Reformatted.
1587         (CheckForUnknownInModule): Reformatted.
1588         (SymVar): Add field Heap.
1589         (MakeVar): Assign Heap to FALSE.
1591 2023-07-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1593         * Make-lang.in (m2/boot-bin/mklink$(exeext)): Add $(LDFLAGS).
1595 2023-07-11  Gaius Mulley  <gaiusmod2@gmail.com>
1597         * gm2-compiler/M2BasicBlock.def (InitBasicBlocksFromRange): New
1598         parameter ScopeSym.
1599         * gm2-compiler/M2BasicBlock.mod (ConvertQuads2BasicBlock): New
1600         parameter ScopeSym.
1601         (InitBasicBlocksFromRange): New parameter ScopeSym.  Call
1602         ConvertQuads2BasicBlock with ScopeSym.
1603         (DisplayBasicBlocks): Uncomment.
1604         * gm2-compiler/M2Code.mod: Replace VariableAnalysis with
1605         ScopeBlockVariableAnalysis.
1606         (InitialDeclareAndOptiomize): Add parameter scope.
1607         (SecondDeclareAndOptimize): Add parameter scope.
1608         * gm2-compiler/M2GCCDeclare.mod (DeclareConstructor): Add scope
1609         parameter to DeclareTypesConstantsProceduresInRange.
1610         (DeclareTypesConstantsProceduresInRange): New parameter scope.
1611         Pass scope to DisplayQuadRange.  Reformatted.
1612         * gm2-compiler/M2GenGCC.def (ConvertQuadsToTree): New parameter
1613         scope.
1614         * gm2-compiler/M2GenGCC.mod (ConvertQuadsToTree): New parameter
1615         scope.
1616         * gm2-compiler/M2Optimize.mod (KnownReachable): New parameter
1617         scope.
1618         * gm2-compiler/M2Options.def (SetUninitVariableChecking): Add
1619         arg parameter.
1620         * gm2-compiler/M2Options.mod (SetUninitVariableChecking): Add
1621         arg parameter and set boolean UninitVariableChecking and
1622         UninitVariableConditionalChecking.
1623         (UninitVariableConditionalChecking): New boolean set to FALSE.
1624         * gm2-compiler/M2Quads.def (IsGoto): New procedure function.
1625         (DisplayQuadRange): Add scope parameter.
1626         (LoopAnalysis): Add scope parameter.
1627         * gm2-compiler/M2Quads.mod: Import PutVarArrayRef.
1628         (IsGoto): New procedure function.
1629         (LoopAnalysis): Add scope parameter and use MetaErrorT1 instead
1630         of WarnStringAt.
1631         (BuildStaticArray): Call PutVarArrayRef.
1632         (BuildDynamicArray): Call PutVarArrayRef.
1633         (DisplayQuadRange): Add scope parameter.
1634         (GetM2OperatorDesc): Add relational condition cases.
1635         * gm2-compiler/M2Scope.def (ScopeProcedure): Add parameter.
1636         * gm2-compiler/M2Scope.mod (DisplayScope): Pass scopeSym to
1637         DisplayQuadRange.
1638         (ForeachScopeBlockDo): Pass scopeSym to p.
1639         * gm2-compiler/M2SymInit.def (VariableAnalysis): Rename to ...
1640         (ScopeBlockVariableAnalysis): ... this.
1641         * gm2-compiler/M2SymInit.mod (ScopeBlockVariableAnalysis): Add
1642         scope parameter.
1643         (bbEntry): New pointer to record.
1644         (bbArray): New array.
1645         (bbFreeList): New variable.
1646         (errorList): New list.
1647         (IssueConditional): New procedure.
1648         (GenerateNoteFlow): New procedure.
1649         (IssueWarning): New procedure.
1650         (IsUniqueWarning): New procedure.
1651         (CheckDeferredRecordAccess): Re-implement.
1652         (CheckBinary): Add warning and lst parameters.
1653         (CheckUnary): Add warning and lst parameters.
1654         (CheckXIndr): Add warning and lst parameters.
1655         (CheckIndrX): Add warning and lst parameters.
1656         (CheckBecomes): Add warning and lst parameters.
1657         (CheckComparison): Add warning and lst parameters.
1658         (CheckReadBeforeInitQuad): Add warning and lst parameters to all
1659         Check procedures.  Add all case quadruple clauses.
1660         (FilterCheckReadBeforeInitQuad): Add warning and lst parameters.
1661         (CheckReadBeforeInitFirstBasicBlock): Add warning and lst parameters.
1662         (bbArrayKill): New procedure.
1663         (DumpBBEntry): New procedure.
1664         (DumpBBArray): New procedure.
1665         (DumpBBSequence): New procedure.
1666         (TestBBSequence): New procedure.
1667         (CreateBBPermultations): New procedure.
1668         (ScopeBlockVariableAnalysis): New procedure.
1669         (GetOp3): New procedure.
1670         (GenerateCFG): New procedure.
1671         (NewEntry): New procedure.
1672         (AppendEntry): New procedure.
1673         (init): Initialize bbFreeList and errorList.
1674         * gm2-compiler/SymbolTable.def (PutVarArrayRef): New procedure.
1675         (IsVarArrayRef): New procedure function.
1676         * gm2-compiler/SymbolTable.mod (SymVar): ArrayRef new field.
1677         (MakeVar): Set ArrayRef to FALSE.
1678         (PutVarArrayRef): New procedure.
1679         (IsVarArrayRef): New procedure function.
1680         * gm2-gcc/init.cc (_M2_M2SymInit_init): New prototype.
1681         (init_PerCompilationInit): Add call to _M2_M2SymInit_init.
1682         * gm2-gcc/m2options.h (M2Options_SetUninitVariableChecking):
1683         New definition.
1684         * gm2-lang.cc (gm2_langhook_handle_option): Add new case
1685         OPT_Wuninit_variable_checking_.
1686         * lang.opt: Wuninit-variable-checking= new entry.
1688 2023-07-03  Gaius Mulley  <gaiusmod2@gmail.com>
1690         PR modula2/110125
1691         * Make-lang.in (GM2-COMP-BOOT-DEFS): Add M2SymInit.def.
1692         (GM2-COMP-BOOT-MODS): Add M2SymInit.mod.
1693         * gm2-compiler/M2BasicBlock.mod: Formatting changes.
1694         * gm2-compiler/M2Code.mod: Remove import of VariableAnalysis from
1695         M2Quads.  Import VariableAnalysis from M2SymInit.mod.
1696         * gm2-compiler/M2GCCDeclare.mod (PrintVerboseFromList):
1697         Add debugging print for a component.
1698         (TypeConstFullyDeclared): Call RememberType for every type.
1699         * gm2-compiler/M2GenGCC.mod (CodeReturnValue): Add parameter to
1700         GetQuadOtok.
1701         (CodeBecomes): Add parameter to GetQuadOtok.
1702         (CodeXIndr): Add parameter to GetQuadOtok.
1703         * gm2-compiler/M2Optimize.mod (ReduceBranch): Reformat and
1704         preserve operand token positions when reducing the branch
1705         quadruples.
1706         (ReduceGoto): Reformat.
1707         (FoldMultipleGoto): Reformat.
1708         (KnownReachable): Reformat.
1709         * gm2-compiler/M2Options.def (UninitVariableChecking): New
1710         variable declared and exported.
1711         (SetUninitVariableChecking): New procedure.
1712         * gm2-compiler/M2Options.mod (SetWall): Set
1713         UninitVariableChecking.
1714         (SetUninitVariableChecking): New procedure.
1715         * gm2-compiler/M2Quads.def (PutQuadOtok): Exported and declared.
1716         (VariableAnalysis): Removed.
1717         * gm2-compiler/M2Quads.mod (PutQuadOtok): New procedure.
1718         (doVal): Reformatted.
1719         (MarkAsWrite): Reformatted.
1720         (MarkArrayAsWritten): Reformatted.
1721         (doIndrX): Use PutQuadOtok.
1722         (MakeRightValue): Use GenQuadOtok.
1723         (MakeLeftValue): Use GenQuadOtok.
1724         (CheckReadBeforeInitialized): Remove.
1725         (IsNeverAltered): Reformat.
1726         (DebugLocation): New procedure.
1727         (BuildDesignatorPointer): Use GenQuadO to preserve operand token
1728         position.
1729         (BuildRelOp): Use GenQuadOtok ditto.
1730         * gm2-compiler/SymbolTable.def (VarCheckReadInit): New procedure.
1731         (VarInitState): New procedure.
1732         (PutVarInitialized): New procedure.
1733         (PutVarFieldInitialized): New procedure function.
1734         (GetVarFieldInitialized): New procedure function.
1735         (PrintInitialized): New procedure.
1736         * gm2-compiler/SymbolTable.mod (VarCheckReadInit): New procedure.
1737         (VarInitState): New procedure.
1738         (PutVarInitialized): New procedure.
1739         (PutVarFieldInitialized): New procedure function.
1740         (GetVarFieldInitialized): New procedure function.
1741         (PrintInitialized): New procedure.
1742         (LRInitDesc): New type.
1743         (SymVar): InitState new field.
1744         (MakeVar): Initialize InitState.
1745         * gm2-gcc/m2options.h (M2Options_SetUninitVariableChecking):
1746         New function declaration.
1747         * gm2-lang.cc (gm2_langhook_handle_option): Detect
1748         OPT_Wuninit_variable_checking and call SetUninitVariableChecking.
1749         * lang.opt: Add Wuninit-variable-checking.
1750         * gm2-compiler/M2SymInit.def: New file.
1751         * gm2-compiler/M2SymInit.mod: New file.
1753 2023-06-30  Iain Sandoe  <iain@sandoe.co.uk>
1755         PR testsuite/108835
1756         * gm2-libs/RTint.mod: Do not use NIL timeout setting on select,
1757         test failures sequentially, finishing on the first success.
1759 2023-06-18  Gaius Mulley  <gaiusmod2@gmail.com>
1761         PR modula2/110284
1762         * Make-lang.in (m2_OBJS): Assign $(GM2_C_OBJS).
1763         (GM2_C_OBJS): Remove m2/stor-layout.o.
1764         (m2/stor-layout.o): Remove rule.
1765         * gm2-gcc/gcc-consolidation.h (rtl.h): Remove include.
1766         (df.h): Remove include.
1767         (except.h): Remove include.
1769 2023-06-15  Marek Polacek  <polacek@redhat.com>
1771         * Make-lang.in: New var, GM2_PICFLAGS.  Use it.
1773 2023-06-13  Gaius Mulley  <gaiusmod2@gmail.com>
1775         * Make-lang.in (check-format-error): New rule.
1776         * gm2-compiler/M2MetaError.mod (op): Add calls InternalError if
1777         digits are detected.
1778         * gm2-compiler/M2Quads.mod (BuildForToByDo): Bugfix to format
1779         specifier.
1780         (BuildLengthFunction): Bugfix to format specifiers.
1781         (BuildOddFunction): Bugfix to format specifiers.
1782         (BuildAbsFunction): Bugfix to format specifiers.
1783         (BuildCapFunction): Bugfix to format specifiers.
1784         (BuildChrFunction): Bugfix to format specifiers.
1785         (BuildOrdFunction): Bugfix to format specifiers.
1786         (BuildMakeAdrFunction): Bugfix to format specifiers.
1787         (BuildSizeFunction): Bugfix to format specifiers.
1788         (BuildBitSizeFunction): Bugfix to format specifiers.
1789         * tools-src/checkmeta.py: New file.
1791 2023-06-12  Gaius Mulley  <gaiusmod2@gmail.com>
1793         PR modula2/110189
1794         * gm2-compiler/M2Quads.mod (BuildAbsFunction): Replace abort
1795         format specifier.
1796         (BuildValFunction): Replace abort format specifier.
1797         (BuildCastFunction): Replace abort format specifier.
1798         (BuildMinFunction): Replace abort format specifier.
1799         (BuildMaxFunction): Replace abort format specifier.
1800         (BuildTruncFunction): Replace abort format specifier.
1801         * gm2-compiler/P3Build.bnf (Pass1): Remove.
1802         (Pass2): Remove.
1803         (Pass3): Remove.
1804         (Expect): Add Pass1.
1805         (AsmStatement): Remove Pass3.
1806         (AsmOperands): Remove Pass3.
1807         (AsmOperandSpec): Remove Pass3.
1808         (AsmInputElement): Remove Pass3.
1809         (AsmOutputElement): Remove Pass3.
1810         (AsmTrashList): Remove Pass3.
1812 2023-06-12  Gaius Mulley  <gaiusmod2@gmail.com>
1814         PR modula2/110126
1815         * gm2-compiler/M2Quads.def (BuildAsmElement): Remove
1816         trash parameter.
1817         (BuildAsmTrash): New procedure.
1818         * gm2-compiler/M2Quads.mod (BuildAsmTrash): New procedure.
1819         (BuildAsmElement): Remove trash parameter.
1820         * gm2-compiler/P3Build.bnf (AsmTrashList): Rewrite.
1822 2023-06-08  Gaius Mulley  <gaiusmod2@gmail.com>
1824         PR modula2/110126
1825         * gm2-compiler/M2GenGCC.mod (BuildTreeFromInterface): Remove
1826         tokenno parameter.  Use object tok instead of tokenno.
1827         (BuildTrashTreeFromInterface): Use object tok instead of
1828         GetDeclaredMod.
1829         (CodeInline): Remove tokenno from parameter list to BuildTreeFromInterface.
1830         * gm2-compiler/M2Quads.def (BuildAsmElement): Exported and
1831         defined.
1832         * gm2-compiler/M2Quads.mod (BuildOptimizeOff): Reformatted.
1833         (BuildInline): Reformatted.
1834         (BuildLineNo): Reformatted.
1835         (UseLineNote): Reformatted.
1836         (BuildAsmElement): New procedure.
1837         * gm2-compiler/P0SyntaxCheck.bnf (AsmOperands): Use
1838         ConstExpression instead of string.
1839         (AsmElement): Use ConstExpression instead of string.
1840         (TrashList): Use ConstExpression instead of string.
1841         * gm2-compiler/P1Build.bnf (AsmOperands): Use
1842         ConstExpression instead of string.
1843         (AsmElement): Use ConstExpression instead of string.
1844         (TrashList): Use ConstExpression instead of string.
1845         * gm2-compiler/P2Build.bnf (AsmOperands): Use
1846         ConstExpression instead of string.
1847         (AsmElement): Use ConstExpression instead of string.
1848         (TrashList): Use ConstExpression instead of string.
1849         * gm2-compiler/P3Build.bnf (AsmOperands): Rewrite.
1850         (AsmOperandSpec): Rewrite.
1851         (AsmOutputList): New rule.
1852         (AsmInputList): New rule.
1853         (TrashList): Rewrite.
1854         * gm2-compiler/PCBuild.bnf (AsmOperands): Use
1855         ConstExpression instead of string.
1856         (AsmElement): Use ConstExpression instead of string.
1857         (TrashList): Use ConstExpression instead of string.
1858         * gm2-compiler/PHBuild.bnf (AsmOperands): Use
1859         ConstExpression instead of string.
1860         (AsmElement): Use ConstExpression instead of string.
1861         (TrashList): Use ConstExpression instead of string.
1862         * gm2-compiler/SymbolTable.def (PutRegInterface):
1863         Rewrite interface.
1864         (GetRegInterface): Rewrite interface.
1865         * gm2-compiler/SymbolTable.mod (SetFirstUsed): New procedure.
1866         (PutFirstUsed): New procedure.
1867         (PutRegInterface): Rewrite.
1868         (GetRegInterface): Rewrite.
1870 2023-06-07  Jakub Jelinek  <jakub@redhat.com>
1872         * Make-lang.in: Build $(generated_files) before building
1873         all $(GM2_C_OBJS).
1875 2023-06-07  Gaius Mulley  <gaiusmod2@gmail.com>
1877         PR modula2/110019
1878         * gm2-compiler/SymbolKey.mod (SearchAndDo): Reformatted.
1879         (ForeachNodeDo): Reformatted.
1880         * gm2-compiler/SymbolTable.mod (AddListify): Join list
1881         with "," or "and" if more than one word is in the list.
1882         * m2.flex: Remove -1 from atoi(yytext) line number.
1884 2023-06-03  Gaius Mulley  <gaiusmod2@gmail.com>
1886         PR modula2/110003
1887         * gm2-compiler/P2SymBuild.mod (GetParameterShadowVar): Import.
1888         (CheckFormalParameterSection): Call PutDeclared for the shadow
1889         variable associated with the parameter.
1891 2023-05-24  Gaius Mulley  <gaiusmod2@gmail.com>
1893         PR modula2/109952
1894         * Make-maintainer.in: Change header to include emacs file mode.
1895         * gm2-compiler/M2GenGCC.mod (BuildHighFromChar): Check whether
1896         operand is a constant string and is nul terminated then return one.
1897         * gm2-compiler/PCSymBuild.mod (WalkFunction): Add default return
1898         TRUE.  Static analysis missing return path fix.
1899         * gm2-libs/IO.mod (Init): Rewrite to help static analysis.
1900         * target-independent/m2/gm2-libs.texi: Rebuild.
1902 2023-05-19  Gaius Mulley  <gaiusmod2@gmail.com>
1904         PR modula2/109908
1905         * gm2-libs-iso/Strings.mod (Delete): Re-implement.
1907 2023-05-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1909         * gm2-gcc/m2builtins.cc (doradix): Use _P defines from tree.h.
1910         (doplaces): Ditto.
1911         (doexponentmin): Ditto.
1912         (doexponentmax): Ditto.
1913         (dolarge): Ditto.
1914         (dosmall): Ditto.
1915         (dogUnderflow): Ditto.
1916         * gm2-gcc/m2convert.cc (unsafe_conversion_p): Ditto.
1917         * gm2-gcc/m2expr.cc (m2expr_build_unary_op_check): Ditto.
1918         (m2expr_build_binary_op_check): Ditto.
1919         * gm2-gcc/m2tree.cc (m2tree_is_var): Ditto.
1920         * gm2-gcc/m2treelib.cc (build_modify_expr): Ditto.
1921         * gm2-gcc/m2type.cc (gm2_finish_decl): Ditto.
1922         * m2pp.cc (hextree): Ditto.
1923         (m2pp_call_expr): Ditto.
1925 2023-05-17  Gaius Mulley  <gaiusmod2@gmail.com>
1927         * gm2-libs-iso/LongWholeIO.mod (WriteInt): Only request a
1928         sign if the value is < 0.
1929         * gm2-libs-iso/ShortWholeIO.mod (WriteInt): Only request a
1930         sign if the value is < 0.
1931         * gm2-libs-iso/WholeIO.mod (WriteInt): Only request a sign
1932         if the value is < 0.
1933         * gm2-libs-iso/WholeStr.mod (WriteInt): Only request a sign
1934         if the value is < 0.
1936 2023-05-16  Gaius Mulley  <gaiusmod2@gmail.com>
1938         PR modula2/109879
1939         * gm2-libs-iso/LongIO.mod (ReadReal): Call SkipSpaces.
1940         * gm2-libs-iso/LongWholeIO.mod (ReadInt): Call SkipSpaces.
1941         (ReadCard): Call SkipSpaces.
1942         * gm2-libs-iso/RealIO.mod (ReadReal): Call SkipSpaces.
1943         * gm2-libs-iso/ShortWholeIO.mod: (ReadInt): Call SkipSpaces.
1944         (ReadCard): Call SkipSpaces.
1945         * gm2-libs-iso/TextIO.mod: Import SkipSpaces.
1946         * gm2-libs-iso/WholeIO.mod (ReadInt): Call SkipSpaces.
1947         (ReadCard): Call SkipSpaces.
1948         * gm2-libs-iso/TextUtil.def: New file.
1949         * gm2-libs-iso/TextUtil.mod: New file.
1951 2023-05-16  Gaius Mulley  <gaiusmod2@gmail.com>
1953         PR modula2/108344
1954         * gm2-libs-coroutines/TimerHandler.mod (EnableLED): New constant.
1955         (Timer): Test EnableLED before switching on the scroll LED.
1957 2023-05-12  Gaius Mulley  <gaiusmod2@gmail.com>
1959         PR modula2/109830
1960         * gm2-libs-iso/SeqFile.mod (newCid): New parameter toAppend
1961         used to select FIO.OpenForRandom.
1962         (OpenRead): Pass extra parameter to newCid.
1963         (OpenWrite): Pass extra parameter to newCid.
1964         (OpenAppend): Pass extra parameter to newCid.
1966 2023-05-11  Gaius Mulley  <gaiusmod2@gmail.com>
1968         PR modula2/109810
1969         * gm2-compiler/M2ALU.mod (ConvertConstToType): Use
1970         PrepareCopyString in place of DoCopyString.
1971         * gm2-compiler/M2GenGCC.def (DoCopyString): Rename to ...
1972         (PrepareCopyString): ... this.
1973         * gm2-compiler/M2GenGCC.mod (CodeStatement): Call CodeReturnValue
1974         with a single parameter.  Call CodeXIndr with a single parameter.
1975         (CodeReturnValue): Remove parameters and replace with a single
1976         quadno.  Reimplement using PrepareCopyString.  Issue error
1977         if the string exceeds designator space.
1978         (DoCopyString): Reimplement and rename to ...
1979         (PrepareCopyString): ... this.
1980         (CodeXIndr): Remove parameters and replace with a single
1981         quadno.  Reimplement using PrepareCopyString.  Issue error
1982         if the string exceeds designator space.
1983         (CodeBecomes): Remove parameters and replace with a single
1984         quadno.  Reimplement using PrepareCopyString.  Issue error
1985         if the string exceeds designator space.
1986         * gm2-compiler/M2Quads.def (BuildReturn): Rename parameter to
1987         tokreturn.
1988         * gm2-compiler/M2Quads.mod (BuildReturn): Rename parameter to
1989         tokreturn.  Rename tokno to tokcombined.
1991 2023-05-09  Gaius Mulley  <gaiusmod2@gmail.com>
1993         PR modula2/109779
1994         * gm2-libs-iso/RTgen.mod (doLook): Remove old.
1995         Remove re-assignment of result.
1996         * gm2-libs-iso/TextIO.mod (CanRead): Rename into ...
1997         (CharAvailable): ... this.
1998         (DumpState): New procedure.
1999         (SetResult): Rename as SetNul.
2000         (WasGoodChar): Rename into ...
2001         (EofOrEoln): ... this.
2002         (SkipLine): Skip over the newline.
2003         (ReadString): Flip THEN ELSE statements after testing for
2004         EofOrEoln.
2005         (ReadRestLine): Flip THEN ELSE statements after testing for
2006         EofOrEoln.
2008 2023-05-04  Gaius Mulley  <gaiusmod2@gmail.com>
2010         PR modula2/109729
2011         * gm2-compiler/M2GenGCC.mod (CodeStatement): Detect
2012         ArithAddOp and call CodeAddChecked.
2013         (ResolveConstantExpressions): Detect ArithAddOp and call
2014         FoldArithAdd.
2015         (FoldArithAdd): New procedure.
2016         (FoldAdd): Refactor to use FoldArithAdd.
2017         * gm2-compiler/M2Quads.def (QuadOperator): Add ArithAddOp.
2018         * gm2-compiler/M2Quads.mod: Remove commented imports.
2019         (QuadFrame): Changed comments to use GNU coding standards.
2020         (ArithPlusTok): New global variable.
2021         (BuildForToByDo): Use ArithPlusTok instead of PlusTok.
2022         (MakeOp): Detect ArithPlusTok and return ArithAddOp.
2023         (WriteQuad): Add ArithAddOp clause.
2024         (WriteOperator): Add ArithAddOp clause.
2025         (Init): Initialize ArithPlusTok.
2027 2023-05-04  Gaius Mulley  <gaiusmod2@gmail.com>
2029         PR modula2/109675
2030         * Make-lang.in (MC-LIB-DEFS): Remove M2LINK.def.
2031         (BUILD-PGE-O): Remove GM2LINK.o.
2032         * Make-maintainer.in (PPG-DEFS): New define.
2033         (PPG-LIB-DEFS): Remove M2LINK.def.
2034         (BUILD-BOOT-PPG-H): Add PPGDEF .h files.
2035         (m2/ppg$(exeext)): Remove M2LINK.o
2036         (PGE-DEPS): New define.
2037         (m2/pg$(exeext)): Remove M2LINK.o.
2038         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Add -Im2/gm2-pge-boot.
2039         (m2/pge$(exeext)): Remove M2LINK.o.
2040         (pge-maintainer): Re-implement.
2041         (pge-libs-push): Re-implement.
2042         (m2/m2obj3/cc1gm2$(exeext)): Remove M2LINK.o.
2043         * gm2-libs/DynamicStrings.mod (writeAddress): Re-implement
2044         using snprintf.
2045         * gm2-libs/M2Dependent.mod: Remove commented out imports.
2046         * mc-boot/GDynamicStrings.cc: Rebuild.
2047         * mc-boot/GFIO.cc: Rebuild.
2048         * mc-boot/GFormatStrings.cc: Rebuild.
2049         * mc-boot/GM2Dependent.cc: Rebuild.
2050         * mc-boot/GM2Dependent.h: Rebuild.
2051         * mc-boot/GM2RTS.cc: Rebuild.
2052         * mc-boot/GM2RTS.h: Rebuild.
2053         * mc-boot/GRTExceptions.cc: Rebuild.
2054         * mc-boot/GRTint.cc: Rebuild.
2055         * mc-boot/GSFIO.cc: Rebuild.
2056         * mc-boot/GStringConvert.cc: Rebuild.
2057         * mc-boot/Gdecl.cc: Rebuild.
2058         * pge-boot/GASCII.cc: Rebuild.
2059         * pge-boot/GASCII.h: Rebuild.
2060         * pge-boot/GArgs.cc: Rebuild.
2061         * pge-boot/GArgs.h: Rebuild.
2062         * pge-boot/GAssertion.cc: Rebuild.
2063         * pge-boot/GAssertion.h: Rebuild.
2064         * pge-boot/GBreak.h: Rebuild.
2065         * pge-boot/GCmdArgs.h: Rebuild.
2066         * pge-boot/GDebug.cc: Rebuild.
2067         * pge-boot/GDebug.h: Rebuild.
2068         * pge-boot/GDynamicStrings.cc: Rebuild.
2069         * pge-boot/GDynamicStrings.h: Rebuild.
2070         * pge-boot/GEnvironment.h: Rebuild.
2071         * pge-boot/GFIO.cc: Rebuild.
2072         * pge-boot/GFIO.h: Rebuild.
2073         * pge-boot/GFormatStrings.h:: Rebuild.
2074         * pge-boot/GFpuIO.h:: Rebuild.
2075         * pge-boot/GIO.cc: Rebuild.
2076         * pge-boot/GIO.h: Rebuild.
2077         * pge-boot/GIndexing.cc: Rebuild.
2078         * pge-boot/GIndexing.h: Rebuild.
2079         * pge-boot/GLists.cc: Rebuild.
2080         * pge-boot/GLists.h: Rebuild.
2081         * pge-boot/GM2Dependent.cc: Rebuild.
2082         * pge-boot/GM2Dependent.h: Rebuild.
2083         * pge-boot/GM2EXCEPTION.cc: Rebuild.
2084         * pge-boot/GM2EXCEPTION.h: Rebuild.
2085         * pge-boot/GM2RTS.cc: Rebuild.
2086         * pge-boot/GM2RTS.h: Rebuild.
2087         * pge-boot/GNameKey.cc: Rebuild.
2088         * pge-boot/GNameKey.h: Rebuild.
2089         * pge-boot/GNumberIO.cc: Rebuild.
2090         * pge-boot/GNumberIO.h: Rebuild.
2091         * pge-boot/GOutput.cc: Rebuild.
2092         * pge-boot/GOutput.h: Rebuild.
2093         * pge-boot/GPushBackInput.cc: Rebuild.
2094         * pge-boot/GPushBackInput.h: Rebuild.
2095         * pge-boot/GRTExceptions.cc: Rebuild.
2096         * pge-boot/GRTExceptions.h: Rebuild.
2097         * pge-boot/GSArgs.h: Rebuild.
2098         * pge-boot/GSEnvironment.h: Rebuild.
2099         * pge-boot/GSFIO.cc: Rebuild.
2100         * pge-boot/GSFIO.h: Rebuild.
2101         * pge-boot/GSYSTEM.h: Rebuild.
2102         * pge-boot/GScan.h: Rebuild.
2103         * pge-boot/GStdIO.cc: Rebuild.
2104         * pge-boot/GStdIO.h: Rebuild.
2105         * pge-boot/GStorage.cc: Rebuild.
2106         * pge-boot/GStorage.h: Rebuild.
2107         * pge-boot/GStrCase.cc: Rebuild.
2108         * pge-boot/GStrCase.h: Rebuild.
2109         * pge-boot/GStrIO.cc: Rebuild.
2110         * pge-boot/GStrIO.h: Rebuild.
2111         * pge-boot/GStrLib.cc: Rebuild.
2112         * pge-boot/GStrLib.h: Rebuild.
2113         * pge-boot/GStringConvert.h: Rebuild.
2114         * pge-boot/GSymbolKey.cc: Rebuild.
2115         * pge-boot/GSymbolKey.h: Rebuild.
2116         * pge-boot/GSysExceptions.h: Rebuild.
2117         * pge-boot/GSysStorage.cc: Rebuild.
2118         * pge-boot/GSysStorage.h: Rebuild.
2119         * pge-boot/GTimeString.h: Rebuild.
2120         * pge-boot/GUnixArgs.h: Rebuild.
2121         * pge-boot/Gbnflex.cc: Rebuild.
2122         * pge-boot/Gbnflex.h: Rebuild.
2123         * pge-boot/Gdtoa.h: Rebuild.
2124         * pge-boot/Gerrno.h: Rebuild.
2125         * pge-boot/Gldtoa.h: Rebuild.
2126         * pge-boot/Glibc.h: Rebuild.
2127         * pge-boot/Glibm.h: Rebuild.
2128         * pge-boot/Gpge.cc: Rebuild.
2129         * pge-boot/Gtermios.h: Rebuild.
2130         * pge-boot/Gwrapc.h: Rebuild.
2131         * mc-boot/GM2LINK.h: Removed.
2132         * pge-boot/GM2LINK.cc: Removed.
2133         * pge-boot/GM2LINK.h: Removed.
2135 2023-04-30  Gaius Mulley  <gaiusmod2@gmail.com>
2137         * gm2-compiler/SymbolTable.mod (ConstLitPoolEntry): New
2138         pointer to record.
2139         (ConstLitSym): New field RangeError.
2140         (ConstLitPoolTree): New SymbolTree representing name to
2141         index.
2142         (ConstLitArray): New dynamic array containing pointers
2143         to a ConstLitPoolEntry.
2144         (CreateConstLit): New procedure function.
2145         (LookupConstLitPoolEntry): New procedure function.
2146         (AddConstLitPoolEntry): New procedure function.
2147         (MakeConstLit): Re-implemented to check the constant lit
2148         pool before calling CreateConstLit.
2149         * m2.flex: Add ability to decode binary constant literals.
2151 2023-04-26  Gaius Mulley  <gaiusmod2@gmail.com>
2153         PR modula2/108121
2154         * gm2-compiler/M2ALU.mod (Less): Reformatted.
2155         * gm2-compiler/SymbolTable.mod (DetermineSizeOfConstant): Remove
2156         from import.
2157         (ConstantStringExceedsZType): Import.
2158         (GetConstLitType): Re-implement using ConstantStringExceedsZType.
2159         * gm2-gcc/m2decl.cc (m2decl_DetermineSizeOfConstant): Remove.
2160         (m2decl_ConstantStringExceedsZType): New function.
2161         (m2decl_BuildConstLiteralNumber): Re-implement.
2162         * gm2-gcc/m2decl.def (DetermineSizeOfConstant): Remove.
2163         (ConstantStringExceedsZType): New function.
2164         * gm2-gcc/m2decl.h (m2decl_DetermineSizeOfConstant): Remove.
2165         (m2decl_ConstantStringExceedsZType): New function.
2166         * gm2-gcc/m2expr.cc (append_digit): Remove.
2167         (m2expr_interpret_integer): Remove.
2168         (append_m2_digit): Remove.
2169         (m2expr_StrToWideInt): New function.
2170         (m2expr_interpret_m2_integer): Remove.
2171         * gm2-gcc/m2expr.def (CheckConstStrZtypeRange): New function.
2172         * gm2-gcc/m2expr.h (m2expr_StrToWideInt): New function.
2173         * gm2-gcc/m2type.cc (build_m2_word64_type_node): New function.
2174         (build_m2_ztype_node): New function.
2175         (m2type_InitBaseTypes): Call build_m2_ztype_node.
2176         * gm2-lang.cc (gm2_type_for_size): Re-write using early returns.
2178 2023-04-21  Arsen Arsenović  <arsen@aarsen.me>
2180         * Make-lang.in: Remove references to $(P).
2181         * Make-maintainer.in: Ditto.
2183 2023-04-21  Gaius Mulley  <gaiusmod2@gmail.com>
2185         PR modula2/109586
2186         * gm2-gcc/m2tree.cc (m2tree_IsAConstant): Add (TREE_CODE
2187         (t) == CONSTRUCTOR) to expression.
2189 2023-04-13  Gaius Mulley  <gaiusmod2@gmail.com>
2191         PR modula2/109488
2192         * lang.opt: Fix typo "maybe" to "may be".
2194 2023-04-13  Gaius Mulley  <gaiusmod2@gmail.com>
2196         * gm2-compiler/M2ALU.def (PopChar): New procedure function.
2197         * gm2-compiler/M2ALU.mod (PopChar): New procedure function.
2198         * gm2-compiler/M2GCCDeclare.mod (PromoteToString): Detect
2199         a single constant char and build a C string.
2200         * gm2-compiler/M2GenGCC.mod (IsConstStr): New procedure
2201         function.
2202         (GetStr): New procedure function.
2203         (FoldAdd): Use IsConstStr.
2204         * gm2-compiler/M2Quads.mod: Formatting changes.
2205         * gm2-gcc/m2expr.cc (m2expr_GetCstInteger): New function.
2206         * gm2-gcc/m2expr.def (GetCstInteger): New procedure function.
2207         * gm2-gcc/m2expr.h (m2expr_GetCstInteger): New prototype.
2209 2023-04-05  Gaius Mulley  <gaiusmod2@gmail.com>
2211         PR modula2/109423
2212         * gm2-compiler/M2Base.def (Unbounded): Remove.
2213         * gm2-compiler/M2Error.def (ErrorAbort0): Add noreturn
2214         attribute.
2215         * gm2-compiler/M2Quads.mod (BuildInclProcedure): Correct
2216         error format string.
2217         (BuildExceptProcedure): Correct error format string.
2218         (BuildAdrFunction): Call PutWriteQuad when taking the
2219         address of a variable.
2220         * gm2-libs-ch/SysExceptions.c (_M2_SysExceptions_init): Add
2221         parameters.
2222         * gm2-libs-ch/wrapc.c (_M2_wrapc_init): Add parameters.
2223         * gm2-libs/DynamicStrings.mod (DumpStringInfo): Remove t.
2224         (PopAllocationExemption): Remove f.
2225         * gm2-libs/FIO.mod (BufferedWrite): Remove result.
2226         * gm2-libs/FormatStrings.mod (Copy): Remove endpos and
2227         afterperc.
2228         (HandlePercent): Remove result.
2229         * gm2-libs/Indexing.mod (RemoveIndiceFromIndex): Remove k.
2230         * gm2-libs/M2Dependent.mod (CreateModule): Remove p0
2231         and p1.
2232         (DumpModuleData): Remove mptr.
2233         (ConstructModules): Remove nulp.
2234         * gm2-libs/RTExceptions.mod (PopHandler): Remove i.
2235         * gm2-libs/RTint.mod (Listen): Remove b4s, b4m, afs
2236         and afm.
2237         * gm2-libs/SFIO.mod (ReadS): Remove c.
2238         * gm2-libs/StringConvert.mod (doDecimalPlaces): Remove
2239         whole and fraction.
2241 2023-04-03  Gaius Mulley  <gaiusmod2@gmail.com>
2243         PR modula2/109388
2244         * gm2-compiler/M2GCCDeclare.mod (DoVariableDeclaration):
2245         Remove second parameter module.  Adjust all callers to
2246         remove the second parameter.
2247         * gm2-compiler/PHBuild.bnf (CheckAndInsert): Remove.
2248         (InStopSet): Remove.
2249         (PeepToken): Remove.
2250         (PushQualident): Remove.
2251         (SimpleDes): Remove.
2252         (ActualParameters): Remove.
2254 2023-04-02  Gaius Mulley  <gaiusmod2@gmail.com>
2256         PR modula2/109336
2257         * Make-lang.in (GM2_O): Set to -O0.
2258         (GM2_LIBS): Remove target libraries and replace with build libs.
2259         (BUILD-LIBS): New declaration.
2260         (m2/gm2-libs/libgm2.a): New rule.
2261         (m2/gm2-libs/%.o): New rule.
2262         (m2/gm2-libs/choosetemp.o): New rule.
2263         * gm2-compiler/M2ColorString.mod (append): Use ADR rather than
2264         implicit conversion.
2265         * gm2-compiler/M2Comp.mod (Compile): Add qprintf messages for when
2266         a source file is not found.  Improve comments and formatting.
2267         * gm2-libs-ch/cgetopt.c (cgetopt_cgetopt_long): Remove
2268         ansi-decl.h.  Add getopt.h.
2269         (cgetopt_cgetopt_long_only): Change cgetopt_ to getopt_.
2270         * gm2spec.cc (lang_specific_driver): Do not skip -fmod=.
2271         Remove comment.
2273 2023-03-29  Gaius Mulley  <gaiusmod2@gmail.com>
2275         PR modula2/109336
2276         PR modula2/109315
2277         * gm2-compiler/M2FileName.mod (CalculateFileName): Simplified by
2278         ensuring the extension contains the ".".
2279         (CalculateStemName): Re-formatted.
2280         (ExtractExtension): Re-formatted.
2281         (ExtractModule): Re-formatted.
2282         * gm2-compiler/M2Options.def (setdefextension): Add block comment.
2283         (setmodextension): Add block comment.  Re-formatted.
2284         * gm2-compiler/M2Options.mod (setdefextension): Add block comment.
2285         (setmodextension): Add block comment.  Re-formatted.
2286         * gm2-compiler/M2Search.mod (FindSourceDefFile): Use
2287         DefaultDefExt.
2288         (DefaultDefExt): New constant.
2289         (DefaultModExt): New constant.
2290         (FindSourceModFile): Use DefaultModExt.
2291         * gm2-gcc/m2decl.cc (m2decl_DeclareKnownVariable): Correct
2292         spelling.
2293         * gm2spec.cc (M2SOURCE): New constant.
2294         (LANGSPEC): New value.
2295         (MATHLIB): New value.
2296         (WITHLIBC): New value.
2297         (SKIPOPT): New value.
2298         (lang_specific_driver): Replace seen_module_extension bool with
2299         module_extension char *.  Detect -fmod= and remember extension.
2300         Use the extension to detect modula-2 source and mark it as such.
2302 2023-03-23  Gaius Mulley  <gaiusmod2@gmail.com>
2304         PR modula2/109264
2305         * gm2-compiler/M2Quads.mod (BuildConstFunctionCall): Comment
2306         out ErrorString in debugging block.
2307         (BuildConstructorStart): Replace Assert with a call to
2308         MetaErrorT3.  Import MetaErrorT3.
2309         * gm2-compiler/PCSymBuild.mod (buildConstFunction): Rename
2310         local variables.
2311         (WalkFunctionParam): Remove test for IsEnumeration when
2312         resolving MIN or MAX parameters.
2313         * gm2-compiler/PHBuild.bnf (BlockAssert): New procedure.
2314         (ErrorArrayat): New procedure.
2315         (Expect): Renamed parameter t to tok.
2316         (PushQualident): New rule.
2317         (ConstSetOrQualidentOrFunction): Force AutoOn.
2318         (TypeDeclaration): Add debugging assert.
2319         (SimpleType): Add debugging assert.
2320         (DefaultRecordAttributes): New rule (and bugfix).
2321         (FieldPragmaExpression): New rule (and bugfix).
2322         (PragmaConstExpression): New rule (and bugfix).
2323         (SetOrDesignatorOrFunction): Add debugging assert.
2324         (Block): Add debugging assert.
2325         * gm2-gcc/m2expr.cc (m2expr_ConstantExpressionWarning): int
2326         to bool.
2327         * gm2-gcc/m2expr.h (m2expr_TreeOverflow): int to bool.
2328         (m2expr_GetBooleanTrue): Remove.
2329         (m2expr_GetBooleanFalse): Remove.
2330         * gm2-gcc/m2options.h (M2Options_SetStatistics): Replace
2331         int with bool.
2333 2023-03-22  Gaius Mulley  <gaiusmod2@gmail.com>
2335         PR modula2/109248
2336         * Make-lang.in (m2/pge-boot/%.o): Add CFLAGS and CXXFLAGS for C
2337         and C++ compiles.
2338         * gm2spec.cc (add_m2_I_path): Indentation.
2339         (lang_specific_driver): New variable seen_pathname.
2340         Detect -fm2-pathname.  If not seen then push_back_Ipath (".").
2341         Change non iso library path to "m2cor,m2log,m2pim,m2iso".
2343 2023-03-22  Gaius Mulley  <gaiusmod2@gmail.com>
2345         PR modula2/107630
2346         * Make-lang.in (m2/stage2/cc1gm2$(exeext)): Remove
2347         m2/gm2-libs-boot/M2LINK.o.
2348         (m2/stage1/cc1gm2$(exeext)): Ditto.
2349         (GM2-LIBS-BOOT-DEFS): Remove M2LINK.def.
2350         (GM2-LIBS-DEFS): Ditto.
2351         (m2/mc-boot/$(SRC_PREFIX)%.o): Replace CXX_FLAGS with CXXFLAGS.
2352         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
2353         (m2/mc-boot/main.o): Ditto.
2354         (mcflex.o): Add $(CFLAGS).
2355         (m2/gm2-libs-boot/M2LINK.o): Remove rule.
2356         * gm2-compiler/M2GCCDeclare.def (DeclareM2linkGlobals): Remove.
2357         * gm2-compiler/M2GCCDeclare.mod: (M2LinkEntry): Remove.
2358         (M2LinkIndex): Remove.
2359         (DoVariableDeclaration): Remove initial and call to
2360         AddEntryM2Link.
2361         (AddEntryM2Link): Remove.
2362         (GetEntryM2Link): Remove.
2363         (DeclareM2linkGlobals): Remove.
2364         (DetectM2LinkInitial): Remove.
2365         (InitM2LinkModule): Remove.
2366         * gm2-compiler/M2GenGCC.mod (CodeFinallyEnd): Remove call to
2367         DeclareM2linkGlobals.
2368         * gm2-compiler/M2Quads.mod (BuildM2InitFunction): Add extra
2369         parameter containing runtime module override to ConstructModules.
2370         * gm2-compiler/M2Scaffold.mod: Update comment describing
2371         ConstructModules.
2372         * gm2-gcc/m2decl.cc (m2decl_DeclareM2linkForcedModuleInitOrder):
2373         Remove.
2374         * gm2-libs-iso/M2RTS.def (ConstructModules): Add overrideliborder
2375         parameter.
2376         * gm2-libs-iso/M2RTS.mod: Add overrideliborder parameter.
2377         * gm2-libs/M2Dependent.def (ConstructModules): Add overrideliborder
2378         parameter.
2379         * gm2-libs/M2Dependent.mod (ConstructModules): Add overrideliborder
2380         parameter.
2381         * gm2-libs/M2RTS.def (ConstructModules): Add overrideliborder parameter.
2382         * gm2-libs/M2RTS.mod (ConstructModules): Add overrideliborder
2383         parameter.
2384         * gm2-libs/M2LINK.def: Removed.
2386 2023-03-21  Gaius Mulley  <gaiusmod2@gmail.com>
2388         * Make-lang.in (m2/mc-boot/$(SRC_PREFIX)%.o): Add $(CXXFLAGS).
2389         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Add $(CXXFLAGS).
2390         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Add $(CXXFLAGS).
2391         (m2/mc-boot/main.o): Add $(CXXFLAGS).
2393 2023-03-19  Gaius Mulley  <gaiusmod2@gmail.com>
2395         * Make-maintainer.in (gm2.maintainer-clean): Remove.
2396         (gm2.maintainer-help): Add gm2.maintainer-tools,
2397         gm2.maintainer-doc.  Remove gm2.maintainer-clean.
2398         Change target-independent directory to target-independent/m2.
2399         * gm2-compiler/ppg.mod: Correct __FILE_ typo to __FILE__.
2400         * gm2-compiler/M2Options.def (SetAutoInit): Update comment.
2401         * gm2-compiler/M2Options.mod (SetAutoInit): Update comment.
2402         * gm2-gcc/m2color.cc (m2color_colorize_start): Rename name_len
2403         to _name_high.
2404         * gm2-gcc/m2color.def (colorize_start): change ARRAY OF CHAR to
2405         ADDRESS and add _name_high.
2406         * gm2-gcc/m2decl.cc (m2decl_BuildStartFunctionDeclaration): Change
2407         int to bool.
2408         * gm2-gcc/m2decl.h (m2decl_BuildStartFunctionDeclaration): Change
2409         int to bool.
2410         * gm2-gcc/m2expr.cc (m2expr_BuildBinarySetDo): Change int to bool.
2411         (m2expr_BuildIfConstInVar): Change int to bool.
2412         (m2expr_BuildIfNotConstInVar): Change int to bool.
2413         (m2expr_BuildIfVarInVar): Change int to bool.
2414         (m2expr_BuildIfNotVarInVar): Change int to bool.
2415         (m2expr_BuildForeachWordInSetDoIfExpr): Change int to bool.
2416         * gm2-gcc/m2expr.h (m2expr_BuildIfNotVarInVar): Change int to bool.
2417         (m2expr_BuildIfVarInVar): Change int to bool.
2418         (m2expr_BuildIfNotConstInVar): Change int to bool.
2419         (m2expr_BuildIfConstInVar): Change int to bool.
2420         * gm2-gcc/m2options.h (M2Options_SetAutoInit): Change int to bool.
2421         (M2Options_SetNilCheck): Change int to bool.
2422         (M2Options_SetReturnCheck): Change int to bool.
2423         (M2Options_SetCaseCheck): Change int to bool.
2424         (M2Options_SetCheckAll): Change int to bool.
2425         (M2Options_SetVerboseUnbounded): Change int to bool.
2426         (M2Options_SetUnboundedByReference): Change int to bool.
2427         (M2Options_SetOptimizing): Change int to bool.
2428         (M2Options_SetQuiet): Change int to bool.
2429         (M2Options_SetCpp): Change int to bool.
2430         (M2Options_SetM2g): Change int to bool.
2431         (M2Options_SetLowerCaseKeywords): Change int to bool.
2432         (M2Options_SetVerbose): Change int to bool.
2433         * gm2-gcc/m2treelib.cc (m2treelib_get_rvalue): Change int to bool.
2434         (m2treelib_get_field_no): Change int to bool.
2435         (m2treelib_get_set_value): Change int to bool.
2436         (m2treelib_get_set_address): Change int to bool.
2437         (m2treelib_get_set_address_if_var): Change int to bool.
2438         * gm2-gcc/m2treelib.def (get_set_address_if_var): Change int to bool.
2439         (get_set_address): Change int to bool.
2440         (get_set_value): Change int to bool.
2441         (get_field_no): Change int to bool.
2442         (get_rvalue): Change int to bool.
2443         * gm2-gcc/m2treelib.h (m2treelib_get_field_no): Change int to bool.
2444         (m2treelib_get_set_value): Change int to bool.
2445         (m2treelib_get_set_address): Change int to bool.
2446         (m2treelib_get_set_address_if_var): Change int to bool.
2447         * gm2-gcc/m2type.cc (m2type_BuildEndFunctionType): Change int to bool.
2448         * gm2-gcc/m2type.h (m2type_BuildEndFunctionType): Change int to bool.
2449         * gm2-libs-ch/dtoa.cc (dtoa_calcsign): Change int to bool.
2450         * gm2-libs-ch/ldtoa.cc (dtoa_calcsign): Change int to bool.
2451         (ldtoa_ldtoa): Change int to bool.
2452         * m2.flex (functionInfo): Change int to bool.
2453         (pushFunction): Change parameter from int to bool.
2454         * mc-boot/GDebug.cc (Debug_Halt): Rebuild.
2455         * mc-boot/GDebug.h (Debug_Halt): Rebuild.
2456         * mc-boot/GDynamicStrings.cc: Rebuild.
2457         * mc-boot/GDynamicStrings.h: Rebuild.
2458         * mc-boot/GFIO.cc: Rebuild.
2459         * mc-boot/GM2RTS.cc: Rebuild.
2460         * mc-boot/GM2RTS.h: Rebuild.
2461         * mc-boot/GPushBackInput.cc: Rebuild.
2462         * mc-boot/GRTExceptions.cc: Rebuild.
2463         * mc-boot/GRTint.cc: Rebuild.
2464         * mc-boot/GSysStorage.cc: Rebuild.
2465         * mc-boot/Gdecl.cc: Rebuild.
2466         * mc-boot/GsymbolKey.cc: Rebuild.
2467         * mc/symbolKey.mod: Rebuild.
2468         * target-independent/m2/Builtins.texi: Rebuild.
2469         * target-independent/m2/SYSTEM-iso.texi: Rebuild.
2470         * target-independent/m2/SYSTEM-pim.texi: Rebuild.
2471         * target-independent/m2/gm2-libs.texi: Rebuild.
2472         * tools-src/def2doc.py (PIM_Log): Change gm2-libs-pim to
2473         gm2-lib-log.
2475 2023-03-17  Gaius Mulley  <gaiusmod2@gmail.com>
2477         PR modula2/109032
2478         * gm2-gcc/m2expr.cc: Correct ? : order in comments.
2479         (m2expr_BuildDivM2): Improve comment.
2480         * lang.opt: Improve option descriptions.
2482 2023-03-17  Gaius Mulley  <gaiusmod2@gmail.com>
2484         PR modula2/109102
2485         * gm2-gcc/m2builtins.cc (ASSERT): Change format specifier to
2486         use %qs rather than quotes.
2488 2023-03-17  Gaius Mulley  <gaiusmod2@gmail.com>
2490         * gm2-compiler/M2AsmUtil.mod (SymNeedsModulePrefix):
2491         Re-implemented.
2492         * gm2-libs/SysStorage.mod (enableTrace): Disable tracing.
2494 2023-03-16  Gaius Mulley  <gaiusmod2@gmail.com>
2496         * gm2-compiler/SymbolKey.mod (PutSymKey): Halt parameters
2497         reordered.
2498         (DelSymKey): Ditto.
2499         * gm2-compiler/ppg.mod (GetEpsilon): Ditto.
2500         (GetReachEnd): Ditto.
2501         (GetFollow): Ditto.
2502         (CodeCondition): Ditto.
2503         (CodeThenDo): Ditto.
2504         (CodeEnd): Ditto.
2505         (RecoverCondition): Ditto.
2506         (ConditionIndent): Ditto.
2507         * gm2-libs-ch/m2rts.h (M2RTS_Halt): Ditto.
2508         * gm2-libs-coroutines/Executive.mod (Assert): Ditto.
2509         (Resume): Remove redundant comments.
2510         (Wait): Remove redundant comments.
2511         * gm2-libs-coroutines/SYSTEM.mod (TRANSFER): Halt parameters
2512         reordered.
2513         (IOTransferHandler): Ditto.
2514         (Finished): Ditto.
2515         (localInit): Ditto.
2516         * gm2-libs-coroutines/TimerHandler.mod (WaitOn): Halt parameters
2517         reordered.
2518         (Cancel): Ditto.
2519         (ReArmEvent): Ditto.
2520         (OnActiveQueue): Ditto.
2521         * gm2-libs-iso/COROUTINES.mod (NEWCOROUTINE): Ditto.
2522         (Transfer): Ditto.
2523         (IOTRANSFER): Ditto.
2524         * gm2-libs-iso/EXCEPTIONS.mod (RAISE): Correct Halt parameters.
2525         * gm2-libs-iso/M2RTS.def (Halt): Halt parameters reordered.
2526         (HaltC): Ditto.
2527         * gm2-libs-iso/M2RTS.mod: Ditto.
2528         * gm2-libs-iso/RTentity.mod (PutKey): Ditto.
2529         (DelKey): Ditto.
2530         (findChildAndParent): Ditto.
2531         (assert): Ditto.
2532         * gm2-libs-iso/Storage.mod (ALLOCATE): Add DebugTrace.
2533         Add UseMallocFree test.
2534         (DEALLOCATE): Add DebugTrace.  Add UseMallocFree test.
2535         (assert): Halt parameters reordered.
2536         * gm2-libs-log/Termbase.mod (Read): Ditto.
2537         (KeyPressed): Ditto.
2538         (Write): Ditto.
2539         (Init): Ditto.
2540         * gm2-libs/Debug.def (Halt): Halt parameters reordered.
2541         * gm2-libs/Debug.mod (Halt): Ditto.
2542         * gm2-libs/DynamicStrings.def (PopAllocation): Improve comment.
2543         * gm2-libs/DynamicStrings.mod (PopAllocation): Improve comment.
2544         Halt parameters reordered.
2545         * gm2-libs/M2RTS.def (Halt): Ditto.
2546         (HaltC): Ditto.
2547         * gm2-libs/M2RTS.mod (Halt): Ditto.
2548         (HaltC): Ditto.
2549         * gm2-libs/PushBackInput.mod (PutStr): Ditto.
2550         (PutString): Ditto.
2551         (PutCh): Ditto.
2552         * gm2-libs/RTExceptions.mod (GetBaseExceptionBlock): Ditto.
2553         * gm2-libs/RTint.mod (ReArmTimeVector): Ditto.
2554         (GetTimeVector): Ditto.
2555         (AttachVector): Ditto.
2556         (IncludeVector): Ditto.
2557         (Listen): Ditto.
2558         * gm2-libs/SysStorage.mod (ALLOCATE): Ditto.
2559         (DEALLOCATE): Ditto.
2560         (REALLOCATE): Ditto.
2561         * gm2-libs-coroutines/Debug.def: Removed.
2562         * gm2-libs-coroutines/Debug.mod: Removed.
2564 2023-03-16  Gaius Mulley  <gaiusmod2@gmail.com>
2566         * Make-lang.in: Rename target-independent to
2567         target-independent/m2.
2568         * target-independent/readme.txt: Update.
2569         * target-independent/m2/gm2-ebnf.texi: New file.
2570         * target-independent/m2/gpl_v3_without_node.texi: New file.
2571         * target-independent/Builtins.texi: Rename ...
2572         * target-independent/m2/Builtins.texi: ... to this.
2573         * target-independent/SYSTEM-iso.texi: Rename ...
2574         * target-independent/m2/SYSTEM-iso.texi: ... to this.
2575         * target-independent/SYSTEM-pim.texi: Rename ...
2576         * target-independent/m2/SYSTEM-pim.texi: ... to this.
2577         * target-independent/gm2-libs.texi: Rename ...
2578         * target-independent/m2/gm2-libs.texi: ... to this.
2580 2023-03-15  Gaius Mulley  <gaiusmod2@gmail.com>
2582         PR modula2/109125
2583         * gm2-libs-ch/dtoa.cc (dtoa_strtod): Replace int with bool.
2584         * gm2-libs-ch/ldtoa.cc (ldtoa_strtold): Replace int with bool.
2586 2023-03-14  Gaius Mulley  <gaiusmod2@gmail.com>
2588         PR modula2/109125
2589         * gm2-libs-ch/cgetopt.c (cgetopt_SetOption): Replace int
2590         for bool.
2591         * gm2-libs-ch/termios.c (doSetUnset): Replace int for bool.
2592         * gm2-libs/Builtins.mod (isfinitef): Correct typo in return
2593         statement.
2595 2023-03-13  Gaius Mulley  <gaiusmod2@gmail.com>
2597         PR modula2/109103
2598         * gm2-compiler/M2ALU.def (PushString): New parameter issueError.
2599         * gm2-compiler/M2ALU.mod (PushString): New parameter issueError.
2600         * gm2-compiler/SymbolTable.mod (PushString): New parameter issueError.
2601         * gm2-gcc/m2decl.cc (m2decl_DetermineSizeOfConstant): Pass
2602         location to interpret_m2_integer.
2603         (m2decl_BuildConstLiteralNumber): New parameter issueError.
2604         * gm2-gcc/m2expr.cc (m2expr_IsTrue): Replace int with bool.
2605         (m2expr_IsFalse): Replace int with bool.
2606         (m2expr_AreConstantsEqual): Replace int with bool.
2607         (m2expr_BuildBinaryForeachWordDo): Call m2linemap_internal_error_at.
2608         (append_digit): Ditto.
2609         (m2expr_interpret_integer): Add location parameter.
2610         (append_m2_digit): Call m2linemap_internal_error_at.
2611         (m2expr_interpret_m2_integer): Add location parameter.
2612         (m2expr_GetSizeOf): Replace sizeof with SIZE in error message.
2613         * gm2-gcc/m2expr.h (m2expr_AreRealOrComplexConstantsEqual):
2614         Replace int with bool.
2615         (m2expr_AreConstantsEqual): Ditto.
2616         (m2expr_IsFalse): Ditto.
2617         (m2expr_IsTrue): Ditto.
2618         (m2expr_interpret_integer): Add location parameter.
2619         (m2expr_interpret_m2_integer): Add location parameter.
2620         * gm2-gcc/m2linemap.cc (mformat_value): New function.
2621         (expand_format): New function.
2622         (expand_message): New function.
2623         (gm2_internal_error_at): New function.
2624         (m2linemap_internal_error_at): New function.
2625         * gm2-gcc/m2linemap.h (m2linemap_internal_error_at): New function.
2626         * gm2-gcc/m2options.h (M2Options_SetISO): Replace int with bool.
2627         (M2Options_SetPIM): Ditto.
2628         (M2Options_SetPIM2): Ditto.
2629         (M2Options_SetPIM3): Ditto.
2630         (M2Options_SetPIM4): Ditto.
2631         (M2Options_SetFloatValueCheck): Ditto.
2632         (M2Options_SetWholeValueCheck): Ditto.
2633         (M2Options_GetISO): Ditto.
2634         (M2Options_GetPIM): Ditto.
2635         (M2Options_GetPIM2): Ditto.
2636         (M2Options_GetPIM3): Ditto.
2637         (M2Options_GetPIM4): Ditto.
2638         (M2Options_GetPositiveModFloor): Ditto.
2639         (M2Options_GetFloatValueCheck): Ditto.
2640         (M2Options_GetWholeValueCheck): Ditto.
2641         (M2Options_Setc): Ditto.
2642         (M2Options_Getc): Ditto.
2643         (M2Options_SetPPOnly): Ditto.
2644         (M2Options_GetPPOnly): Ditto.
2645         (M2Options_SetUselist): Ditto.
2646         (M2Options_SetAutoInit): Ditto.
2647         (M2Options_SetPositiveModFloor): Ditto.
2648         (M2Options_SetNilCheck): Ditto.
2649         (M2Options_SetWholeDiv): Ditto.
2650         (M2Options_SetIndex): Ditto.
2651         (M2Options_SetRange): Ditto.
2652         (M2Options_SetReturnCheck): Ditto.
2653         (M2Options_SetCaseCheck): Ditto.
2654         (M2Options_SetCheckAll): Ditto.
2655         (M2Options_SetExceptions): Ditto.
2656         (M2Options_SetStyle): Ditto.
2657         (M2Options_SetPedantic): Ditto.
2658         (M2Options_SetPedanticParamNames): Ditto.
2659         (M2Options_SetPedanticCast): Ditto.
2660         (M2Options_SetExtendedOpaque): Ditto.
2661         (M2Options_SetVerboseUnbounded): Ditto.
2662         (M2Options_SetXCode): Ditto.
2663         (M2Options_SetCompilerDebugging): Ditto.
2664         (M2Options_SetQuadDebugging): Ditto.
2665         (M2Options_SetDebugTraceQuad): Ditto.
2666         (M2Options_SetDebugTraceAPI): Ditto.
2667         (M2Options_SetSources): Ditto.
2668         (M2Options_SetUnboundedByReference): Ditto.
2669         (M2Options_SetDumpSystemExports): Ditto.
2670         (M2Options_SetOptimizing): Ditto.
2671         (M2Options_SetQuiet): Ditto.
2672         (M2Options_SetCC1Quiet): Ditto.
2673         (M2Options_SetCpp): Ditto.
2674         (M2Options_SetSwig): Ditto.
2675         (M2Options_SetWholeProgram): Ditto.
2676         (M2Options_SetDebugFunctionLineNumbers): Ditto.
2677         (M2Options_SetGenerateStatementNote): Ditto.
2678         (M2Options_GetCpp): Ditto.
2679         (M2Options_GetM2g): Ditto.
2680         (M2Options_SetM2g): Ditto.
2681         (M2Options_SetLowerCaseKeywords): Ditto.
2682         (M2Options_SetVerbose): Ditto.
2683         (M2Options_SetUnusedVariableChecking): Ditto.
2684         (M2Options_SetUnusedParameterChecking): Ditto.
2685         (M2Options_SetStrictTypeChecking): Ditto.
2686         (M2Options_SetWall): Ditto.
2687         (M2Options_SetSaveTemps): Ditto.
2688         (M2Options_GetSaveTemps): Ditto.
2689         (M2Options_SetScaffoldStatic): Ditto.
2690         (M2Options_SetScaffoldDynamic): Ditto.
2691         (M2Options_SetScaffoldMain): Ditto.
2692         (M2Options_SetGenModuleList): Ditto.
2693         (M2Options_SetShared): Ditto.
2694         * gm2-libs-ch/M2LINK.c: Ditto.
2695         * gm2-libs-ch/m2rts.h (M2RTS_RequestDependant): Replace
2696         const char * with const void *.
2697         (M2RTS_RegisterModule): Ditto.
2698         (M2RTS_ConstructModules): Ditto.
2699         * gm2-gcc/m2decl.def (DetermineSizeOfConstant): New parameter
2700         issueError.
2701         * gm2-gcc/m2decl.h (DetermineSizeOfConstant): New parameter
2702         issueError.
2704 2023-03-12  Gaius Mulley  <gaiusmod2@gmail.com>
2706         PR modula2/109089
2707         * gm2-compiler/M2GCCDeclare.mod (DeclareKnownType): Import.
2708         * gm2-gcc/gcc-consolidation.h (stdbool.h): Include.
2709         * gm2-gcc/init.h (defined): Change block start.
2710         * gm2-gcc/m2block.cc: Change FALSE to false, change TRUE to true.
2711         * gm2-gcc/m2block.h: Change int to bool.
2712         * gm2-gcc/m2builtins.cc: Ditto.
2713         * gm2-gcc/m2builtins.h: Ditto.
2714         * gm2-gcc/m2convert.cc: Change FALSE to false, TRUE to true and
2715         int to bool.
2716         * gm2-gcc/m2convert.h: Change int to bool.
2717         * gm2-gcc/m2decl.cc: Change int to bool.
2718         * gm2-gcc/m2decl.h: Change int to bool.
2719         * gm2-gcc/m2expr.cc: Change FALSE to false, TRUE to true and
2720         int to bool.
2721         * gm2-gcc/m2expr.h: Change int to bool.
2722         * gm2-gcc/m2statement.cc: Change FALSE to false, TRUE to true and
2723         int to bool.
2724         * gm2-gcc/m2statement.h: Change int to bool.
2725         * gm2-gcc/m2top.cc: Change int to bool.
2726         * gm2-gcc/m2top.h: Change int to bool.
2727         * gm2-gcc/m2tree.cc: Change int to bool.
2728         * gm2-gcc/m2tree.h: Change int to bool.
2729         * gm2-gcc/m2type.cc: Change int to bool.
2730         * gm2-gcc/m2type.h: Change int to bool.
2731         * gm2-lang.cc (convert_loc): Call convert_to_integer for BOOLEAN_TYPE.
2732         * gm2-libs/Builtins.def (isfinitef): Change return value from
2733         BOOLEAN to INTEGER.
2734         (isfinite): Ditto.
2735         (isfinitel): Ditto.
2736         * gm2-libs/Builtins.mod (isfinitef): Change return value from
2737         BOOLEAN to INTEGER.
2738         (isfinite): Ditto.
2739         (isfinitel): Ditto.
2740         * mc-boot/GASCII.cc: Rebuild.
2741         * mc-boot/GASCII.h: Rebuild.
2742         * mc-boot/GArgs.cc: Rebuild.
2743         * mc-boot/GArgs.h: Rebuild.
2744         * mc-boot/GAssertion.cc: Rebuild.
2745         * mc-boot/GAssertion.h: Rebuild.
2746         * mc-boot/GBreak.cc: Rebuild.
2747         * mc-boot/GBreak.h: Rebuild.
2748         * mc-boot/GCOROUTINES.h: Rebuild.
2749         * mc-boot/GCmdArgs.cc: Rebuild.
2750         * mc-boot/GCmdArgs.h: Rebuild.
2751         * mc-boot/GDebug.cc: Rebuild.
2752         * mc-boot/GDebug.h: Rebuild.
2753         * mc-boot/GDynamicStrings.cc: Rebuild.
2754         * mc-boot/GDynamicStrings.h: Rebuild.
2755         * mc-boot/GEnvironment.cc: Rebuild.
2756         * mc-boot/GEnvironment.h: Rebuild.
2757         * mc-boot/GFIO.cc: Rebuild.
2758         * mc-boot/GFIO.h: Rebuild.
2759         * mc-boot/GFormatStrings.cc: Rebuild.
2760         * mc-boot/GFormatStrings.h: Rebuild.
2761         * mc-boot/GFpuIO.cc: Rebuild.
2762         * mc-boot/GFpuIO.h: Rebuild.
2763         * mc-boot/GIO.cc: Rebuild.
2764         * mc-boot/GIO.h: Rebuild.
2765         * mc-boot/GIndexing.cc: Rebuild.
2766         * mc-boot/GIndexing.h: Rebuild.
2767         * mc-boot/GM2Dependent.cc: Rebuild.
2768         * mc-boot/GM2Dependent.h: Rebuild.
2769         * mc-boot/GM2EXCEPTION.cc: Rebuild.
2770         * mc-boot/GM2EXCEPTION.h: Rebuild.
2771         * mc-boot/GM2LINK.h: Rebuild.
2772         * mc-boot/GM2RTS.cc: Rebuild.
2773         * mc-boot/GM2RTS.h: Rebuild.
2774         * mc-boot/GMemUtils.cc: Rebuild.
2775         * mc-boot/GMemUtils.h: Rebuild.
2776         * mc-boot/GNumberIO.cc: Rebuild.
2777         * mc-boot/GNumberIO.h: Rebuild.
2778         * mc-boot/GPushBackInput.cc: Rebuild.
2779         * mc-boot/GPushBackInput.h: Rebuild.
2780         * mc-boot/GRTExceptions.cc: Rebuild.
2781         * mc-boot/GRTExceptions.h: Rebuild.
2782         * mc-boot/GRTco.h: Rebuild.
2783         * mc-boot/GRTentity.h: Rebuild.
2784         * mc-boot/GRTint.cc: Rebuild.
2785         * mc-boot/GRTint.h: Rebuild.
2786         * mc-boot/GSArgs.cc: Rebuild.
2787         * mc-boot/GSArgs.h: Rebuild.
2788         * mc-boot/GSFIO.cc: Rebuild.
2789         * mc-boot/GSFIO.h: Rebuild.
2790         * mc-boot/GSYSTEM.h: Rebuild.
2791         * mc-boot/GSelective.h: Rebuild.
2792         * mc-boot/GStdIO.cc: Rebuild.
2793         * mc-boot/GStdIO.h: Rebuild.
2794         * mc-boot/GStorage.cc: Rebuild.
2795         * mc-boot/GStorage.h: Rebuild.
2796         * mc-boot/GStrCase.cc: Rebuild.
2797         * mc-boot/GStrCase.h: Rebuild.
2798         * mc-boot/GStrIO.cc: Rebuild.
2799         * mc-boot/GStrIO.h: Rebuild.
2800         * mc-boot/GStrLib.cc: Rebuild.
2801         * mc-boot/GStrLib.h: Rebuild.
2802         * mc-boot/GStringConvert.cc: Rebuild.
2803         * mc-boot/GStringConvert.h: Rebuild.
2804         * mc-boot/GSysExceptions.h: Rebuild.
2805         * mc-boot/GSysStorage.cc: Rebuild.
2806         * mc-boot/GSysStorage.h: Rebuild.
2807         * mc-boot/GTimeString.cc: Rebuild.
2808         * mc-boot/GTimeString.h: Rebuild.
2809         * mc-boot/GUnixArgs.h: Rebuild.
2810         * mc-boot/Galists.cc: Rebuild.
2811         * mc-boot/Galists.h: Rebuild.
2812         * mc-boot/Gdecl.cc: Rebuild.
2813         * mc-boot/Gdecl.h: Rebuild.
2814         * mc-boot/Gdtoa.h: Rebuild.
2815         * mc-boot/Gerrno.h: Rebuild.
2816         * mc-boot/Gkeyc.cc: Rebuild.
2817         * mc-boot/Gkeyc.h: Rebuild.
2818         * mc-boot/Gldtoa.h: Rebuild.
2819         * mc-boot/Glibc.h: Rebuild.
2820         * mc-boot/Glibm.h: Rebuild.
2821         * mc-boot/Glists.cc: Rebuild.
2822         * mc-boot/Glists.h: Rebuild.
2823         * mc-boot/GmcComment.cc: Rebuild.
2824         * mc-boot/GmcComment.h: Rebuild.
2825         * mc-boot/GmcComp.cc: Rebuild.
2826         * mc-boot/GmcComp.h: Rebuild.
2827         * mc-boot/GmcDebug.cc: Rebuild.
2828         * mc-boot/GmcDebug.h: Rebuild.
2829         * mc-boot/GmcError.cc: Rebuild.
2830         * mc-boot/GmcError.h: Rebuild.
2831         * mc-boot/GmcFileName.cc: Rebuild.
2832         * mc-boot/GmcFileName.h: Rebuild.
2833         * mc-boot/GmcLexBuf.cc: Rebuild.
2834         * mc-boot/GmcLexBuf.h: Rebuild.
2835         * mc-boot/GmcMetaError.cc: Rebuild.
2836         * mc-boot/GmcMetaError.h: Rebuild.
2837         * mc-boot/GmcOptions.cc: Rebuild.
2838         * mc-boot/GmcOptions.h: Rebuild.
2839         * mc-boot/GmcPreprocess.cc: Rebuild.
2840         * mc-boot/GmcPreprocess.h: Rebuild.
2841         * mc-boot/GmcPretty.cc: Rebuild.
2842         * mc-boot/GmcPretty.h: Rebuild.
2843         * mc-boot/GmcPrintf.cc: Rebuild.
2844         * mc-boot/GmcPrintf.h: Rebuild.
2845         * mc-boot/GmcQuiet.cc: Rebuild.
2846         * mc-boot/GmcQuiet.h: Rebuild.
2847         * mc-boot/GmcReserved.cc: Rebuild.
2848         * mc-boot/GmcReserved.h: Rebuild.
2849         * mc-boot/GmcSearch.cc: Rebuild.
2850         * mc-boot/GmcSearch.h: Rebuild.
2851         * mc-boot/GmcStack.cc: Rebuild.
2852         * mc-boot/GmcStack.h: Rebuild.
2853         * mc-boot/GmcStream.cc: Rebuild.
2854         * mc-boot/GmcStream.h: Rebuild.
2855         * mc-boot/Gmcflex.h: Rebuild.
2856         * mc-boot/Gmcp1.cc: Rebuild.
2857         * mc-boot/Gmcp1.h: Rebuild.
2858         * mc-boot/Gmcp2.cc: Rebuild.
2859         * mc-boot/Gmcp2.h: Rebuild.
2860         * mc-boot/Gmcp3.cc: Rebuild.
2861         * mc-boot/Gmcp3.h: Rebuild.
2862         * mc-boot/Gmcp4.cc: Rebuild.
2863         * mc-boot/Gmcp4.h: Rebuild.
2864         * mc-boot/Gmcp5.cc: Rebuild.
2865         * mc-boot/Gmcp5.h: Rebuild.
2866         * mc-boot/GnameKey.cc: Rebuild.
2867         * mc-boot/GnameKey.h: Rebuild.
2868         * mc-boot/GsymbolKey.cc: Rebuild.
2869         * mc-boot/GsymbolKey.h: Rebuild.
2870         * mc-boot/Gtermios.h: Rebuild.
2871         * mc-boot/Gtop.cc: Rebuild.
2872         * mc-boot/Gvarargs.cc: Rebuild.
2873         * mc-boot/Gvarargs.h: Rebuild.
2874         * mc-boot/Gwlists.cc: Rebuild.
2875         * mc-boot/Gwlists.h: Rebuild.
2876         * mc-boot/Gwrapc.h: Rebuild.
2877         * mc/decl.mod (doBoolC): New procedure.
2878         (doBaseC): Call doBoolC.
2879         * mc/keyc.mod: Import useBool.
2880         (genBool): New procedure.
2881         (genDefs): Call genBool.
2882         * mc/mcOptions.def (useBool): New procedure.
2883         * mc/mcOptions.mod (useBool): New procedure.
2884         (useBoolType): New variable.
2885         (optionIs): Assign useBoolType to TRUE.
2887 2023-03-04  Gaius Mulley  <gaiusmod2@gmail.com>
2889         * mc-boot-ch/GBuiltins.cc: New file.
2890         * mc-boot-ch/Gdtoa.cc: New file.
2891         * mc-boot-ch/Gerrno.cc: New file.
2892         * mc-boot-ch/Gldtoa.cc: New file.
2893         * mc-boot-ch/Gm2rtsdummy.cc: New file.
2894         * mc-boot/GASCII.cc: New file.
2895         * mc-boot/GArgs.cc: New file.
2896         * mc-boot/GAssertion.cc: New file.
2897         * mc-boot/GBreak.cc: New file.
2898         * mc-boot/GCmdArgs.cc: New file.
2899         * mc-boot/GDebug.cc: New file.
2900         * mc-boot/GDynamicStrings.cc: New file.
2901         * mc-boot/GEnvironment.cc: New file.
2902         * mc-boot/GFIO.cc: New file.
2903         * mc-boot/GFormatStrings.cc: New file.
2904         * mc-boot/GFpuIO.cc: New file.
2905         * mc-boot/GIO.cc: New file.
2906         * mc-boot/GIndexing.cc: New file.
2907         * mc-boot/GM2Dependent.cc: New file.
2908         * mc-boot/GM2EXCEPTION.cc: New file.
2909         * mc-boot/GM2RTS.cc: New file.
2910         * mc-boot/GMemUtils.cc: New file.
2911         * mc-boot/GNumberIO.cc: New file.
2912         * mc-boot/GPushBackInput.cc: New file.
2913         * mc-boot/GRTExceptions.cc: New file.
2914         * mc-boot/GRTint.cc: New file.
2915         * mc-boot/GSArgs.cc: New file.
2916         * mc-boot/GSFIO.cc: New file.
2917         * mc-boot/GStdIO.cc: New file.
2918         * mc-boot/GStorage.cc: New file.
2919         * mc-boot/GStrCase.cc: New file.
2920         * mc-boot/GStrIO.cc: New file.
2921         * mc-boot/GStrLib.cc: New file.
2922         * mc-boot/GStringConvert.cc: New file.
2923         * mc-boot/GSysStorage.cc: New file.
2924         * mc-boot/GTimeString.cc: New file.
2925         * mc-boot/Galists.cc: New file.
2926         * mc-boot/Gdecl.cc: New file.
2927         * mc-boot/Gkeyc.cc: New file.
2928         * mc-boot/Glists.cc: New file.
2929         * mc-boot/GmcComment.cc: New file.
2930         * mc-boot/GmcComp.cc: New file.
2931         * mc-boot/GmcDebug.cc: New file.
2932         * mc-boot/GmcError.cc: New file.
2933         * mc-boot/GmcFileName.cc: New file.
2934         * mc-boot/GmcLexBuf.cc: New file.
2935         * mc-boot/GmcMetaError.cc: New file.
2936         * mc-boot/GmcOptions.cc: New file.
2937         * mc-boot/GmcPreprocess.cc: New file.
2938         * mc-boot/GmcPretty.cc: New file.
2939         * mc-boot/GmcPrintf.cc: New file.
2940         * mc-boot/GmcQuiet.cc: New file.
2941         * mc-boot/GmcReserved.cc: New file.
2942         * mc-boot/GmcSearch.cc: New file.
2943         * mc-boot/GmcStack.cc: New file.
2944         * mc-boot/GmcStream.cc: New file.
2945         * mc-boot/Gmcp1.cc: New file.
2946         * mc-boot/Gmcp2.cc: New file.
2947         * mc-boot/Gmcp3.cc: New file.
2948         * mc-boot/Gmcp4.cc: New file.
2949         * mc-boot/Gmcp5.cc: New file.
2950         * mc-boot/GnameKey.cc: New file.
2951         * mc-boot/GsymbolKey.cc: New file.
2952         * mc-boot/Gtop.cc: New file.
2953         * mc-boot/Gvarargs.cc: New file.
2954         * mc-boot/Gwlists.cc: New file.
2955         * pge-boot/GASCII.cc: New file.
2956         * pge-boot/GArgs.cc: New file.
2957         * pge-boot/GAssertion.cc: New file.
2958         * pge-boot/GBuiltins.cc: New file.
2959         * pge-boot/GDebug.cc: New file.
2960         * pge-boot/GDynamicStrings.cc: New file.
2961         * pge-boot/GFIO.cc: New file.
2962         * pge-boot/GIO.cc: New file.
2963         * pge-boot/GIndexing.cc: New file.
2964         * pge-boot/GLists.cc: New file.
2965         * pge-boot/GM2Dependent.cc: New file.
2966         * pge-boot/GM2EXCEPTION.cc: New file.
2967         * pge-boot/GM2LINK.cc: New file.
2968         * pge-boot/GM2RTS.cc: New file.
2969         * pge-boot/GNameKey.cc: New file.
2970         * pge-boot/GNumberIO.cc: New file.
2971         * pge-boot/GOutput.cc: New file.
2972         * pge-boot/GPushBackInput.cc: New file.
2973         * pge-boot/GRTExceptions.cc: New file.
2974         * pge-boot/GRTco.cc: New file.
2975         * pge-boot/GSFIO.cc: New file.
2976         * pge-boot/GSYSTEM.cc: New file.
2977         * pge-boot/GSelective.cc: New file.
2978         * pge-boot/GStdIO.cc: New file.
2979         * pge-boot/GStorage.cc: New file.
2980         * pge-boot/GStrCase.cc: New file.
2981         * pge-boot/GStrIO.cc: New file.
2982         * pge-boot/GStrLib.cc: New file.
2983         * pge-boot/GSymbolKey.cc: New file.
2984         * pge-boot/GSysExceptions.cc: New file.
2985         * pge-boot/GSysStorage.cc: New file.
2986         * pge-boot/Gabort.cc: New file.
2987         * pge-boot/Gbnflex.cc: New file.
2988         * pge-boot/Gcbuiltin.cc: New file.
2989         * pge-boot/Gdtoa.cc: New file.
2990         * pge-boot/Gerrno.cc: New file.
2991         * pge-boot/Gldtoa.cc: New file.
2992         * pge-boot/Glibc.cc: New file.
2993         * pge-boot/Glibm.cc: New file.
2994         * pge-boot/Gmcrts.cc: New file.
2995         * pge-boot/Gpge.cc: New file.
2996         * pge-boot/Gwrapc.cc: New file.
2997         * pge-boot/main.cc: New file.
2998         * pge-boot/network.cc: New file.
3000 2023-03-04  Gaius Mulley  <gaiusmod2@gmail.com>
3002         * Make-lang.in (MC-LIB-BOOT-C): Rename to MC-LIB-BOOT-CC.
3003         (MC-BOOT-C): Rename to MC-BOOT-CC.
3004         (BUILD-MC-BOOT-C): Rename to BUILD-MC-BOOT-CC.
3005         (BUILD-MC-BOOT-AUTO-C): Rename to BUILD-MC-BOOT-AUTO-CC.
3006         (m2/mc-boot/$(SRC_PREFIX)%.o): Change source file extension to .cc.
3007         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
3008         * Make-maintainer.in (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): Change
3009         source file extension to .cc.
3010         (m2/gm2-ppg-boot/main.o): Ditto.
3011         (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): Ditto.
3012         to .cc.
3013         (m2/gm2-pg-boot/main.o): Ditto.
3014         (m2/gm2-pge-boot/$(SRC_PREFIX)ldtoa.o): Ditto.
3015         (m2/gm2-pge-boot/$(SRC_PREFIX)dtoa.o): Ditto.
3016         (m2/gm2-pge-boot/$(SRC_PREFIX)errno.o): Ditto.
3017         (m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.o): Ditto.
3018         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Ditto.
3019         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Ditto.
3020         (m2/gm2-pge-boot/$(SRC_PREFIX)pge.o): Ditto.
3021         (m2/gm2-pge-boot/main.o): Ditto.
3022         (mc-push): Ditto.
3023         (mc-clean): Ditto.
3024         (mc-stage2): Ditto.
3025         ((objdir)/m2/mc-boot-gen): Ditto.
3026         (m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Ditto.
3027         (m2/mc-boot-gen/$(SRC_PREFIX)%.c): Ditto.
3028         * mc-boot-ch/GBuiltins.c: Correct comment and rename.
3029         * mc-boot-ch/Gdtoa.c: Correct comment and rename.
3030         * mc-boot-ch/Gldtoa.c: Correct comment and rename
3031         * mc-boot-ch/Gtermios.cc: Rename from Gtermios.c.
3032         * mc-boot-ch/Gerrno.c: Rename.
3033         * mc-boot-ch/GRTco.c: Removed.
3034         * mc-boot/GASCII.c: Rename to mc-boot/GASCII.cc.
3035         * mc-boot/GArgs.c: Rename to mc-boot/GArgs.cc.
3036         * mc-boot/GAssertion.c: Rename to mc-boot/GAssertion.cc.
3037         * mc-boot/GBreak.c: Rename to mc-boot/GBreak.cc.
3038         * mc-boot/GCmdArgs.c: Rename to mc-boot/GCmdArgs.cc.
3039         * mc-boot/GDebug.c: Rename to mc-boot/GDebug.cc.
3040         * mc-boot/GDynamicStrings.c: Rename to mc-boot/GDynamicStrings.cc.
3041         * mc-boot/GEnvironment.c: Rename to mc-boot/GEnvironment.cc.
3042         * mc-boot/GFIO.c: Rename to mc-boot/GFIO.cc.
3043         * mc-boot/GFormatStrings.c: Rename to mc-boot/GFormatStrings.cc.
3044         * mc-boot/GFpuIO.c: Rename to mc-boot/GFpuIO.cc.
3045         * mc-boot/GIO.c: Rename to mc-boot/GIO.cc.
3046         * mc-boot/GIndexing.c: Rename to mc-boot/GIndexing.cc.
3047         * mc-boot/GM2Dependent.c: Rename to mc-boot/GM2Dependent.cc.
3048         * mc-boot/GM2EXCEPTION.c: Rename to mc-boot/GM2EXCEPTION.cc.
3049         * mc-boot/GM2RTS.c: Rename to mc-boot/GM2RTS.cc.
3050         * mc-boot/GMemUtils.c: Rename to mc-boot/GMemUtils.cc.
3051         * mc-boot/GNumberIO.c: Rename to mc-boot/GNumberIO.cc.
3052         * mc-boot/GPushBackInput.c: Rename to mc-boot/GPushBackInput.cc.
3053         * mc-boot/GRTExceptions.c: Rename to mc-boot/GRTExceptions.cc.
3054         * mc-boot/GRTint.c: Rename to mc-boot/GRTint.cc.
3055         * mc-boot/GSArgs.c: Rename to mc-boot/GSArgs.cc.
3056         * mc-boot/GSFIO.c: Rename to mc-boot/GSFIO.cc.
3057         * mc-boot/GStdIO.c: Rename to mc-boot/GStdIO.cc.
3058         * mc-boot/GStorage.c: Rename to mc-boot/GStorage.cc.
3059         * mc-boot/GStrCase.c: Rename to mc-boot/GStrCase.cc.
3060         * mc-boot/GStrIO.c: Rename to mc-boot/GStrIO.cc.
3061         * mc-boot/GStrLib.c: Rename to mc-boot/GStrLib.cc.
3062         * mc-boot/GStringConvert.c: Rename to mc-boot/GStringConvert.cc.
3063         * mc-boot/GSysStorage.c: Rename to mc-boot/GSysStorage.cc.
3064         * mc-boot/GTimeString.c: Rename to mc-boot/GTimeString.cc.
3065         * mc-boot/Galists.c: Rename to mc-boot/Galists.cc.
3066         * mc-boot/Gdecl.c: Rename to mc-boot/Gdecl.cc.
3067         * mc-boot/Gkeyc.c: Rename to mc-boot/Gkeyc.cc.
3068         * mc-boot/Glists.c: Rename to mc-boot/Glists.cc.
3069         * mc-boot/GmcComment.c: Rename to mc-boot/GmcComment.cc.
3070         * mc-boot/GmcComp.c: Rename to mc-boot/GmcComp.cc.
3071         * mc-boot/GmcDebug.c: Rename to mc-boot/GmcDebug.cc.
3072         * mc-boot/GmcError.c: Rename to mc-boot/GmcError.cc.
3073         * mc-boot/GmcFileName.c: Rename to mc-boot/GmcFileName.cc.
3074         * mc-boot/GmcLexBuf.c: Rename to mc-boot/GmcLexBuf.cc.
3075         * mc-boot/GmcMetaError.c: Rename to mc-boot/GmcMetaError.cc.
3076         * mc-boot/GmcOptions.c: Rename to mc-boot/GmcOptions.cc.
3077         * mc-boot/GmcPreprocess.c: Rename to mc-boot/GmcPreprocess.cc.
3078         * mc-boot/GmcPretty.c: Rename to mc-boot/GmcPretty.cc.
3079         * mc-boot/GmcPrintf.c: Rename to mc-boot/GmcPrintf.cc.
3080         * mc-boot/GmcQuiet.c: Rename to mc-boot/GmcQuiet.cc.
3081         * mc-boot/GmcReserved.c: Rename to mc-boot/GmcReserved.cc.
3082         * mc-boot/GmcSearch.c: Rename to mc-boot/GmcSearch.cc.
3083         * mc-boot/GmcStack.c: Rename to mc-boot/GmcStack.cc.
3084         * mc-boot/GmcStream.c: Rename to mc-boot/GmcStream.cc.
3085         * mc-boot/Gmcp1.c: Rename to mc-boot/Gmcp1.cc.
3086         * mc-boot/Gmcp2.c: Rename to mc-boot/Gmcp2.cc.
3087         * mc-boot/Gmcp3.c: Rename to mc-boot/Gmcp3.cc.
3088         * mc-boot/Gmcp4.c: Rename to mc-boot/Gmcp4.cc.
3089         * mc-boot/Gmcp5.c: Rename to mc-boot/Gmcp5.cc.
3090         * mc-boot/GnameKey.c: Rename to mc-boot/GnameKey.cc.
3091         * mc-boot/GsymbolKey.c: Rename to mc-boot/GsymbolKey.cc.
3092         * mc-boot/Gtop.c: Rename to mc-boot/Gtop.cc.
3093         * mc-boot/Gvarargs.c: Rename to mc-boot/Gvarargs.cc.
3094         * mc-boot/Gwlists.c: Rename to mc-boot/Gwlists.cc.
3095         * pge-boot/GASCII.c: Rename to pge-boot/GASCII.cc.
3096         * pge-boot/GArgs.c: Rename to pge-boot/GArgs.cc.
3097         * pge-boot/GAssertion.c: Rename to pge-boot/GAssertion.cc.
3098         * pge-boot/GBuiltins.c: Rename to pge-boot/GBuiltins.cc.
3099         * pge-boot/GDebug.c: Rename to pge-boot/GDebug.cc.
3100         * pge-boot/GDynamicStrings.c: Rename to pge-boot/GDynamicStrings.cc.
3101         * pge-boot/GFIO.c: Rename to pge-boot/GFIO.cc.
3102         * pge-boot/GIO.c: Rename to pge-boot/GIO.cc.
3103         * pge-boot/GIndexing.c: Rename to pge-boot/GIndexing.cc.
3104         * pge-boot/GLists.c: Rename to pge-boot/GLists.cc.
3105         * pge-boot/GM2Dependent.c: Rename to pge-boot/GM2Dependent.cc.
3106         * pge-boot/GM2EXCEPTION.c: Rename to pge-boot/GM2EXCEPTION.cc.
3107         * pge-boot/GM2LINK.c: Rename to pge-boot/GM2LINK.cc.
3108         * pge-boot/GM2RTS.c: Rename to pge-boot/GM2RTS.cc.
3109         * pge-boot/GNameKey.c: Rename to pge-boot/GNameKey.cc.
3110         * pge-boot/GNumberIO.c: Rename to pge-boot/GNumberIO.cc.
3111         * pge-boot/GOutput.c: Rename to pge-boot/GOutput.cc.
3112         * pge-boot/GPushBackInput.c: Rename to pge-boot/GPushBackInput.cc.
3113         * pge-boot/GRTExceptions.c: Rename to pge-boot/GRTExceptions.cc.
3114         * pge-boot/GRTco.c: Rename to pge-boot/GRTco.cc.
3115         * pge-boot/GSFIO.c: Rename to pge-boot/GSFIO.cc.
3116         * pge-boot/GSYSTEM.c: Rename to pge-boot/GSYSTEM.cc.
3117         * pge-boot/GSelective.c: Rename to pge-boot/GSelective.cc.
3118         * pge-boot/GStdIO.c: Rename to pge-boot/GStdIO.cc.
3119         * pge-boot/GStorage.c: Rename to pge-boot/GStorage.cc.
3120         * pge-boot/GStrCase.c: Rename to pge-boot/GStrCase.cc.
3121         * pge-boot/GStrIO.c: Rename to pge-boot/GStrIO.cc.
3122         * pge-boot/GStrLib.c: Rename to pge-boot/GStrLib.cc.
3123         * pge-boot/GSymbolKey.c: Rename to pge-boot/GSymbolKey.cc.
3124         * pge-boot/GSysExceptions.c: Rename to pge-boot/GSysExceptions.cc.
3125         * pge-boot/GSysStorage.c: Rename to pge-boot/GSysStorage.cc.
3126         * pge-boot/Gabort.c: Rename to pge-boot/Gabort.cc.
3127         * pge-boot/Gbnflex.c: Rename to pge-boot/Gbnflex.cc.
3128         * pge-boot/Gcbuiltin.c: Rename to pge-boot/Gcbuiltin.cc.
3129         * pge-boot/Gdtoa.c: Rename to pge-boot/Gdtoa.cc.
3130         * pge-boot/Gerrno.c: Rename to pge-boot/Gerrno.cc.
3131         * pge-boot/Gldtoa.c: Rename to pge-boot/Gldtoa.cc.
3132         * pge-boot/Glibc.c: Rename to pge-boot/Glibc.cc.
3133         * pge-boot/Glibm.c: Rename to pge-boot/Glibm.cc.
3134         * pge-boot/Gmcrts.c: Rename to pge-boot/Gmcrts.cc.
3135         * pge-boot/Gpge.c: Rename to pge-boot/Gpge.cc.
3136         * pge-boot/Gwrapc.c: Rename to pge-boot/Gwrapc.cc.
3137         * pge-boot/README: Correct description.
3138         * pge-boot/main.c: Rename to pge-boot/main.cc.
3139         * pge-boot/network.c: Rename to pge-boot/network.cc.
3141 2023-02-28  Gaius Mulley  <gaiusmod2@gmail.com>
3143         PR modula2/108956
3144         * Make-lang.in (m2/gm2-libs-boot/M2RTS.o): New specific rule to
3145         add the --suppress-noreturn option.
3146         * Make-maintainer.in (m2/gm2-ppg-boot/$(SRC_PREFIX)M2RTS.o): New
3147         specific rule to add the --suppress-noreturn option.
3148         (m2/gm2-pg-boot/$(SRC_PREFIX)M2RTS.o): New
3149         specific rule to add the --suppress-noreturn option.
3150         (m2/gm2-pg-boot/$(SRC_PREFIX)%.o): Add missing $(srcdir).
3151         (m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.o): New
3152         specific rule to add the --suppress-noreturn option.
3153         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Add missing $(srcdir).
3154         * gm2-libs-ch/UnixArgs.cc (LIBNAME): New define.
3155         (_M2_UnixArgs_ctor): Add LIBNAME parameter to RegisterModule.
3156         * gm2-libs-ch/dtoa.cc (LIBNAME): New define.
3157         (_M2_dtoa_ctor): Add LIBNAME parameter to RegisterModule.
3158         * gm2-libs-ch/ldtoa.cc (LIBNAME): New define.
3159         (_M2_ldtoa_ctor): Add LIBNAME parameter to RegisterModule.
3160         * pge-boot/m2rts.h (M2RTS_RegisterModule): Add libname
3161         parameter.
3162         * gm2-libs-ch/m2rts.h (M2RTS_RegisterModule): Add libname
3163         parameter.
3164         * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_ctor): Remove.
3165         * pge-boot/GUnixArgs.cc (LIBNAME): New define.
3166         (_M2_UnixArgs_ctor): Add LIBNAME parameter to RegisterModule.
3167         * gm2-libs/RTint.def (AttachVector): Rename parameter.
3168         * mc-boot/GDynamicStrings.c: Rebuilt.
3169         * mc-boot/GFIO.c: Rebuilt.
3170         * mc-boot/GIndexing.c: Rebuilt.
3171         * mc-boot/GM2EXCEPTION.c: Rebuilt.
3172         * mc-boot/GPushBackInput.c: Rebuilt.
3173         * mc-boot/GRTExceptions.c: Rebuilt.
3174         * mc-boot/GRTint.c: Rebuilt.
3175         * mc-boot/GRTint.h: Rebuilt.
3176         * mc-boot/GStdIO.c: Rebuilt.
3177         * mc-boot/GStringConvert.c: Rebuilt.
3178         * mc-boot/GSysStorage.c: Rebuilt.
3179         * mc-boot/Gdecl.c: Rebuilt.
3180         * mc-boot/Gkeyc.c: Rebuilt.
3181         * mc-boot/GmcComment.c: Rebuilt.
3182         * mc-boot/GmcComp.c: Rebuilt.
3183         * mc-boot/GmcDebug.c: Rebuilt.
3184         * mc-boot/GmcMetaError.c: Rebuilt.
3185         * mc-boot/GmcOptions.c: Rebuilt.
3186         * mc-boot/GmcOptions.h: Rebuilt.
3187         * mc-boot/GmcStack.c: Rebuilt.
3188         * mc-boot/GnameKey.c: Rebuilt.
3189         * mc-boot/GsymbolKey.c: Rebuilt.
3190         * mc/decl.mod:: Rebuilt.
3191         * mc/mcOptions.def: Rebuilt.
3192         * mc/mcOptions.mod:: Rebuilt.
3193         * pge-boot/GDynamicStrings.c: Rebuilt.
3194         * pge-boot/GFIO.c: Rebuilt.
3195         * pge-boot/GIndexing.c: Rebuilt.
3196         * pge-boot/GM2EXCEPTION.c: Rebuilt.
3197         * pge-boot/GM2RTS.c: Rebuilt.
3198         * pge-boot/GNameKey.c: Rebuilt.
3199         * pge-boot/GPushBackInput.c: Rebuilt.
3200         * pge-boot/GRTExceptions.c: Rebuilt.
3201         * pge-boot/GStdIO.c: Rebuilt.
3202         * pge-boot/GSymbolKey.c: Rebuilt.
3203         * pge-boot/GSysStorage.c: Rebuilt.
3205 2023-02-25  Gaius Mulley  <gaiusmod2@gmail.com>
3207         PR modula2/108261
3208         * Make-lang.in (GM2-COMP-BOOT-DEFS): DynamicStringPath.def
3209         remove.  DynamicPath.def add.
3210         (GM2-COMP-BOOT-MODS): DynamicStringPath.mod remove.
3211         DynamicPath.mod add.
3212         * Make-maintainer.in (BUILD-BOOT-PPG-H): New dependency.
3213         (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PPG-H) Add
3214         dependency.
3215         (PGE-DEF): New definition.
3216         (BUILD-BOOT-PG-H): New dependency.
3217         (m2/gm2-pg-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PG-H) Add
3218         dependency.
3219         (BUILD-BOOT-PGE-H): New dependency.
3220         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PGE-H) Add
3221         dependency.
3222         (GM2PATH): Add pathname entries.
3223         (m2/boot-bin/mc-devel$(exeext)): Add m2/mc-boot-ch/Gm2rtsdummy.o
3224         dependency.
3225         (m2/boot-bin/mc-opt$(exeext)): Fix -I path.
3226         * gm2-compiler/DynamicStringPath.def: Renamed module to
3227         DynamicPath.
3228         (GetUserPath): Remove.
3229         (GetSystemPath): Remove.
3230         (SetUserPath): Remove.
3231         (SetSystemPath): Remove.
3232         (DumpPath): New procedure definition.
3233         * gm2-compiler/DynamicStringPath.mod: Renamed module to
3234         DynamicPath.
3235         (GetUserPath): Remove.
3236         (GetSystemPath): Remove.
3237         (SetUserPath): Remove.
3238         (SetSystemPath): Remove.
3239         (DumpPath): Remove Debugging conditional.
3240         * gm2-compiler/M2AsmUtil.mod: Import EqualArray, NulName and
3241         GetLibName.
3242         (Debugging): New declaration.
3243         (GetFullSymName): Re-implemented to prefix (mange) libname
3244         to any extern variable/procedure which is IsExportQualified.
3245         * gm2-compiler/M2Comp.mod (qprintLibName): New procedure.
3246         * gm2-compiler/M2Graph.mod (resolveImports): Add libname.
3247         * gm2-compiler/M2Options.def (SetM2Prefix): New procedure.
3248         (GetM2Prefix): New procedure function.
3249         (SetM2PathName): New procedure.
3250         (GetM2PathName): New procedure function.
3251         * gm2-compiler/M2Options.mod: (SetM2Prefix): New procedure implemented.
3252         (GetM2Prefix): New procedure function implemented.
3253         (SetM2PathName): New procedure implemented.
3254         (GetM2PathName): New procedure function implemented.
3255         (RuntimeModuleOverride): Set to DefaultRuntimeModuleOverride.
3256         * gm2-compiler/M2Quads.mod: Import GetLibName.
3257         (SafeRequestSym) Pass result of GetLibName to RequestDependant.
3258         (callRequestDependant): Add libname as a parameter.
3259         (BuildM2InitFunction): Add libname as a parameter.
3260         (BuildM2FiniFunction): Add libname as a parameter.
3261         (BuildM2CtorFunction): Add libname as a parameter.
3262         * gm2-compiler/M2Scaffold.mod (LookupModuleSym): Set LibName
3263         if a definition source was found.
3264         * gm2-compiler/M2Search.def (FindSourceFile): Add named library parameter.
3265         (FindSourceDefFile): Add named library parameter.
3266         (FindSourceModFile): Add named library parameter.
3267         * gm2-compiler/M2Search.mod (FindSourceFile): Reimplement.
3268         (FindSourceDefFile): Add named library parameter.
3269         (FindSourceModFile): Add named library parameter.
3270         * gm2-compiler/SymbolTable.def (MakeProcedureCtorExtern): Add
3271         libname parameter.
3272         (PutLibName): New procedure.
3273         (GetLibName): New procedure function.
3274         * gm2-compiler/SymbolTable.mod (MakeProcedureCtorExtern): Add
3275         libname parameter.
3276         (GenName): Add libname parameter.
3277         (InitCtorFields): Add moduleSym as a parameter.
3278         (PutCtorExtern): Add libname parameter to GenName.
3279         * gm2-gcc/init.cc (_M2_DynamicStringPath_init): Rename function...
3280         (_M2_DynamicPath_init): ...to this.
3281         (_M2_PathName_init): Added.
3282         * gm2-gcc/m2decl.cc (m2decl_DeclareM2linkStaticInitialization):
3283         Add m2pim as the manged component of the exported symbol.
3284         (m2decl_DeclareM2linkForcedModuleInitOrder): Add m2pim mangle prefix.
3285         * gm2-gcc/m2options.h (M2Options_SetM2Prefix): New function.
3286         (M2Options_GetM2Prefix): New function.
3287         (M2Options_SetM2PathName): New function.
3288         (M2Options_GetM2PathName): New function.
3289         * gm2-lang.cc (push_back_Ipath): New function.
3290         (add_one_import_path): New function.
3291         (gm2_langhook_handle_option): Record -I component.  Call
3292         SetM2PathName when -fm2-pathname= is seen.  Record -fm2-pathnameI
3293         component.  Call SetM2Prefix when -fm2-prefix= is seen.
3294         (gm2_langhook_post_options): Iterative over pathname entries
3295         and call SetM2PathName, SetSearchPath as appropriate.
3296         * gm2-libs-iso/M2RTS.def (ConstructModules): Add libname parameter.
3297         (DeconstructModules): Add libname parameter.
3298         (RegisterModule): Add libname parameter.
3299         (RequestDependant): Add libname parameter.
3300         * gm2-libs-iso/M2RTS.mod (ConstructModules): Add libname parameter.
3301         (DeconstructModules): Add libname parameter.
3302         (RegisterModule): Add libname parameter.
3303         (RequestDependant): Add libname parameter.
3304         * gm2-libs-min/M2RTS.def (ConstructModules): Add libname parameter.
3305         (DeconstructModules): Add libname parameter.
3306         (RegisterModule): Add libname parameter.
3307         (RequestDependant): Add libname parameter.
3308         * gm2-libs-min/M2RTS.mod (ConstructModules): Add libname parameter.
3309         (DeconstructModules): Add libname parameter.
3310         (RegisterModule): Add libname parameter.
3311         (RequestDependant): Add libname parameter.
3312         * gm2-libs/M2Dependent.def (ConstructModules): Add libname parameter.
3313         (DeconstructModules): Add libname parameter.
3314         (RegisterModule): Add libname parameter.
3315         (RequestDependant): Add libname parameter.
3316         * gm2-libs/M2Dependent.mod (ConstructModules): Add libname parameter.
3317         (DeconstructModules): Add libname parameter.
3318         (RegisterModule): Add libname parameter.
3319         (RequestDependant): Add libname parameter.
3320         * gm2-libs/M2RTS.def (ConstructModules): Add libname parameter.
3321         (DeconstructModules): Add libname parameter.
3322         (RegisterModule): Add libname parameter.
3323         (RequestDependant): Add libname parameter.
3324         * gm2-libs/M2RTS.mod (ConstructModules): Add libname parameter.
3325         (DeconstructModules): Add libname parameter.
3326         (RegisterModule): Add libname parameter.
3327         (RequestDependant): Add libname parameter.
3328         * gm2-libs/RTint.mod (FindVector): Rename variables.
3329         (initInputVector): Rename variables.
3330         (initOutputVector): Rename variables.
3331         (InitTimeVector): Rename variables.
3332         (FindVectorNo): Rename variables.
3333         (FindPendingVector): Rename variables.
3334         (ReArmTimeVector): Rename variables.
3335         (GetTimeVector): Rename variables.
3336         (AttachVector): Rename variables.
3337         (AttachVector): Rename variables.
3338         (IncludeVector): Rename variables.
3339         (ExcludeVector): Rename variables.
3340         (AddFd): Rename variables.
3341         (AddFd): Rename variables.
3342         (DumpPendingQueue): Rename variables.
3343         (stop): Remove.
3344         (activatePending): Rename variables.
3345         (Listen): Rename variables.
3346         * gm2-libs/libc.def (snprintf): New function.
3347         * gm2-libs/sckt.def: Change all exported identifiers to be
3348         export qualified.
3349         * gm2spec.cc (push_back_Ipath): New function.
3350         (add_m2_I_path): New function.
3351         (lang_specific_driver): Skip -fm2-pathname= and remember pathname.
3352         Skip -I and record the path and current pathname.  Call add_m2_I_path.
3353         * lang-specs.h: Replace %{I*} with %{fm2-pathname*}.
3354         * lang.opt (-fm2-pathname=): New entry.
3355         (-fm2-pathname): New entry.
3356         (-fm2-prefix=): New entry.
3357         * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_dep): New function.
3358         (_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): New method.
3359         * mc-boot-ch/Glibc.c (libc_snprintf): New function.
3360         * mc-boot-ch/m2rts.h (M2RTS_RequestDependant): Changed prototype.
3361         (M2RTS_RegisterModule): Changed prototype.
3362         * mc-boot/GDynamicStrings.c: Rebuild.
3363         * mc-boot/GFIO.c: Rebuild.
3364         * mc-boot/GIndexing.c: Rebuild.
3365         * mc-boot/GM2Dependent.c: Rebuild.
3366         * mc-boot/GM2Dependent.h: Rebuild.
3367         * mc-boot/GM2EXCEPTION.c: Rebuild.
3368         * mc-boot/GM2RTS.c: Rebuild.
3369         * mc-boot/GM2RTS.h: Rebuild.
3370         * mc-boot/GPushBackInput.c: Rebuild.
3371         * mc-boot/GRTExceptions.c: Rebuild.
3372         * mc-boot/GRTint.c: Rebuild.
3373         * mc-boot/GStdIO.c: Rebuild.
3374         * mc-boot/GStringConvert.c: Rebuild.
3375         * mc-boot/GSysStorage.c: Rebuild.
3376         * mc-boot/Gdecl.c: Rebuild.
3377         * mc-boot/Gkeyc.c: Rebuild.
3378         * mc-boot/Glibc.h: Rebuild.
3379         * mc-boot/GmcComment.c: Rebuild.
3380         * mc-boot/GmcComp.c: Rebuild.
3381         * mc-boot/GmcDebug.c: Rebuild.
3382         * mc-boot/GmcMetaError.c: Rebuild.
3383         * mc-boot/GmcStack.c: Rebuild.
3384         * mc-boot/GnameKey.c: Rebuild.
3385         * mc-boot/GsymbolKey.c: Rebuild.
3386         * pge-boot/GASCII.c: Rebuild.
3387         * pge-boot/GArgs.c: Rebuild.
3388         * pge-boot/GAssertion.c: Rebuild.
3389         * pge-boot/GDebug.c: Rebuild.
3390         * pge-boot/GDynamicStrings.c: Rebuild.
3391         * pge-boot/GFIO.c: Rebuild.
3392         * pge-boot/GIO.c: Rebuild.
3393         * pge-boot/GIndexing.c: Rebuild.
3394         * pge-boot/GLists.c: Rebuild.
3395         * pge-boot/GM2Dependent.c: Rebuild.
3396         * pge-boot/GM2Dependent.h: Rebuild.
3397         * pge-boot/GM2EXCEPTION.c: Rebuild.
3398         * pge-boot/GM2RTS.c: Rebuild.
3399         * pge-boot/GM2RTS.h: Rebuild.
3400         * pge-boot/GNameKey.c: Rebuild.
3401         * pge-boot/GNumberIO.c: Rebuild.
3402         * pge-boot/GOutput.c: Rebuild.
3403         * pge-boot/GPushBackInput.c: Rebuild.
3404         * pge-boot/GRTExceptions.c: Rebuild.
3405         * pge-boot/GSFIO.c: Rebuild.
3406         * pge-boot/GStdIO.c: Rebuild.
3407         * pge-boot/GStorage.c: Rebuild.
3408         * pge-boot/GStrCase.c: Rebuild.
3409         * pge-boot/GStrIO.c: Rebuild.
3410         * pge-boot/GStrLib.c: Rebuild.
3411         * pge-boot/GSymbolKey.c: Rebuild.
3412         * pge-boot/GSysExceptions.c (_M2_SysExceptions_finish): Rename this...
3413         (_M2_SysExceptions_fini): ... to this.
3414         * pge-boot/GSysStorage.c: Rebuild.
3415         (_M2_SysStorage_finish): Rename this...
3416         (_M2_SysStorage_fini): ... to this.
3417         * pge-boot/GUnixArgs.cc: New file.
3418         * pge-boot/Gbnflex.c (_M2_bnflex_finish): Rename this...
3419         (_M2_bnflex_fini): ... to this.
3420         * pge-boot/Gerrno.c (_M2_errno_finish): Rename this...
3421         (_M2_errno_fini): ... to this.
3422         * pge-boot/Glibc.c (libc_snprintf): New function.
3423         * pge-boot/Glibc.h (libc_snprintf): New prototype.
3424         * pge-boot/Gpge.c (_M2_pge_finish): Rename this...
3425         (_M2_pge_fini): ... to this.
3426         * pge-boot/Gtermios.cc (_M2_termios_finish): Rename this...
3427         (_M2_termios_fini): ... to this.
3428         * pge-boot/main.c (_M2_RTExceptions_finish): Rename this...
3429         (_M2_RTExceptions_fini): ... to this.
3430         (_M2_M2EXCEPTION_finish): Rename this...
3431         (_M2_M2EXCEPTION_fini): ... to this.
3432         (_M2_M2RTS_finish): Rename this...
3433         (_M2_M2RTS_fini): ... to this.
3434         (_M2_SysExceptions_finish): Rename this...
3435         (_M2_SysExceptions_fini): ... to this.
3436         (_M2_StrLib_finish): Rename this...
3437         (_M2_StrLib_fini): ... to this.
3438         (_M2_errno_finish): Rename this...
3439         (_M2_errno_fini): ... to this.
3440         (_M2_termios_finish): Rename this...
3441         (_M2_termios_fini): ... to this.
3442         (_M2_IO_finish): Rename this...
3443         (_M2_IO_fini): ... to this.
3444         (_M2_StdIO_finish): Rename this...
3445         (_M2_StdIO_fini): ... to this.
3446         (_M2_Debug_finish): Rename this...
3447         (_M2_Debug_fini): ... to this.
3448         (_M2_SysStorage_finish): Rename this...
3449         (_M2_SysStorage_fini): ... to this.
3450         (_M2_Storage_finish): Rename this...
3451         (_M2_Storage_fini): ... to this.
3452         (_M2_StrIO_finish): Rename this...
3453         (_M2_StrIO_fini): ... to this.
3454         (_M2_DynamicStrings_finish): Rename this...
3455         (_M2_DynamicStrings_fini): ... to this.
3456         (_M2_Assertion_finish): Rename this...
3457         (_M2_Assertion_fini): ... to this.
3458         (_M2_Indexing_finish): Rename this...
3459         (_M2_Indexing_fini): ... to this.
3460         (_M2_NameKey_finish): Rename this...
3461         (_M2_NameKey_fini): ... to this.
3462         (_M2_NumberIO_finish): Rename this...
3463         (_M2_NumberIO_fini): ... to this.
3464         (_M2_PushBackInput_finish): Rename this...
3465         (_M2_PushBackInput_fini): ... to this.
3466         (_M2_SymbolKey_finish): Rename this...
3467         (_M2_SymbolKey_fini): ... to this.
3468         (_M2_UnixArgs_finish): Rename this...
3469         (_M2_UnixArgs_fini): ... to this.
3470         (_M2_FIO_finish): Rename this...
3471         (_M2_FIO_fini): ... to this.
3472         (_M2_SFIO_finish): Rename this...
3473         (_M2_SFIO_fini): ... to this.
3474         (_M2_StrCase_finish): Rename this...
3475         (_M2_StrCase_fini): ... to this.
3476         (_M2_bnflex_finish): Rename this...
3477         (_M2_bnflex_fini): ... to this.
3478         (_M2_Lists_finish): Rename this...
3479         (_M2_Lists_fini): ... to this.
3480         (_M2_Args_finish): Rename this...
3481         (_M2_Args_fini): ... to this.
3482         (_M2_Output_finish): Rename this...
3483         (_M2_Output_fini): ... to this.
3484         (_M2_pge_finish): Rename this...
3485         (_M2_pge_fini): ... to this.
3486         * plugin/m2rte.cc (m2_runtime_error_calls): Change all runtime
3487         procedure names to their name mangled counterparts.
3488         * gm2-libs-iso/wrapsock.c: Removed.
3489         * gm2-libs-iso/wraptime.c: Removed.
3490         * mc-boot/Gpth.h: Removed.
3491         * gm2-compiler/PathName.def: New file.
3492         * gm2-compiler/PathName.mod: New file.
3493         * gm2-compiler/DynamicPath.def: New file.
3494         * gm2-compiler/DynamicPath.mod: New file.
3496 2023-02-06  Gaius Mulley  <gaiusmod2@gmail.com>
3498         PR modula2/108135
3499         * gm2-compiler/M2Search.mod (DSdbEnter): Comment out.
3500         (DSdbExit): Comment out.
3502 2023-02-06  Co-Authored by: Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3504         PR modula2/107234
3505         * m2pp.cc (m2pp_integer_cst): Use
3506         HOST_WIDE_INT_PRINT_UNSIGNED as the format specifier.
3508 2023-02-06  Gaius Mulley  <gaiusmod2@gmail.com>
3510         * gm2-compiler/M2Preprocess.mod (BaseName): Comment out.
3511         * gm2-lang.cc (opt): Remove.
3512         * gm2spec.cc (add_include): Remove.
3513         (full_libraries): Remove.
3514         (concat_option): Remove.
3516 2023-02-03  Gaius Mulley  <gaiusmod2@gmail.com>
3518         * Make-lang.in (TEXISRC): Remove m2/images/gnu.eps.
3519         (RSTSRC): Remove m2/images/gnu.eps.
3520         (doc/m2.dvi): Add $(objdir)/m2/images/gnu.eps.
3521         (doc/m2.pdf): Add $(objdir)/m2/images/gnu.eps.
3522         (M2_PDFFILES): New definition.
3523         (m2.install-pdf): New rule.
3524         (m2.pod): Add $(objdir)/m2/images/gnu.eps.
3525         (m2.info): Add $(objdir)/m2/images/gnu.eps.
3526         (m2.html): New rule.
3527         (m2/gpl_v3_without_node.texi): New rule.
3528         (plugin/m2rte$(soext)): Simplify mkinstalldirs.
3529         (cc1gm2$(exeext)): Ditto.
3530         (m2/stage1/cc1gm2$(exeext)): Ditto.
3531         (m2/gm2-gcc/%.o): Ditto.
3532         (m2/gm2-gcc/rtegraph.o): Ditto.
3533         (m2/gm2-gcc/$(SRC_PREFIX)%.h): Ditto.
3534         (m2/mc-boot/$(SRC_PREFIX)%.o):Ditto.
3535         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
3536         (m2/mc-boot/main.o): Ditto.
3537         (m2/gm2-libs-boot/%.o): Ditto.
3538         (m2/gm2-libs-boot/$(SRC_PREFIX)%.h): Ditto.
3539         (m2/gm2-libs-boot/RTcodummy.o): Ditto.
3540         (m2/gm2-libs-boot/wrapc.o): Ditto.
3541         (m2/gm2-libs-boot/M2LINK.o): Ditto.
3542         (m2/gm2-libs-boot/UnixArgs.o): Ditto.
3543         (m2/gm2-libs-boot/choosetemp.o): Ditto.
3544         (m2/gm2-libs-boot/errno.o): Ditto.
3545         (m2/gm2-libs-boot/dtoa.o): Ditto.
3546         (m2/gm2-libs-boot/ldtoa.o): Ditto.
3547         (m2/gm2-libs-boot/termios.o): Ditto.
3548         (m2/gm2-libs-boot/SysExceptions.o): Ditto.
3549         (m2/gm2-libs-boot/SysStorage.o): Ditto.
3550         (m2/gm2-compiler-boot/M2GCCDeclare.o): Ditto.
3551         (m2/gm2-compiler-boot/M2Error.o): Ditto.
3552         (m2/gm2-compiler-boot/%.o): Ditto.
3553         (m2/gm2-compiler-boot/$(SRC_PREFIX)%.h): Ditto.
3554         (m2/gm2-compiler-boot/m2flex.o): Ditto.
3555         (m2/gm2-compiler/m2flex.c): Ditto.
3556         (m2/gm2-libiberty/$(SRC_PREFIX)%.h): Ditto.
3557         (m2/gm2-compiler/%.o): Ditto.
3558         (m2/gm2-compiler/m2flex.o): Ditto.
3559         (m2/gm2-compiler/%.o): Ditto.
3560         (m2/gm2-libs-iso/%.o): Ditto.
3561         (m2/gm2-libs/gm2-libs-host.h): Ditto.
3562         ($(objdir)/m2/gm2-libs-min/SYSTEM.def): Ditto.
3563         ($(objdir)/m2/gm2-libs/SYSTEM.def): Ditto.
3564         ($(objdir)/m2/gm2-libs-iso/SYSTEM.def): Ditto.
3565         ($(objdir)/m2/gm2-libs-coroutines/SYSTEM.def): Ditto.
3566         (m2/gm2-compiler/gm2.a): Ditto.
3567         (m2/gm2-libs-boot/libgm2.a): Ditto.
3568         (m2/gm2-compiler-boot/gm2.a): Ditto.
3569         (m2/boot-bin/mklink$(exeext)): Ditto.
3570         (m2/gm2-compiler-boot/$(SRC_PREFIX)%.h): Ditto.
3571         (m2/gm2-compiler/%.mod): Ditto.
3572         (m2/gm2-compiler-boot/%.mod): Ditto.
3573         (m2/pge-boot/%.o): Ditto.
3575 2023-02-01  Gaius Mulley  <gaiusmod2@gmail.com>
3577         * Make-lang.in (GM2_FLAGS): Add -fno-return -Wreturn-type.
3578         (GM2_ISO_FLAGS): Add -fno-return -Wreturn-type.
3579         * Make-maintainer.in (GM2PATH): Split into separate -I components.
3580         (MC-LIB-DEFS): Add RTentity.def.
3581         (m2/boot-bin/mc-devel$(exeext)): Changed -I$(GM2PATH) to
3582         $(GM2PATH).
3583         (m2/boot-bin/mc-opt$(exeext)): Separate -I paths.
3584         (m2/mc/decl.o): Separate -I paths.
3585         (gm2-bootstrap): Separate -I paths.
3586         (m2/mc-boot-gen/$(SRC_PREFIX)%.h): Separate -I paths.
3587         (m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Separate -I paths.
3588         (m2/mc-boot-gen/$(SRC_PREFIX)%.c): Separate -I paths.
3589         (gm2.verifyparanoid): Separate -I paths.
3590         (gm2.verifystage12): Separate -I paths.
3591         * gm2-compiler/M2ALU.mod (GetConstructorElement): Add default
3592         Return NulSym.  Remove return from the error case.
3593         * gm2-compiler/M2Base.mod (ComplexToScalar): Return RType
3594         from the error case.
3595         (MixMetaTypes):  Return MakeError as a default.
3596         * gm2-compiler/M2GCCDeclare.mod (GetTypeMin): Return NulSym
3597         from the error case.
3598         (GetTypeMax): Return NulSym from the error case.
3599         * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Replace Assert
3600         by InternalError.
3601         * gm2-compiler/M2Quads.mod (GetItemPointedTo): Add InternalError.
3602         (GetTypeMin): Add InternalError.
3603         (GetTypeMax): Add InternalError.
3604         * gm2-compiler/M2System.mod (InitSystem): Call
3605         PutProcedureNoReturn on Throw.
3606         * gm2-gcc/m2except.cc (m2except_InitExceptions): fn_throw_tree
3607         declare as noreturn.  fn_rethrow_tree declare as noreturn.
3608         * gm2-libs-coroutines/Debug.def (Halt): Add noreturn attribute.
3609         * gm2-libs-coroutines/SYSTEM.def (THROW): Add noreturn attribute.
3610         * gm2-libs-iso/ClientSocket.mod (dorbytes): Add return FALSE.
3611         * gm2-libs-iso/EXCEPTIONS.def (RAISE): Add noreturn attribute.
3612         * gm2-libs-iso/IOLink.def (RAISEdevException): Add noreturn attribute.
3613         * gm2-libs-iso/M2RTS.def (HALT): Add noreturn attribute.
3614         (Halt): Ditto.
3615         (HaltC): Ditto.
3616         (ErrorMessage): Ditto.
3617         (AssignmentException): Ditto.
3618         (ReturnException): Ditto.
3619         (IncException): Ditto.
3620         (DecException): Ditto.
3621         (InclException): Ditto.
3622         (ExclException): Ditto.
3623         (ShiftException): Ditto.
3624         (RotateException): Ditto.
3625         (StaticArraySubscriptException): Ditto.
3626         (DynamicArraySubscriptException): Ditto.
3627         (ForLoopBeginException): Ditto.
3628         (ForLoopToException): Ditto.
3629         (ForLoopEndException): Ditto.
3630         (PointerNilException): Ditto.
3631         (NoReturnException): Ditto.
3632         (CaseException): Ditto.
3633         (WholeNonPosDivException): Ditto.
3634         (WholeNonPosModException): Ditto.
3635         (WholeZeroDivException): Ditto.
3636         (WholeZeroRemException): Ditto.
3637         (WholeValueException): Ditto.
3638         (RealValueException): Ditto.
3639         (ParameterException): Ditto.
3640         (NoException): Ditto.
3641         * gm2-libs-iso/SYSTEM.def (THROW): Ditto.
3642         * gm2-libs-iso/TermFile.mod (dorbytes): Add default return FALSE.
3643         * gm2-libs-min/M2RTS.def: Add noreturn attribute.
3644         * gm2-libs/FIO.mod (BufferedRead): Return -1.
3645         (getFileName): Return NIL.
3646         (getFileNameLength): Return 0.
3647         * gm2-libs/M2RTS.def (HaltC): Add noreturn attribute.
3648         (AssignmentException): Ditto.
3649         (ReturnException): Ditto.
3650         (IncException): Ditto.
3651         (DecException): Ditto.
3652         (InclException): Ditto.
3653         (ExclException): Ditto.
3654         (ShiftException): Ditto.
3655         (RotateException): Ditto.
3656         (StaticArraySubscriptException): Ditto.
3657         (DynamicArraySubscriptException): Ditto.
3658         (ForLoopBeginException): Ditto.
3659         (ForLoopToException): Ditto.
3660         (ForLoopEndException): Ditto.
3661         (PointerNilException): Ditto.
3662         (NoReturnException): Ditto.
3663         (CaseException): Ditto.
3664         (WholeNonPosDivException): Ditto.
3665         (WholeNonPosModException): Ditto.
3666         (WholeZeroDivException): Ditto.
3667         (WholeZeroRemException): Ditto.
3668         (WholeValueException): Ditto.
3669         (RealValueException): Ditto.
3670         (ParameterException): Ditto.
3671         (NoException): Ditto.
3672         * gm2-libs/RTExceptions.def (Raise): Ditto.
3673         * gm2-libs/RTExceptions.mod (InvokeHandler): Ditto.
3674         * gm2-libs/SYSTEM.def (THROW): Ditto.
3675         * m2.flex (_M2_m2flex_fini): Remamed to...
3676         (_M2_m2flex_finish): ...here.
3677         * mc-boot-ch/GBuiltins.c (_M2_Builtins_finish): Remamed to...
3678         (_M2_Builtins_fini): ...this.
3679         * mc-boot-ch/GRTco.c (_M2_RTco_finish): Remamed to...
3680         (_M2_RTco_fini): ...this.
3681         * mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_finish): Remamed to...
3682         (_M2_SYSTEM_fini): ...this.
3683         * mc-boot-ch/GSelective.c (_M2_Selective_finish): Remamed to...
3684         (_M2_Selective_fini): ...this.
3685         * mc-boot-ch/GSysExceptions.c (_M2_SysExceptions_init): Add
3686         parameters.
3687         (_M2_SysExceptions_finish): Remamed to...
3688         (_M2_SysExceptions_fini): ...this.
3689         * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_finish): Remamed to...
3690         (_M2_UnixArgs_fini): ...this.
3691         (_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): Change parameter
3692         to _M2_UnixArgs_fini.
3693         * mc-boot-ch/Gdtoa.c (_M2_dtoa_finish): Remamed to...
3694         (_M2_dtoa_fini): ...this.
3695         * mc-boot-ch/Gerrno.c (_M2_errno_finish): Remamed to...
3696         (_M2_errno_fini): ...this.
3697         * mc-boot-ch/Gldtoa.c (_M2_ldtoa_finish): Remamed to...
3698         (_M2_ldtoa_fini): ...this.
3699         * mc-boot-ch/Gtermios.cc (_M2_termios_init): Add parameters.
3700         (_M2_termios_finish): Remamed to...
3701         (_M2_termios_fini): ...this.
3702         * mc-boot-ch/Gwrapc.c (_M2_wrapc_init): Add parameters.
3703         (_M2_wrapc_finish): Remamed to...
3704         (_M2_wrapc_fini): ...this.
3705         * mc-boot/GASCII.c: Rebuild.
3706         * mc-boot/GArgs.c: Rebuild.
3707         * mc-boot/GAssertion.c: Rebuild.
3708         * mc-boot/GBreak.c: Rebuild.
3709         * mc-boot/GCmdArgs.c: Rebuild.
3710         * mc-boot/GDebug.c: Rebuild.
3711         * mc-boot/GDynamicStrings.c: Rebuild.
3712         * mc-boot/GEnvironment.c: Rebuild.
3713         * mc-boot/GFIO.c: Rebuild.
3714         * mc-boot/GFormatStrings.c: Rebuild.
3715         * mc-boot/GFpuIO.c: Rebuild.
3716         * mc-boot/GIO.c: Rebuild.
3717         * mc-boot/GIndexing.c: Rebuild.
3718         * mc-boot/GM2Dependent.c: Rebuild.
3719         * mc-boot/GM2EXCEPTION.c: Rebuild.
3720         * mc-boot/GM2RTS.c: Rebuild.
3721         * mc-boot/GM2RTS.h: Rebuild.
3722         * mc-boot/GMemUtils.c: Rebuild.
3723         * mc-boot/GNumberIO.c: Rebuild.
3724         * mc-boot/GPushBackInput.c: Rebuild.
3725         * mc-boot/GRTExceptions.c: Rebuild.
3726         * mc-boot/GRTExceptions.h: Rebuild.
3727         * mc-boot/GRTco.h: Rebuild.
3728         * mc-boot/GRTint.c: Rebuild.
3729         * mc-boot/GSArgs.c: Rebuild.
3730         * mc-boot/GSFIO.c: Rebuild.
3731         * mc-boot/GStdIO.c: Rebuild.
3732         * mc-boot/GStorage.c: Rebuild.
3733         * mc-boot/GStrCase.c: Rebuild.
3734         * mc-boot/GStrIO.c: Rebuild.
3735         * mc-boot/GStrLib.c: Rebuild.
3736         * mc-boot/GStringConvert.c: Rebuild.
3737         * mc-boot/GSysStorage.c: Rebuild.
3738         * mc-boot/GTimeString.c: Rebuild.
3739         * mc-boot/Galists.c: Rebuild.
3740         * mc-boot/Gdecl.c: Rebuild.
3741         * mc-boot/Gkeyc.c: Rebuild.
3742         * mc-boot/Glists.c: Rebuild.
3743         * mc-boot/GmcComment.c: Rebuild.
3744         * mc-boot/GmcComp.c: Rebuild.
3745         * mc-boot/GmcDebug.c: Rebuild.
3746         * mc-boot/GmcError.c: Rebuild.
3747         * mc-boot/GmcFileName.c: Rebuild.
3748         * mc-boot/GmcLexBuf.c: Rebuild.
3749         * mc-boot/GmcMetaError.c: Rebuild.
3750         * mc-boot/GmcOptions.c: Rebuild.
3751         * mc-boot/GmcPreprocess.c: Rebuild.
3752         * mc-boot/GmcPretty.c: Rebuild.
3753         * mc-boot/GmcPrintf.c: Rebuild.
3754         * mc-boot/GmcQuiet.c: Rebuild.
3755         * mc-boot/GmcReserved.c: Rebuild.
3756         * mc-boot/GmcSearch.c: Rebuild.
3757         * mc-boot/GmcStack.c: Rebuild.
3758         * mc-boot/GmcStream.c: Rebuild.
3759         * mc-boot/Gmcp1.c: Rebuild.
3760         * mc-boot/Gmcp2.c: Rebuild.
3761         * mc-boot/Gmcp3.c: Rebuild.
3762         * mc-boot/Gmcp4.c: Rebuild.
3763         * mc-boot/Gmcp5.c: Rebuild.
3764         * mc-boot/GnameKey.c: Rebuild.
3765         * mc-boot/GsymbolKey.c: Rebuild.
3766         * mc-boot/Gtop.c: Rebuild.
3767         * mc-boot/Gvarargs.c: Rebuild.
3768         * mc-boot/Gwlists.c: Rebuild.
3769         * mc-boot/GRTentity.h: New file.
3770         * mc/decl.mod (scaffoldStatic): Change _finish to _fini.
3771         * mc/mc.flex (_M2_mcflex_fini): New function.
3772         (_M2_mcflex_finish): Remove function.
3773         * tools-src/mklink.c (GenerateFinishCalls): Change
3774         _finish to _fini.
3775         (GeneratePrototypes): Change _finish to _fini.
3777 2023-01-31  Gaius Mulley  <gaiusmod2@gmail.com>
3779         * Make-lang.in (gm2-libs.texi-check): Rename
3780         m2/gm2-libs-pim to m2/gm2-libs-log.
3781         * gm2-libs-pim/BitBlockOps.def: Moved to...
3782         * gm2-libs-log/BitBlockOps.def: ...here.
3783         * gm2-libs-pim/BitBlockOps.mod: Moved to...
3784         * gm2-libs-log/BitBlockOps.mod: ...here.
3785         * gm2-libs-pim/BitByteOps.def: Moved to...
3786         * gm2-libs-log/BitByteOps.def: ...here.
3787         * gm2-libs-pim/BitByteOps.mod: Moved to...
3788         * gm2-libs-log/BitByteOps.mod: ...here.
3789         * gm2-libs-pim/BitWordOps.def: Moved to...
3790         * gm2-libs-log/BitWordOps.def: ...here.
3791         * gm2-libs-pim/BitWordOps.mod: Moved to...
3792         * gm2-libs-log/BitWordOps.mod: ...here.
3793         * gm2-libs-pim/BlockOps.def: Moved to...
3794         * gm2-libs-log/BlockOps.def: ...here.
3795         * gm2-libs-pim/BlockOps.mod: Moved to...
3796         * gm2-libs-log/BlockOps.mod: ...here.
3797         * gm2-libs-pim/Break.c: Moved to...
3798         * gm2-libs-log/Break.c: ...here.
3799         * gm2-libs-pim/Break.def: Moved to...
3800         * gm2-libs-log/Break.def: ...here.
3801         * gm2-libs-pim/CardinalIO.def: Moved to...
3802         * gm2-libs-log/CardinalIO.def: ...here.
3803         * gm2-libs-pim/CardinalIO.mod: Moved to...
3804         * gm2-libs-log/CardinalIO.mod: ...here.
3805         * gm2-libs-pim/Conversions.def: Moved to...
3806         * gm2-libs-log/Conversions.def: ...here.
3807         * gm2-libs-pim/Conversions.mod: Moved to...
3808         * gm2-libs-log/Conversions.mod: ...here.
3809         * gm2-libs-pim/DebugPMD.def: Moved to...
3810         * gm2-libs-log/DebugPMD.def: ...here.
3811         * gm2-libs-pim/DebugPMD.mod: Moved to...
3812         * gm2-libs-log/DebugPMD.mod: ...here.
3813         * gm2-libs-pim/DebugTrace.def: Moved to...
3814         * gm2-libs-log/DebugTrace.def: ...here.
3815         * gm2-libs-pim/DebugTrace.mod: Moved to...
3816         * gm2-libs-log/DebugTrace.mod: ...here.
3817         * gm2-libs-pim/Delay.def: Moved to...
3818         * gm2-libs-log/Delay.def: ...here.
3819         * gm2-libs-pim/Delay.mod: Moved to...
3820         * gm2-libs-log/Delay.mod: ...here.
3821         * gm2-libs-pim/Display.def: Moved to...
3822         * gm2-libs-log/Display.def: ...here.
3823         * gm2-libs-pim/Display.mod: Moved to...
3824         * gm2-libs-log/Display.mod: ...here.
3825         * gm2-libs-pim/ErrorCode.def: Moved to...
3826         * gm2-libs-log/ErrorCode.def: ...here.
3827         * gm2-libs-pim/ErrorCode.mod: Moved to...
3828         * gm2-libs-log/ErrorCode.mod: ...here.
3829         * gm2-libs-pim/FileSystem.def: Moved to...
3830         * gm2-libs-log/FileSystem.def: ...here.
3831         * gm2-libs-pim/FileSystem.mod: Moved to...
3832         * gm2-libs-log/FileSystem.mod: ...here.
3833         * gm2-libs-pim/FloatingUtilities.def: Moved to...
3834         * gm2-libs-log/FloatingUtilities.def: ...here.
3835         * gm2-libs-pim/FloatingUtilities.mod: Moved to...
3836         * gm2-libs-log/FloatingUtilities.mod: ...here.
3837         * gm2-libs-pim/InOut.def: Moved to...
3838         * gm2-libs-log/InOut.def: ...here.
3839         * gm2-libs-pim/InOut.mod: Moved to...
3840         * gm2-libs-log/InOut.mod: ...here.
3841         * gm2-libs-pim/Keyboard.def: Moved to...
3842         * gm2-libs-log/Keyboard.def: ...here.
3843         * gm2-libs-pim/Keyboard.mod: Moved to...
3844         * gm2-libs-log/Keyboard.mod: ...here.
3845         * gm2-libs-pim/LongIO.def: Moved to...
3846         * gm2-libs-log/LongIO.def: ...here.
3847         * gm2-libs-pim/LongIO.mod: Moved to...
3848         * gm2-libs-log/LongIO.mod: ...here.
3849         * gm2-libs-pim/NumberConversion.def: Moved to...
3850         * gm2-libs-log/NumberConversion.def: ...here.
3851         * gm2-libs-pim/NumberConversion.mod: Moved to...
3852         * gm2-libs-log/NumberConversion.mod: ...here.
3853         * gm2-libs-pim/README.texi: Moved to...
3854         * gm2-libs-log/README.texi: ...here.
3855         * gm2-libs-pim/Random.def: Moved to...
3856         * gm2-libs-log/Random.def: ...here.
3857         * gm2-libs-pim/Random.mod: Moved to...
3858         * gm2-libs-log/Random.mod: ...here.
3859         * gm2-libs-pim/RealConversions.def: Moved to...
3860         * gm2-libs-log/RealConversions.def: ...here.
3861         * gm2-libs-pim/RealConversions.mod: Moved to...
3862         * gm2-libs-log/RealConversions.mod: ...here.
3863         * gm2-libs-pim/RealInOut.def: Moved to...
3864         * gm2-libs-log/RealInOut.def: ...here.
3865         * gm2-libs-pim/RealInOut.mod: Moved to...
3866         * gm2-libs-log/RealInOut.mod: ...here.
3867         * gm2-libs-pim/Strings.def: Moved to...
3868         * gm2-libs-log/Strings.def: ...here.
3869         * gm2-libs-pim/Strings.mod: Moved to...
3870         * gm2-libs-log/Strings.mod: ...here.
3871         * gm2-libs-pim/Termbase.def: Moved to...
3872         * gm2-libs-log/Termbase.def: ...here.
3873         * gm2-libs-pim/Termbase.mod: Moved to...
3874         * gm2-libs-log/Termbase.mod: ...here.
3875         * gm2-libs-pim/Terminal.def: Moved to...
3876         * gm2-libs-log/Terminal.def: ...here.
3877         * gm2-libs-pim/Terminal.mod: Moved to...
3878         * gm2-libs-log/Terminal.mod: ...here.
3879         * gm2-libs-pim/TimeDate.def: Moved to...
3880         * gm2-libs-log/TimeDate.def: ...here.
3881         * gm2-libs-pim/TimeDate.mod: Moved to...
3882         * gm2-libs-log/TimeDate.mod: ...here.
3884 2023-01-28  Iain Sandoe  <iain@sandoe.co.uk>
3886         * lang.opt: Claim Wreturn-type.
3888 2023-01-27  Gaius Mulley  <gaiusmod2@gmail.com>
3890         * gm2-compiler/M2Comp.mod:  Import MetaString0.
3891         (ExamineCompilationUnit): New variable Message.
3892         Create and format error string.
3893         * gm2-compiler/M2LexBuf.mod: New variable SeenEof.
3894         (GetNonEofToken): New procedure.
3895         (Init): Set SeenEof to FALSE.
3896         (GetToken): Use GetNonEofToken instead of calls to
3897         m2flex.GetToken and GetToken.
3898         (AddTok): Detect eoftok and set SeenEof.
3900 2023-01-27  Gaius Mulley  <gaiusmod2@gmail.com>
3902         * gm2-compiler/M2Options.def: Export GetMQ, SetMQ.
3903         * gm2-compiler/M2Preprocess.mod: (MakeSaveTempsFileName):
3904         Test NewDir against NIL.  Test Dumpdir against NIL.
3905         Test GetMD () against NIL.  Test GetMMD () against NIL.
3906         Test GetMQ () against NIL.  Test GetObj () against NIL.
3907         Test tempfile against NIL.
3908         * gm2-compiler/P2SymBuild.def: Export
3909         BuildNoReturnAttribute.
3911 2023-01-27  Iain Sandoe  <iain@sandoe.co.uk>
3913         PR modula2/108555
3914         PR modula2/108182
3915         PR modula2/102343
3916         * gm2-lang.cc (gm2_langhook_option_lang_mask): Do not claim CL_C
3917         or CL_DRIVER.
3918         (gm2_langhook_init_options): Handle options that we want to pass
3919         to the preprocessor.
3920         * lang-specs.h: Pass -B and -save-temps to regular compile lines.
3921         * lang.opt: Add C and Driver options that Modula-2 intercepts for
3922         internal use. Reorder options into two sections and to collate.
3924 2023-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
3926         * gm2-compiler/M2GCCDeclare.mod: Import IsProcedureNoReturn.
3927         (DeclareProcedureToGccWholeProgram): New variable declared and set
3928         returnType.  Pass returnType to BuildEndFunctionDeclaration.
3929         Extra parameter IsProcedureNoReturn passed to
3930         BuildEndFunctionDeclaration.
3931         * gm2-compiler/M2Quads.mod (BuildM2MainFunction): Correct
3932         scaffold comment and add extra return 0.
3933         * gm2-compiler/P2Build.bnf: Import BuildNoReturnAttribute.
3934         (ProcedureHeading): Process EndBuildFormalParameters before
3935         parsing AttributeNoReturn.
3936         (DefProcedureHeading): Process EndBuildFormalParameters before
3937         parsing AttributeNoReturn.
3938         (AttributeNoReturn): Call BuildNoReturnAttribute.
3939         * gm2-compiler/P2SymBuild.def (BuildNoReturnAttribute): New
3940         procedure.
3941         * gm2-compiler/P2SymBuild.mod (BuildNoReturnAttribute): New
3942         procedure.
3943         * gm2-compiler/SymbolTable.def (PutProcedureInline): Corrected
3944         comment.
3945         (PutProcedureNoReturn): New procedure.
3946         (IsProcedureNoReturn): New procedure function.
3947         * gm2-compiler/SymbolTable.mod (SymProcedure): IsNoReturn
3948         new field.
3949         (MakeProcedure): Initialize IsNoReturn to FALSE.
3950         (PutProcedureNoReturn): New procedure.
3951         (IsProcedureNoReturn): New procedure function.
3952         * gm2-gcc/m2decl.cc (m2decl_BuildEndFunctionDeclaration):
3953         Add extra parameter isnoreturn.  Set TREE_THIS_VOLATILE
3954         to isnoreturn.
3955         * gm2-gcc/m2decl.def (BuildEndFunctionDeclaration): Add
3956         extra parameter isnoreturn.
3957         * gm2-gcc/m2decl.h (m2decl_BuildEndFunctionDeclaration): Add
3958         extra parameter isnoreturn.
3959         * gm2-gcc/m2except.cc (m2except_InitExceptions): Change all
3960         function decl to pass an extra parameter isnoreturn.
3962 2023-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
3964         * m2.flex (splitSlashStar): Fix comment so that /* does not
3965         appear inside the comment.
3967 2023-01-26  Iain Sandoe  <iain@sandoe.co.uk>
3969         PR modula2/108553
3970         * gm2-lang.cc (gm2_langhook_init_options): Remove debug code.
3972 2023-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
3974         * Make-lang.in (m2/gm2config.h): Rewrite rule to be
3975         dependent upon m2/gm2config.aci.
3976         (m2/gm2config.aci): Newrule.
3977         * configure.ac (AC_CONFIG_HEADERS): Change destination
3978         to gm2config.aci.
3979         * configure: Regenerate.
3980         * gm2-libs/config-host: Regenerate.
3981         * gm2-compiler/M2GCCDeclare.mod (AddSymToWatch): Comment
3982         out.
3983         * gm2-compiler/M2Quads.mod (BuildConstHighFromSym): Remove
3984         Dim.
3985         (StartBuildWith): Call BuildStmtNoteTok.
3986         (BuildStmtNoteTok): New procedure.
3987         (BuildStmtNote): Re-implement re-factor into two
3988         procedures and call BuildStmtNoteTok.
3989         * gm2config.h.in: Remove.
3990         * gm2config.aci.in: New file.
3992 2023-01-25  Iain Sandoe  <iain@sandoe.co.uk>
3994         PR modula2/102343
3995         PR modula2/108182
3996         * gm2-compiler/M2Comp.mod: Early exit for pre-processor-only jobs.
3997         * gm2-compiler/M2Options.def (SetPPOnly, GetPPOnly, SetMD, GetMD,
3998         SetMMD, GetMMD, SetMQ, GetMQ, SetObj, GetObj, SetDumpDir,
3999         GetDumpDir):New.
4000         * gm2-compiler/M2Options.mod:(SetPPOnly, GetPPOnly, SetMD, GetMD,
4001         SetMMD, GetMMD, SetMQ, GetMQ, SetObj, GetObj, SetDumpDir,
4002         GetDumpDir):New.
4003         * gm2-compiler/M2Preprocess.def (PreprocessModule): Add flag to
4004         indicate the main file.
4005         * gm2-compiler/M2Preprocess.mod: Handle Preprocess-only jobs,
4006         handle MD, MMD and MQ options.
4007         * gm2-gcc/m2options.h (M2Options_SetPPOnly, M2Options_GetPPOnly,
4008         M2Options_SetDumpDir, M2Options_SetMD, M2Options_GetMD,
4009         M2Options_SetMMD, M2Options_GetMMD, M2Options_SetMQ, M2Options_GetMQ,
4010         M2Options_SetObj, M2Options_GetObj): New.
4011         * gm2-gcc/m2type.cc (m2type_InitBaseTypes): Early exit for pre-
4012         processor-only jobs.
4013         * gm2-lang.cc (gm2_langhook_init): Handle preprocess-only commands.
4014         (gm2_langhook_option_lang_mask): Claim C and Driver options so that
4015         we can intercept them for building pre-processor commands.
4016         (gm2_langhook_init_options): Collect the preprocessor line here.
4017         Save options that have different actions for preprocessor and compile
4018         commands.
4019         (gm2_langhook_handle_option): Only handle the modula-2 options here.
4020         (gm2_langhook_post_options): Do not create a back-end for pre-
4021         processor-only jobs.
4022         * gm2spec.cc (lang_specific_driver): Ignore PCH options, append a
4023         scaffold-main for cases where we are building a main module with
4024         -c.
4025         * lang-specs.h: Revise to handle preprocessor-only jobs and to
4026         consume pre-processed files.
4027         * lang.opt: Remove Driver and C options copies (we claim these
4028         separately).
4030 2023-01-24  Co-Authored by: Iain Sandoe  <iain@sandoe.co.uk>
4032         * Make-lang.in (GM2-COMP-BOOT-DEFS): Add
4033         DynamicStringPath.def.
4034         (GM2-COMP-BOOT-MODS): Add DynamicStringPath.mod.
4035         (GM2-COMP-DEFS): Add DynamicStringPath.def.
4036         (GM2-COMP-MODS): Add DynamicStringPath.mod.
4037         ($(objdir)/m2/gm2-libs-min/SYSTEM.def): Split path into
4038         multiple -I components.
4039         ($(objdir)/m2/gm2-libs/SYSTEM.def): Ditto.
4040         ($(objdir)/m2/gm2-libs-coroutines/SYSTEM.def): Ditto.
4041         * gm2-compiler/M2Options.mod: Import DynamicStringPath.
4042         (SetSearchPath): Reimplement using DynamicStringPath
4043         procedures.
4044         * gm2-compiler/M2Search.def (InitSearchPath): Remove.
4045         (PrependSearchPath): Remove.
4046         * gm2-compiler/M2Search.mod (SFIO): Remove import.
4047         (DynamicStringPath): Add import.
4048         (Directory): Remove.
4049         (UserPath): Remove.
4050         (InitialPath): Remove.
4051         (InitSearchPath): Remove.
4052         (PrependSearchPath): Remove.
4053         (FindSourceFile): Re-implement.
4054         (FindSourceDefFile): Re-implement.
4055         (FindSourceModFile): Re-implement.
4056         * gm2-gcc/init.cc (_M2_DynamicStringPath_init):
4057         New prototype.
4058         (init_FrontEndInit): Call _M2_DynamicStringPath_init.
4059         * tools-src/makeSystem: Allow multiple -I paths.
4060         * gm2-compiler/DynamicStringPath.def: New file.
4061         * gm2-compiler/DynamicStringPath.mod: New file.
4062         * gm2-gcc/m2options.h (M2Options_SetMakeIncludePath): Add
4063         prototype.
4065 2023-01-24  Gaius Mulley  <gaiusmod2@gmail.com>
4067         * m2.flex (cpreprocessor): Add temporary variable
4068         which is initialized to 0.
4069         (commentCLevel): New variable.
4070         (endOfCComment): New function.
4071         (splitSlashStar): New function to split /* into / and *
4072         tokens.
4073         (COMMENTC): New flex state.
4074         ("/*"): New rule to test whether we should treat /*
4075         as a single token or as two tokens.
4076         (<COMMENTC>.): New rule to skip a character.
4077         (<COMMENTC>\n.*): New rule to consume the line.
4078         (<COMMENTC>"*/"): New rule to call endOfCComment.
4080 2023-01-24  Gaius Mulley  <gaiusmod2@gmail.com>
4082         * gm2-libs-iso/RTco.def: Import RTentity.
4083         Declare RTco as a definition for C module.
4085 2023-01-23  Iain Sandoe  <iain@sandoe.co.uk>
4087         PR modula2/108182
4088         PR modula2/108480
4089         * Make-lang.in: Pass libsubdir to the language init
4090         build.
4091         * gm2-lang.cc (INCLUDE_VECTOR): Define.
4092         (add_one_import_path): New.
4093         (add_m2_import_paths): New.
4094         (gm2_langhook_post_options): Arrange to add the include
4095         paths (and add the system ones) in the same order as C
4096         uses.
4097         * gm2spec.cc (build_archive_path): Remove.
4098         (add_default_combination): Remove.
4099         (add_default_archives): Remove.
4100         (add_default_libs): We no longer need a '-L' option, just
4101         emit the -l and each library in use.
4102         (build_include_path): Remove.
4103         (add_include): Remove.
4104         (add_default_includes): Remove.
4105         (library_installed): Remove.
4106         (check_valid_library): Remove.
4107         (check_valid_list): Remove.
4108         (convert_abbreviation): Diagnose unhandled cases.
4109         (lang_specific_driver): Skip options where we will add back
4110         a validated version.
4111         * lang-specs.h (M2CPP): Reformat, append %I when -fcpp is not
4112         in use.  Revise the cc1gm2 spec to omit mentioning options that
4113         are handled in the c pre-processor line.
4114         * lang.opt: Allow preprocessing and path options as input to the
4115         cc1gm2 invocation, so that they can be passed to the preprocessor
4116         invocation.
4118 2023-01-23  Iain Sandoe  <iain@sandoe.co.uk>
4120         PR modula2/108405
4121         * gm2-libs-iso/Preemptive.mod (initPreemptive): Use a value for
4122         extra space that is divisible by common OS pagesizes.
4124 2023-01-20  Gaius Mulley  <gaiusmod2@gmail.com>
4126         * gm2-libs/Args.mod (GetArg): Check index before
4127         accessing array.
4128         * gm2-libs/M2Dependent.mod (toCString): Check index
4129         before accessing array.
4130         * mc-boot/GArgs.c: Rebuilt.
4131         * mc-boot/GM2Dependent.c: Rebuilt.
4132         * mc-boot/Gkeyc.c: Rebuilt.
4133         * mc/keyc.mod (seenUIntMin): Initialize once.
4134         (seenUIntMax): Initialize once.
4135         (checkLimits): Only test seenUIntMin and seenUIntMax
4136         once.
4137         * pge-boot/GArgs.c:  Rebuilt.
4138         * pge-boot/GM2Dependent.c: Rebuilt.
4140 2023-01-20  Gaius Mulley  <gaiusmod2@gmail.com>
4142         * gm2-gcc/m2statement.cc (gm2_gimplify_function_node):
4143         Remove.
4144         * gm2-libs/DynamicStrings.mod (Equal): Remove dead code.
4145         * m2.flex (<COMMENT>"<*"): Add {} for else statement.
4146         * m2pp.cc (hextree): Add conditional #ifdef DEBUGGING.
4147         * mc-boot/GDynamicStrings.c: Rebuild.
4148         * pge-boot/GDynamicStrings.c: Rebuild.
4149         * pge-boot/GFIO.c: Rebuild.
4150         * pge-boot/GIndexing.c: Rebuild.
4151         * pge-boot/GM2EXCEPTION.c: Rebuild.
4152         * pge-boot/GM2RTS.c: Rebuild.
4153         * pge-boot/GNameKey.c: Rebuild.
4154         * pge-boot/GPushBackInput.c: Rebuild.
4155         * pge-boot/GRTExceptions.c: Rebuild.
4156         * pge-boot/GStdIO.c: Rebuild.
4157         * pge-boot/GSymbolKey.c: Rebuild.
4158         * pge-boot/GSysStorage.c: Rebuild.
4160 2023-01-17  Gaius Mulley  <gaiusmod2@gmail.com>
4162         * mc-boot/GM2RTS.c: Rebuilt.
4163         * mc-boot/GM2RTS.h: Rebuilt.
4164         * mc-boot/Gdecl.c: Rebuilt.
4165         * mc-boot/GmcOptions.c: Rebuilt.
4166         * mc/mcOptions.mod (displayVersion):
4167         Split first printf into three components
4169 2023-01-17  Gaius Mulley  <gaiusmod2@gmail.com>
4171         * gm2-libs-iso/M2RTS.def (Halt): Parameter file renamed to filename.
4172         (HaltC): New procedure declaration.
4173         (ErrorMessage): Parameter file renamed to filename.
4174         * gm2-libs-iso/M2RTS.mod (Halt): Parameter file renamed to
4175         filename.
4176         (HaltC): New procedure implementation.
4177         (ErrorStringC): New procedure implementation.
4178         (ErrorMessageC): New procedure implementation.
4179         * gm2-libs/M2RTS.def (Halt): Parameter file renamed to filename.
4180         (HaltC): New procedure declaration.
4181         (ErrorMessage): Parameter file renamed to filename.
4182         * gm2-libs/M2RTS.mod (Halt): Parameter file renamed to filename.
4183         (HaltC): New procedure implementation.
4184         (ErrorStringC): New procedure implementation.
4185         (ErrorMessageC): New procedure implementation.
4187 2023-01-16  Gaius Mulley  <gaiusmod2@gmail.com>
4189         * mc-boot-ch/Glibc.c (libc_time): New function.
4190         (libc_localtime): New function.
4191         * mc-boot/GDynamicStrings.c: Regenerate.
4192         * mc-boot/GFIO.c: Regenerate.
4193         * mc-boot/GFormatStrings.c: Regenerate.
4194         * mc-boot/GIndexing.c: Regenerate.
4195         * mc-boot/GM2Dependent.c: Regenerate.
4196         * mc-boot/GM2EXCEPTION.c: Regenerate.
4197         * mc-boot/GPushBackInput.c: Regenerate.
4198         * mc-boot/GRTExceptions.c: Regenerate.
4199         * mc-boot/GRTint.c: Regenerate.
4200         * mc-boot/GStdIO.c: Regenerate.
4201         * mc-boot/GStringConvert.c: Regenerate.
4202         * mc-boot/GSysStorage.c: Regenerate.
4203         * mc-boot/Gdecl.c: Regenerate.
4204         * mc-boot/GmcComment.c: Regenerate.
4205         * mc-boot/GmcComp.c: Regenerate.
4206         * mc-boot/GmcDebug.c: Regenerate.
4207         * mc-boot/GmcMetaError.c: Regenerate.
4208         * mc-boot/GmcOptions.c: Regenerate.
4209         * mc-boot/GmcStack.c: Regenerate.
4210         * mc-boot/GnameKey.c: Regenerate.
4211         * mc-boot/GsymbolKey.c: Regenerate.
4212         * mc-boot/Gkeyc.c: Regenerate.
4213         * mc/decl.mod (putFieldRecord): Change NulName to NulKey
4214         and fix type comparision.
4215         * mc/mcOptions.mod (YEAR): Remove.
4216         (getYear): New procedure function.
4217         (displayVersion): Use result from getYear instead of YEAR.
4218         Emit boilerplate for GPL v3.
4219         (gplBody): Use result from getYear instead of YEAR.
4220         (glplBody): Use result from getYear instead of YEAR.
4222 2023-01-16  Gaius Mulley  <gaiusmod2@gmail.com>
4224         * gm2-compiler/M2Quads.mod (AssignUnboundedVar): Check Type
4225         against NulSym and call MetaErrorT1 if necessary.
4226         (AssignUnboundedNonVar): Check Type against NulSym and
4227         call MetaErrorT1 if necessary.
4228         (BuildDesignatorPointer): Check Type1 against NulSym and
4229         call MetaErrorT1 if necessary.
4231 2023-01-16  Gaius Mulley  <gaiusmod2@gmail.com>
4233         * mc/mcOptions.mod (displayVersion): Change GPLv2 to GPLv3.
4234         (YEAR) set to 2023.
4236 2023-01-15  Gaius Mulley  <gaiusmod2@gmail.com>
4238         * gm2-compiler/M2LexBuf.mod (isSrcToken): Add block comment.
4239         Remove dead code.
4240         * gm2-compiler/M2Quads.def (BuildNot): Add notTokPos parameter.
4241         * gm2-compiler/M2Quads.mod (BuildNot): Add notTokPos parameter.
4242         Create and push virtual token.
4243         (PopBooltok): New procedure.
4244         (PushBooltok): New procedure.
4245         (PushBool): Re-implement using PushBooltok.
4246         (PopBool): Re-implement using PopBooltok.
4247         * gm2-compiler/P3Build.bnf (ConstFactor): Record token
4248         position of NOT.
4249         (Factor): Record token position of NOT.
4250         * gm2-compiler/PHBuild.bnf (ConstFactor): Record token
4251         position of NOT.
4252         (Relation): Push token position.
4253         (UnaryOrConstTerm): Push token position.
4254         (AddOperator): Push token position.
4255         (MulOperator): Push token position.
4257 2023-01-13  Iain Sandoe  <iain@sandoe.co.uk>
4259         * gm2-gcc/m2options.h (M2Options_SetVerbose): Export the
4260         function.
4261         * gm2-lang.cc: Handle OPT_v, passing it to the compiler.
4262         * lang-specs.h: Pass -v to cc1gm2.
4264 2023-01-13  Gaius Mulley  <gaiusmod2@gmail.com>
4266         * mc-boot-ch/GRTco.c (RTco_select): Add return 0.
4267         * pge-boot/GRTco.c (RTco_select): Add return 0.
4269 2023-01-10  Gaius Mulley  <gaiusmod2@gmail.com>
4271         * Make-lang.in (m2/mc-boot/$(SRC_PREFIX)%.o): Add
4272         m2/gm2-libs/gm2-libs-host.h dependency.
4273         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Add
4274         m2/gm2-libs/gm2-libs-host.h dependency.
4276 2023-01-10  Gaius Mulley  <gaiusmod2@gmail.com>
4278         * Make-lang.in (GM2_1): Change -B path to m2/stage1.
4279         ($(objdir)/m2/images/gnu.eps): Check and create dest dir
4280         if necessary.
4281         (gm2-libs.texi-check): Check and create dir m2/gm2-libs-pim,
4282         m2/gm2-libs-iso and m2/gm2-libs if necessary.
4283         ($(objdir)/m2/gm2-compiler-boot): Remove.
4284         ($(objdir)/m2/gm2-libs-boot): Remove.
4285         ($(objdir)/m2/gm2-libs-libiberty): Remove.
4286         ($(objdir)/m2/gm2-libiberty): Remove.
4287         ($(objdir)/m2/gm2-gcc): Remove.
4288         ($(objdir)/m2/gm2-compiler): Remove.
4289         ($(objdir)/m2/gm2-libs): Remove.
4290         ($(objdir)/m2/gm2-libs-iso): Remove.
4291         ($(objdir)/m2/gm2-libs-min): Remove.
4292         ($(objdir)/m2/gm2-compiler-paranoid): Remove.
4293         ($(objdir)/m2/gm2-libs-paranoid): Remove.
4294         ($(objdir)/m2/gm2-compiler-verify): Remove.
4295         ($(objdir)/m2/boot-bin): Remove.
4296         ($(objdir)/m2/gm2-libs-pim): Remove.
4297         ($(objdir)/m2/gm2-libs-coroutines): Remove.
4298         (stage1/m2): Remove.
4299         (stage2/m2): Remove.
4300         (stage3/m2): Remove.
4301         (m2.stageprofile): New rule.
4302         (m2.stagefeedback): New rule.
4303         (cc1gm2$(exeext)): Change dependent name.
4304         (m2/stage2/cc1gm2$(exeext)): Change dependent name.
4305         Check and create dest dir.
4306         (m2/stage1/cc1gm2$(exeext)): Check and create dest dir
4307         if necessary.
4308         (m2/gm2-gcc/%.o): Ditto.
4309         (m2/gm2-gcc/rtegraph.o): Ditto.
4310         (m2/gm2-gcc/$(SRC_PREFIX)%.h): Ditto.
4311         (m2/gm2-gcc/$(SRC_PREFIX)%.h): Ditto.
4312         (m2/mc-boot): Ditto.
4313         (m2/mc-boot-ch): Ditto.
4314         (m2/gm2-libs-boot): Ditto.
4315         (m2/gm2-compiler-boot): Ditto.
4316         (m2/gm2-compiler): Ditto.
4317         (m2/gm2-libiberty): Ditto.
4318         (m2/gm2-compiler): Ditto.
4319         (m2/gm2-libs-iso): Ditto.
4320         (m2/gm2-libs): Ditto.
4321         (m2/gm2-libs-min): Ditto.
4322         (m2/gm2-libs-coroutines): Ditto.
4323         (m2/boot-bin): Ditto.
4324         (m2/pge-boot): Ditto.
4325         (m2/pge-boot): Ditto.
4326         * Make-maintainer.in (m2/gm2-ppg-boot): Check and create
4327         dest dir if necessary.
4328         (m2): Ditto.
4329         (m2/gm2-ppg-boot): Ditto.
4330         (m2/gm2-pg-boot): Ditto.
4331         (m2/gm2-auto): Ditto.
4332         (m2/gm2-pg-boot): Ditto.
4333         (m2/gm2-pge-boot): Ditto.
4334         ($(objdir)/plugin): Ditto.
4335         ($(objdir)/m2/mc-boot-ch): Ditto.
4336         ($(objdir)/m2/mc-boot-gen): Ditto.
4337         (m2/boot-bin): Ditto.
4338         (m2/mc): Ditto.
4339         (m2/mc-obj): Ditto.
4340         ($(objdir)/m2/gm2-ppg-boot): Ditto.
4341         ($(objdir)/m2/gm2-pg-boot): Ditto.
4342         ($(objdir)/m2/gm2-pge-boot): Ditto.
4343         (m2/mc-boot-gen): Ditto.
4344         (m2/m2obj3): Ditto.
4345         (m2/gm2-libs-paranoid): Ditto.
4346         (m2/gm2-compiler-paranoid): Ditto.
4347         (m2/gm2-libs-paranoid): Ditto.
4348         (m2/gm2-compiler-paranoid): Ditto.
4349         (m2/gm2-libs-paranoid): Ditto.
4350         (m2/gm2-compiler-paranoid): Ditto.
4351         * config-lang.in (m2/gm2-compiler-boot): Remove mkdir.
4352         (m2/gm2-libs-boot): Ditto.
4353         (m2/gm2-ici-boot): Ditto.
4354         (m2/gm2-libiberty): Ditto.
4355         (m2/gm2-gcc): Ditto.
4356         (m2/gm2-compiler): Ditto.
4357         (m2/gm2-libs): Ditto.
4358         (m2/gm2-libs-iso): Ditto.
4359         (m2/gm2-compiler-paranoid): Ditto.
4360         (m2/gm2-libs-paranoid): Ditto.
4361         (m2/gm2-compiler-verify): Ditto.
4362         (m2/boot-bin): Ditto.
4363         (m2/gm2-libs-pim): Ditto.
4364         (m2/gm2-libs-coroutines): Ditto.
4365         (m2/gm2-libs-min): Ditto.
4366         (m2/pge-boot): Ditto.
4367         (plugin): Ditto.
4368         (stage1/m2): Ditto.
4369         (stage2/m2): Ditto.
4370         (stage3/m2): Ditto.
4371         (stage4/m2): Ditto.
4372         (m2/gm2-auto): Ditto.
4373         (m2/gm2-pg-boot): Ditto.
4374         (m2/gm2-pge-boot): Ditto.
4375         (m2/gm2-ppg-boot): Ditto.
4376         (m2/mc-boot): Ditto.
4377         (m2/mc-boot-ch): Ditto.
4378         (m2/mc-boot-gen): Ditto.
4380 2023-01-09  Gaius Mulley  <gaiusmod2@gmail.com>
4382         * Make-lang.in (m2/pge-boot/%.o): Add m2/gm2config.h.
4383         * gm2-libs/config-host: Regenerate.
4385 2023-01-07  Iain Sandoe  <iain@sandoe.co.uk>
4387         * gm2-libs-min/libc.c (abort): Update declaration to match the
4388         expected form, add no-return attribute.
4389         (exit): Add no-return attribute.
4391 2023-01-05  Iain Sandoe  <iain@sandoe.co.uk>
4393         PR modula2/107631
4394         * gm2-gcc/m2builtins.cc: Remove scalb, scalbf, scalbl,
4395         significand, significandf, significandl.
4396         * gm2-libs/Builtins.def (significand): Likewise.
4397         * gm2-libs/Builtins.mod: Likewise.
4398         * target-independent/Builtins.texi: Likewise.
4399         * gm2-libs-iso/LowLong.mod: Implement fraction with scalbn*() and
4400         ilogb*().
4401         * gm2-libs-iso/LowReal.mod: Likewise.
4402         * gm2-libs-iso/LowShort.mod: Likewise.
4404 2023-01-05  Gaius Mulley  <gaiusmod2@gmail.com>
4406         * gm2-libs-min/M2RTS.def (ConstructModules): New procedure
4407         declaration.
4408         (DeconstructModules): New procedure declaration.
4409         * gm2-libs-min/M2RTS.mod (ConstructModules): New procedure
4410         dummy implementation.
4411         (DeconstructModules): New procedure dummy implementation.
4413 2023-01-05  Iain Sandoe  <iain@sandoe.co.uk>
4415         * gm2spec.cc (lang_specific_driver): Handle static-libgm2.
4416         * lang.opt: Add static-libgm2.
4418 2023-01-05  Iain Sandoe  <iain@sandoe.co.uk>
4420         * gm2spec.cc (lang_specific_driver): Pass -static-libstdc++ on to
4421         the target driver if the linker does not support Bstatic/dynamic.
4423 2023-01-04  Iain Sandoe  <iain@sandoe.co.uk>
4425         PR modula2/108183
4426         * gm2-libs-ch/UnixArgs.cc (_M2_UnixArgs_ctor): Rework to use
4427         an extern "C" function with 'constructor' attribute.
4428         * gm2-libs-ch/dtoa.cc (_M2_dtoa_ctor): Likewise.
4429         * gm2-libs-ch/ldtoa.cc (_M2_ldtoa_ctor): Likewise.
4431 2023-01-04  Iain Sandoe  <iain@sandoe.co.uk>
4433         PR modula2/108259
4434         * gm2-gcc/m2decl.cc (m2decl_DeclareModuleCtor): Make module
4435         registration constructors visible.
4437 2023-01-04  Iain Sandoe  <iain@sandoe.co.uk>
4439         * Make-lang.in (dvi, ps, pdf): Build in the gcc/doc directory, also
4440         use the configured tools for texi -> dvi and texi -> pdf.
4442 2023-01-01  Iain Sandoe  <iain@sandoe.co.uk>
4443             Gaius Mulley  <gaiusmod2@gmail.com>
4445         PR modula2/108183
4446         * gm2-compiler/M2GCCDeclare.mod: Module registration constructors are
4447         externs to the builder of m2_link.
4449 2022-12-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4450             Iain Sandoe  <iain@sandoe.co.uk>
4452         PR modula2/107612
4453         * Make-lang.in (soext): Use .dylib for Darwin.
4454         (PLUGINLDFLAGS): Use dynmic lookup, set the plugin name, and append
4455         -nodefaultlibs to suppress the linking of libstdc++.
4456         Use INCINTL in compile lines for the plugin.
4458 2022-12-21  Jakub Jelinek  <jakub@redhat.com>
4460         PR modula2/108153
4461         * gm2-gcc/m2linemap.def (location_t): Use CARDINAL instead of INTEGER.
4463 2022-12-19  Jakub Jelinek  <jakub@redhat.com>
4465         * gm2-gcc/m2linemap.cc (m2linemap_ErrorAt, m2linemap_ErrorAtf,
4466         m2linemap_WarningAtf, m2linemap_NoteAtf, m2linemap_internal_error):
4467         Call functions with "%s", message rather than just message, so that
4468         % chars in message aren't treated as format specifiers.
4470 2022-12-19  Jakub Jelinek  <jakub@redhat.com>
4472         PR modula2/108147
4473         * gm2-gcc/m2linemap.def (ErrorAtf, WarningAtf, NoteAtf):
4474         Comment out prototypes with varargs.
4475         * gm2-gcc/m2linemap.h (m2linemap_ErrorAtf, m2linemap_WarningAtf,
4476         m2linemap_NoteAtf): No longer varargs.
4477         * gm2-gcc/m2linemap.cc (m2linemap_ErrorAtf): Turned into a
4478         non-varargs wrapper around ...
4479         (m2linemap_ErrorAtf_1): ... this.  New static function.
4480         (m2linemap_WarningAtf): Turned into a non-varargs wrapper around ...
4481         (m2linemap_WarningAtf_1): ... this.  New static function.
4482         (m2linemap_NoteAtf): Turned into a non-varargs wrapper around ...
4483         (m2linemap_NoteAtf_1): ... this.  New static function.
4485 2022-12-15  Gaius Mulley  <gaiusmod2@gmail.com>
4487         * configure.ac: Stop probing for realpath.
4488         * tools-src/calcpath: Break dependency on realpath, cut
4489         and echo.
4490         * configure: Rebuilt.
4492 2022-12-15  Gaius Mulley  <gaiusmod2@gmail.com>
4494         * gm2config.h.in: Rebuilt.
4496 2022-12-14  Gaius Mulley  <gaiusmod2@gmail.com>
4498         * COPYING.FDL: New file.
4499         * COPYING.RUNTIME: New file.
4500         * COPYING3: New file.
4501         * COPYING3.LIB: New file.
4502         * Make-lang.in: New file.
4503         * Make-maintainer.in: New file.
4504         * NEWS: New file.
4505         * README: New file.
4506         * config-lang.in: New file.
4507         * config-make.in: New file.
4508         * configure.ac: New file.
4509         * gm2-compiler/CLexBuf.def: New file.
4510         * gm2-compiler/CLexBuf.mod: New file.
4511         * gm2-compiler/FifoQueue.def: New file.
4512         * gm2-compiler/FifoQueue.mod: New file.
4513         * gm2-compiler/Lists.def: New file.
4514         * gm2-compiler/Lists.mod: New file.
4515         * gm2-compiler/M2ALU.def: New file.
4516         * gm2-compiler/M2ALU.mod: New file.
4517         * gm2-compiler/M2AsmUtil.def: New file.
4518         * gm2-compiler/M2AsmUtil.mod: New file.
4519         * gm2-compiler/M2Base.def: New file.
4520         * gm2-compiler/M2Base.mod: New file.
4521         * gm2-compiler/M2BasicBlock.def: New file.
4522         * gm2-compiler/M2BasicBlock.mod: New file.
4523         * gm2-compiler/M2Batch.def: New file.
4524         * gm2-compiler/M2Batch.mod: New file.
4525         * gm2-compiler/M2Bitset.def: New file.
4526         * gm2-compiler/M2Bitset.mod: New file.
4527         * gm2-compiler/M2CaseList.def: New file.
4528         * gm2-compiler/M2CaseList.mod: New file.
4529         * gm2-compiler/M2Check.def: New file.
4530         * gm2-compiler/M2Check.mod: New file.
4531         * gm2-compiler/M2Code.def: New file.
4532         * gm2-compiler/M2Code.mod: New file.
4533         * gm2-compiler/M2ColorString.def: New file.
4534         * gm2-compiler/M2ColorString.mod: New file.
4535         * gm2-compiler/M2Comp.def: New file.
4536         * gm2-compiler/M2Comp.mod: New file.
4537         * gm2-compiler/M2Const.def: New file.
4538         * gm2-compiler/M2Const.mod: New file.
4539         * gm2-compiler/M2Debug.def: New file.
4540         * gm2-compiler/M2Debug.mod: New file.
4541         * gm2-compiler/M2DebugStack.def: New file.
4542         * gm2-compiler/M2DebugStack.mod: New file.
4543         * gm2-compiler/M2Defaults.def: New file.
4544         * gm2-compiler/M2Defaults.mod: New file.
4545         * gm2-compiler/M2DriverOptions.def: New file.
4546         * gm2-compiler/M2DriverOptions.mod: New file.
4547         * gm2-compiler/M2Emit.def: New file.
4548         * gm2-compiler/M2Emit.mod: New file.
4549         * gm2-compiler/M2Error.def: New file.
4550         * gm2-compiler/M2Error.mod: New file.
4551         * gm2-compiler/M2EvalSym.def: New file.
4552         * gm2-compiler/M2FileName.def: New file.
4553         * gm2-compiler/M2FileName.mod: New file.
4554         * gm2-compiler/M2GCCDeclare.def: New file.
4555         * gm2-compiler/M2GCCDeclare.mod: New file.
4556         * gm2-compiler/M2GenGCC.def: New file.
4557         * gm2-compiler/M2GenGCC.mod: New file.
4558         * gm2-compiler/M2Graph.def: New file.
4559         * gm2-compiler/M2Graph.mod: New file.
4560         * gm2-compiler/M2Lex.def: New file.
4561         * gm2-compiler/M2Lex.mod: New file.
4562         * gm2-compiler/M2LexBuf.def: New file.
4563         * gm2-compiler/M2LexBuf.mod: New file.
4564         * gm2-compiler/M2MetaError.def: New file.
4565         * gm2-compiler/M2MetaError.mod: New file.
4566         * gm2-compiler/M2Optimize.def: New file.
4567         * gm2-compiler/M2Optimize.mod: New file.
4568         * gm2-compiler/M2Options.def: New file.
4569         * gm2-compiler/M2Options.mod: New file.
4570         * gm2-compiler/M2Pass.def: New file.
4571         * gm2-compiler/M2Pass.mod: New file.
4572         * gm2-compiler/M2Preprocess.def: New file.
4573         * gm2-compiler/M2Preprocess.mod: New file.
4574         * gm2-compiler/M2Printf.def: New file.
4575         * gm2-compiler/M2Printf.mod: New file.
4576         * gm2-compiler/M2Quads.def: New file.
4577         * gm2-compiler/M2Quads.mod: New file.
4578         * gm2-compiler/M2Quiet.def: New file.
4579         * gm2-compiler/M2Quiet.mod: New file.
4580         * gm2-compiler/M2Range.def: New file.
4581         * gm2-compiler/M2Range.mod: New file.
4582         * gm2-compiler/M2Reserved.def: New file.
4583         * gm2-compiler/M2Reserved.mod: New file.
4584         * gm2-compiler/M2SSA.def: New file.
4585         * gm2-compiler/M2SSA.mod: New file.
4586         * gm2-compiler/M2Scaffold.def: New file.
4587         * gm2-compiler/M2Scaffold.mod: New file.
4588         * gm2-compiler/M2Scope.def: New file.
4589         * gm2-compiler/M2Scope.mod: New file.
4590         * gm2-compiler/M2Search.def: New file.
4591         * gm2-compiler/M2Search.mod: New file.
4592         * gm2-compiler/M2Size.def: New file.
4593         * gm2-compiler/M2Size.mod: New file.
4594         * gm2-compiler/M2StackAddress.def: New file.
4595         * gm2-compiler/M2StackAddress.mod: New file.
4596         * gm2-compiler/M2StackWord.def: New file.
4597         * gm2-compiler/M2StackWord.mod: New file.
4598         * gm2-compiler/M2Students.def: New file.
4599         * gm2-compiler/M2Students.mod: New file.
4600         * gm2-compiler/M2Swig.def: New file.
4601         * gm2-compiler/M2Swig.mod: New file.
4602         * gm2-compiler/M2System.def: New file.
4603         * gm2-compiler/M2System.mod: New file.
4604         * gm2-compiler/M2Version.def: New file.
4605         * gm2-compiler/NameKey.def: New file.
4606         * gm2-compiler/NameKey.mod: New file.
4607         * gm2-compiler/ObjectFiles.def: New file.
4608         * gm2-compiler/ObjectFiles.mod: New file.
4609         * gm2-compiler/Output.def: New file.
4610         * gm2-compiler/Output.mod: New file.
4611         * gm2-compiler/P0SymBuild.def: New file.
4612         * gm2-compiler/P0SymBuild.mod: New file.
4613         * gm2-compiler/P0SyntaxCheck.bnf: New file.
4614         * gm2-compiler/P0SyntaxCheck.def: New file.
4615         * gm2-compiler/P1Build.bnf: New file.
4616         * gm2-compiler/P1Build.def: New file.
4617         * gm2-compiler/P1SymBuild.def: New file.
4618         * gm2-compiler/P1SymBuild.mod: New file.
4619         * gm2-compiler/P2Build.bnf: New file.
4620         * gm2-compiler/P2Build.def: New file.
4621         * gm2-compiler/P2SymBuild.def: New file.
4622         * gm2-compiler/P2SymBuild.mod: New file.
4623         * gm2-compiler/P3Build.bnf: New file.
4624         * gm2-compiler/P3Build.def: New file.
4625         * gm2-compiler/P3SymBuild.def: New file.
4626         * gm2-compiler/P3SymBuild.mod: New file.
4627         * gm2-compiler/PCBuild.bnf: New file.
4628         * gm2-compiler/PCBuild.def: New file.
4629         * gm2-compiler/PCSymBuild.def: New file.
4630         * gm2-compiler/PCSymBuild.mod: New file.
4631         * gm2-compiler/PHBuild.bnf: New file.
4632         * gm2-compiler/PHBuild.def: New file.
4633         * gm2-compiler/README: New file.
4634         * gm2-compiler/Sets.def: New file.
4635         * gm2-compiler/Sets.mod: New file.
4636         * gm2-compiler/SymbolConversion.def: New file.
4637         * gm2-compiler/SymbolConversion.mod: New file.
4638         * gm2-compiler/SymbolKey.def: New file.
4639         * gm2-compiler/SymbolKey.mod: New file.
4640         * gm2-compiler/SymbolTable.def: New file.
4641         * gm2-compiler/SymbolTable.mod: New file.
4642         * gm2-compiler/bnflex.def: New file.
4643         * gm2-compiler/bnflex.mod: New file.
4644         * gm2-compiler/cflex.def: New file.
4645         * gm2-compiler/gm2.mod: New file.
4646         * gm2-compiler/gm2lcc.mod: New file.
4647         * gm2-compiler/gm2lgen.mod: New file.
4648         * gm2-compiler/gm2lorder.mod: New file.
4649         * gm2-compiler/m2flex.def: New file.
4650         * gm2-compiler/ppg.mod: New file.
4651         * gm2-gcc/README: New file.
4652         * gm2-gcc/dynamicstrings.h: New file.
4653         * gm2-gcc/gcc-consolidation.h: New file.
4654         * gm2-gcc/init.cc: New file.
4655         * gm2-gcc/init.def: New file.
4656         * gm2-gcc/init.h: New file.
4657         * gm2-gcc/m2assert.cc: New file.
4658         * gm2-gcc/m2assert.h: New file.
4659         * gm2-gcc/m2block.cc: New file.
4660         * gm2-gcc/m2block.def: New file.
4661         * gm2-gcc/m2block.h: New file.
4662         * gm2-gcc/m2builtins.cc: New file.
4663         * gm2-gcc/m2builtins.def: New file.
4664         * gm2-gcc/m2builtins.h: New file.
4665         * gm2-gcc/m2color.cc: New file.
4666         * gm2-gcc/m2color.def: New file.
4667         * gm2-gcc/m2color.h: New file.
4668         * gm2-gcc/m2configure.cc: New file.
4669         * gm2-gcc/m2configure.def: New file.
4670         * gm2-gcc/m2configure.h: New file.
4671         * gm2-gcc/m2convert.cc: New file.
4672         * gm2-gcc/m2convert.def: New file.
4673         * gm2-gcc/m2convert.h: New file.
4674         * gm2-gcc/m2decl.cc: New file.
4675         * gm2-gcc/m2decl.def: New file.
4676         * gm2-gcc/m2decl.h: New file.
4677         * gm2-gcc/m2except.cc: New file.
4678         * gm2-gcc/m2except.def: New file.
4679         * gm2-gcc/m2except.h: New file.
4680         * gm2-gcc/m2expr.cc: New file.
4681         * gm2-gcc/m2expr.def: New file.
4682         * gm2-gcc/m2expr.h: New file.
4683         * gm2-gcc/m2linemap.cc: New file.
4684         * gm2-gcc/m2linemap.def: New file.
4685         * gm2-gcc/m2linemap.h: New file.
4686         * gm2-gcc/m2misc.cc: New file.
4687         * gm2-gcc/m2misc.def: New file.
4688         * gm2-gcc/m2misc.h: New file.
4689         * gm2-gcc/m2options.h: New file.
4690         * gm2-gcc/m2range.h: New file.
4691         * gm2-gcc/m2search.h: New file.
4692         * gm2-gcc/m2statement.cc: New file.
4693         * gm2-gcc/m2statement.def: New file.
4694         * gm2-gcc/m2statement.h: New file.
4695         * gm2-gcc/m2top.cc: New file.
4696         * gm2-gcc/m2top.def: New file.
4697         * gm2-gcc/m2top.h: New file.
4698         * gm2-gcc/m2tree.cc: New file.
4699         * gm2-gcc/m2tree.def: New file.
4700         * gm2-gcc/m2tree.h: New file.
4701         * gm2-gcc/m2treelib.cc: New file.
4702         * gm2-gcc/m2treelib.def: New file.
4703         * gm2-gcc/m2treelib.h: New file.
4704         * gm2-gcc/m2type.cc: New file.
4705         * gm2-gcc/m2type.def: New file.
4706         * gm2-gcc/m2type.h: New file.
4707         * gm2-gcc/rtegraph.cc: New file.
4708         * gm2-gcc/rtegraph.h: New file.
4709         * gm2-ici/M2Emit.mod: New file.
4710         * gm2-ici/README: New file.
4711         * gm2-ici/m2linemap.c: New file.
4712         * gm2-internals.texi: New file.
4713         * gm2-lang.cc: New file.
4714         * gm2-lang.h: New file.
4715         * gm2-libiberty/README: New file.
4716         * gm2-libiberty/choosetemp.def: New file.
4717         * gm2-libiberty/pexecute.def: New file.
4718         * gm2-libs-ch/M2LINK.c: New file.
4719         * gm2-libs-ch/README: New file.
4720         * gm2-libs-ch/RTcodummy.c: New file.
4721         * gm2-libs-ch/RTintdummy.c: New file.
4722         * gm2-libs-ch/Selective.c: New file.
4723         * gm2-libs-ch/SysExceptions.c: New file.
4724         * gm2-libs-ch/UnixArgs.cc: New file.
4725         * gm2-libs-ch/cgetopt.c: New file.
4726         * gm2-libs-ch/choosetemp.c: New file.
4727         * gm2-libs-ch/dtoa.cc: New file.
4728         * gm2-libs-ch/errno.c: New file.
4729         * gm2-libs-ch/host.c: New file.
4730         * gm2-libs-ch/ldtoa.cc: New file.
4731         * gm2-libs-ch/m2rts.h: New file.
4732         * gm2-libs-ch/termios.c: New file.
4733         * gm2-libs-ch/tools.c: New file.
4734         * gm2-libs-ch/wrapc.c: New file.
4735         * gm2-libs-ch/xlibc.c: New file.
4736         * gm2-libs-coroutines/Debug.def: New file.
4737         * gm2-libs-coroutines/Debug.mod: New file.
4738         * gm2-libs-coroutines/Executive.def: New file.
4739         * gm2-libs-coroutines/Executive.mod: New file.
4740         * gm2-libs-coroutines/KeyBoardLEDs.def: New file.
4741         * gm2-libs-coroutines/README.texi: New file.
4742         * gm2-libs-coroutines/SYSTEM.def: New file.
4743         * gm2-libs-coroutines/SYSTEM.mod: New file.
4744         * gm2-libs-coroutines/TimerHandler.def: New file.
4745         * gm2-libs-coroutines/TimerHandler.mod: New file.
4746         * gm2-libs-iso/COROUTINES.def: New file.
4747         * gm2-libs-iso/COROUTINES.mod: New file.
4748         * gm2-libs-iso/ChanConsts.def: New file.
4749         * gm2-libs-iso/ChanConsts.h: New file.
4750         * gm2-libs-iso/ChanConsts.mod: New file.
4751         * gm2-libs-iso/CharClass.def: New file.
4752         * gm2-libs-iso/CharClass.mod: New file.
4753         * gm2-libs-iso/ClientSocket.def: New file.
4754         * gm2-libs-iso/ClientSocket.mod: New file.
4755         * gm2-libs-iso/ComplexMath.def: New file.
4756         * gm2-libs-iso/ComplexMath.mod: New file.
4757         * gm2-libs-iso/ConvStringLong.def: New file.
4758         * gm2-libs-iso/ConvStringLong.mod: New file.
4759         * gm2-libs-iso/ConvStringReal.def: New file.
4760         * gm2-libs-iso/ConvStringReal.mod: New file.
4761         * gm2-libs-iso/ConvTypes.def: New file.
4762         * gm2-libs-iso/ConvTypes.mod: New file.
4763         * gm2-libs-iso/EXCEPTIONS.def: New file.
4764         * gm2-libs-iso/EXCEPTIONS.mod: New file.
4765         * gm2-libs-iso/ErrnoCategory.def: New file.
4766         * gm2-libs-iso/GeneralUserExceptions.def: New file.
4767         * gm2-libs-iso/GeneralUserExceptions.mod: New file.
4768         * gm2-libs-iso/IOChan.def: New file.
4769         * gm2-libs-iso/IOChan.mod: New file.
4770         * gm2-libs-iso/IOConsts.def: New file.
4771         * gm2-libs-iso/IOConsts.mod: New file.
4772         * gm2-libs-iso/IOLink.def: New file.
4773         * gm2-libs-iso/IOLink.mod: New file.
4774         * gm2-libs-iso/IOResult.def: New file.
4775         * gm2-libs-iso/IOResult.mod: New file.
4776         * gm2-libs-iso/LongComplexMath.def: New file.
4777         * gm2-libs-iso/LongComplexMath.mod: New file.
4778         * gm2-libs-iso/LongConv.def: New file.
4779         * gm2-libs-iso/LongConv.mod: New file.
4780         * gm2-libs-iso/LongIO.def: New file.
4781         * gm2-libs-iso/LongIO.mod: New file.
4782         * gm2-libs-iso/LongMath.def: New file.
4783         * gm2-libs-iso/LongMath.mod: New file.
4784         * gm2-libs-iso/LongStr.def: New file.
4785         * gm2-libs-iso/LongStr.mod: New file.
4786         * gm2-libs-iso/LongWholeIO.def: New file.
4787         * gm2-libs-iso/LongWholeIO.mod: New file.
4788         * gm2-libs-iso/LowLong.def: New file.
4789         * gm2-libs-iso/LowLong.mod: New file.
4790         * gm2-libs-iso/LowReal.def: New file.
4791         * gm2-libs-iso/LowReal.mod: New file.
4792         * gm2-libs-iso/LowShort.def: New file.
4793         * gm2-libs-iso/LowShort.mod: New file.
4794         * gm2-libs-iso/M2EXCEPTION.def: New file.
4795         * gm2-libs-iso/M2EXCEPTION.mod: New file.
4796         * gm2-libs-iso/M2RTS.def: New file.
4797         * gm2-libs-iso/M2RTS.mod: New file.
4798         * gm2-libs-iso/MemStream.def: New file.
4799         * gm2-libs-iso/MemStream.mod: New file.
4800         * gm2-libs-iso/Preemptive.def: New file.
4801         * gm2-libs-iso/Preemptive.mod: New file.
4802         * gm2-libs-iso/Processes.def: New file.
4803         * gm2-libs-iso/Processes.mod: New file.
4804         * gm2-libs-iso/ProgramArgs.def: New file.
4805         * gm2-libs-iso/ProgramArgs.mod: New file.
4806         * gm2-libs-iso/README.texi: New file.
4807         * gm2-libs-iso/RTco.def: New file.
4808         * gm2-libs-iso/RTdata.def: New file.
4809         * gm2-libs-iso/RTdata.mod: New file.
4810         * gm2-libs-iso/RTentity.def: New file.
4811         * gm2-libs-iso/RTentity.mod: New file.
4812         * gm2-libs-iso/RTfio.def: New file.
4813         * gm2-libs-iso/RTfio.mod: New file.
4814         * gm2-libs-iso/RTgen.def: New file.
4815         * gm2-libs-iso/RTgen.mod: New file.
4816         * gm2-libs-iso/RTgenif.def: New file.
4817         * gm2-libs-iso/RTgenif.mod: New file.
4818         * gm2-libs-iso/RTio.def: New file.
4819         * gm2-libs-iso/RTio.mod: New file.
4820         * gm2-libs-iso/RandomNumber.def: New file.
4821         * gm2-libs-iso/RandomNumber.mod: New file.
4822         * gm2-libs-iso/RawIO.def: New file.
4823         * gm2-libs-iso/RawIO.mod: New file.
4824         * gm2-libs-iso/RealConv.def: New file.
4825         * gm2-libs-iso/RealConv.mod: New file.
4826         * gm2-libs-iso/RealIO.def: New file.
4827         * gm2-libs-iso/RealIO.mod: New file.
4828         * gm2-libs-iso/RealMath.def: New file.
4829         * gm2-libs-iso/RealMath.mod: New file.
4830         * gm2-libs-iso/RealStr.def: New file.
4831         * gm2-libs-iso/RealStr.mod: New file.
4832         * gm2-libs-iso/RndFile.def: New file.
4833         * gm2-libs-iso/RndFile.mod: New file.
4834         * gm2-libs-iso/SIOResult.def: New file.
4835         * gm2-libs-iso/SIOResult.mod: New file.
4836         * gm2-libs-iso/SLongIO.def: New file.
4837         * gm2-libs-iso/SLongIO.mod: New file.
4838         * gm2-libs-iso/SLongWholeIO.def: New file.
4839         * gm2-libs-iso/SLongWholeIO.mod: New file.
4840         * gm2-libs-iso/SRawIO.def: New file.
4841         * gm2-libs-iso/SRawIO.mod: New file.
4842         * gm2-libs-iso/SRealIO.def: New file.
4843         * gm2-libs-iso/SRealIO.mod: New file.
4844         * gm2-libs-iso/SShortIO.def: New file.
4845         * gm2-libs-iso/SShortIO.mod: New file.
4846         * gm2-libs-iso/SShortWholeIO.def: New file.
4847         * gm2-libs-iso/SShortWholeIO.mod: New file.
4848         * gm2-libs-iso/STextIO.def: New file.
4849         * gm2-libs-iso/STextIO.mod: New file.
4850         * gm2-libs-iso/SWholeIO.def: New file.
4851         * gm2-libs-iso/SWholeIO.mod: New file.
4852         * gm2-libs-iso/SYSTEM.def: New file.
4853         * gm2-libs-iso/SYSTEM.mod: New file.
4854         * gm2-libs-iso/Semaphores.def: New file.
4855         * gm2-libs-iso/Semaphores.mod: New file.
4856         * gm2-libs-iso/SeqFile.def: New file.
4857         * gm2-libs-iso/SeqFile.mod: New file.
4858         * gm2-libs-iso/ShortComplexMath.def: New file.
4859         * gm2-libs-iso/ShortComplexMath.mod: New file.
4860         * gm2-libs-iso/ShortIO.def: New file.
4861         * gm2-libs-iso/ShortIO.mod: New file.
4862         * gm2-libs-iso/ShortWholeIO.def: New file.
4863         * gm2-libs-iso/ShortWholeIO.mod: New file.
4864         * gm2-libs-iso/SimpleCipher.def: New file.
4865         * gm2-libs-iso/SimpleCipher.mod: New file.
4866         * gm2-libs-iso/StdChans.def: New file.
4867         * gm2-libs-iso/StdChans.mod: New file.
4868         * gm2-libs-iso/Storage.def: New file.
4869         * gm2-libs-iso/Storage.mod: New file.
4870         * gm2-libs-iso/StreamFile.def: New file.
4871         * gm2-libs-iso/StreamFile.mod: New file.
4872         * gm2-libs-iso/StringChan.def: New file.
4873         * gm2-libs-iso/StringChan.mod: New file.
4874         * gm2-libs-iso/Strings.def: New file.
4875         * gm2-libs-iso/Strings.mod: New file.
4876         * gm2-libs-iso/SysClock.def: New file.
4877         * gm2-libs-iso/SysClock.mod: New file.
4878         * gm2-libs-iso/TERMINATION.def: New file.
4879         * gm2-libs-iso/TERMINATION.mod: New file.
4880         * gm2-libs-iso/TermFile.def: New file.
4881         * gm2-libs-iso/TermFile.mod: New file.
4882         * gm2-libs-iso/TextIO.def: New file.
4883         * gm2-libs-iso/TextIO.mod: New file.
4884         * gm2-libs-iso/WholeConv.def: New file.
4885         * gm2-libs-iso/WholeConv.mod: New file.
4886         * gm2-libs-iso/WholeIO.def: New file.
4887         * gm2-libs-iso/WholeIO.mod: New file.
4888         * gm2-libs-iso/WholeStr.def: New file.
4889         * gm2-libs-iso/WholeStr.mod: New file.
4890         * gm2-libs-iso/wrapsock.c: New file.
4891         * gm2-libs-iso/wrapsock.def: New file.
4892         * gm2-libs-iso/wraptime.c: New file.
4893         * gm2-libs-iso/wraptime.def: New file.
4894         * gm2-libs-min/M2RTS.def: New file.
4895         * gm2-libs-min/M2RTS.mod: New file.
4896         * gm2-libs-min/SYSTEM.def: New file.
4897         * gm2-libs-min/SYSTEM.mod: New file.
4898         * gm2-libs-min/libc.c: New file.
4899         * gm2-libs-min/libc.def: New file.
4900         * gm2-libs-pim/BitBlockOps.def: New file.
4901         * gm2-libs-pim/BitBlockOps.mod: New file.
4902         * gm2-libs-pim/BitByteOps.def: New file.
4903         * gm2-libs-pim/BitByteOps.mod: New file.
4904         * gm2-libs-pim/BitWordOps.def: New file.
4905         * gm2-libs-pim/BitWordOps.mod: New file.
4906         * gm2-libs-pim/BlockOps.def: New file.
4907         * gm2-libs-pim/BlockOps.mod: New file.
4908         * gm2-libs-pim/Break.c: New file.
4909         * gm2-libs-pim/Break.def: New file.
4910         * gm2-libs-pim/CardinalIO.def: New file.
4911         * gm2-libs-pim/CardinalIO.mod: New file.
4912         * gm2-libs-pim/Conversions.def: New file.
4913         * gm2-libs-pim/Conversions.mod: New file.
4914         * gm2-libs-pim/DebugPMD.def: New file.
4915         * gm2-libs-pim/DebugPMD.mod: New file.
4916         * gm2-libs-pim/DebugTrace.def: New file.
4917         * gm2-libs-pim/DebugTrace.mod: New file.
4918         * gm2-libs-pim/Delay.def: New file.
4919         * gm2-libs-pim/Delay.mod: New file.
4920         * gm2-libs-pim/Display.def: New file.
4921         * gm2-libs-pim/Display.mod: New file.
4922         * gm2-libs-pim/ErrorCode.def: New file.
4923         * gm2-libs-pim/ErrorCode.mod: New file.
4924         * gm2-libs-pim/FileSystem.def: New file.
4925         * gm2-libs-pim/FileSystem.mod: New file.
4926         * gm2-libs-pim/FloatingUtilities.def: New file.
4927         * gm2-libs-pim/FloatingUtilities.mod: New file.
4928         * gm2-libs-pim/InOut.def: New file.
4929         * gm2-libs-pim/InOut.mod: New file.
4930         * gm2-libs-pim/Keyboard.def: New file.
4931         * gm2-libs-pim/Keyboard.mod: New file.
4932         * gm2-libs-pim/LongIO.def: New file.
4933         * gm2-libs-pim/LongIO.mod: New file.
4934         * gm2-libs-pim/NumberConversion.def: New file.
4935         * gm2-libs-pim/NumberConversion.mod: New file.
4936         * gm2-libs-pim/README.texi: New file.
4937         * gm2-libs-pim/Random.def: New file.
4938         * gm2-libs-pim/Random.mod: New file.
4939         * gm2-libs-pim/RealConversions.def: New file.
4940         * gm2-libs-pim/RealConversions.mod: New file.
4941         * gm2-libs-pim/RealInOut.def: New file.
4942         * gm2-libs-pim/RealInOut.mod: New file.
4943         * gm2-libs-pim/Strings.def: New file.
4944         * gm2-libs-pim/Strings.mod: New file.
4945         * gm2-libs-pim/Termbase.def: New file.
4946         * gm2-libs-pim/Termbase.mod: New file.
4947         * gm2-libs-pim/Terminal.def: New file.
4948         * gm2-libs-pim/Terminal.mod: New file.
4949         * gm2-libs-pim/TimeDate.def: New file.
4950         * gm2-libs-pim/TimeDate.mod: New file.
4951         * gm2-libs/ASCII.def: New file.
4952         * gm2-libs/ASCII.mod: New file.
4953         * gm2-libs/Args.def: New file.
4954         * gm2-libs/Args.mod: New file.
4955         * gm2-libs/Assertion.def: New file.
4956         * gm2-libs/Assertion.mod: New file.
4957         * gm2-libs/Break.def: New file.
4958         * gm2-libs/Break.mod: New file.
4959         * gm2-libs/Builtins.def: New file.
4960         * gm2-libs/Builtins.mod: New file.
4961         * gm2-libs/COROUTINES.def: New file.
4962         * gm2-libs/COROUTINES.mod: New file.
4963         * gm2-libs/CmdArgs.def: New file.
4964         * gm2-libs/CmdArgs.mod: New file.
4965         * gm2-libs/Debug.def: New file.
4966         * gm2-libs/Debug.mod: New file.
4967         * gm2-libs/DynamicStrings.def: New file.
4968         * gm2-libs/DynamicStrings.mod: New file.
4969         * gm2-libs/Environment.def: New file.
4970         * gm2-libs/Environment.mod: New file.
4971         * gm2-libs/FIO.def: New file.
4972         * gm2-libs/FIO.mod: New file.
4973         * gm2-libs/FormatStrings.def: New file.
4974         * gm2-libs/FormatStrings.mod: New file.
4975         * gm2-libs/FpuIO.def: New file.
4976         * gm2-libs/FpuIO.mod: New file.
4977         * gm2-libs/GetOpt.def: New file.
4978         * gm2-libs/GetOpt.mod: New file.
4979         * gm2-libs/IO.def: New file.
4980         * gm2-libs/IO.mod: New file.
4981         * gm2-libs/Indexing.def: New file.
4982         * gm2-libs/Indexing.mod: New file.
4983         * gm2-libs/LMathLib0.def: New file.
4984         * gm2-libs/LMathLib0.mod: New file.
4985         * gm2-libs/LegacyReal.def: New file.
4986         * gm2-libs/LegacyReal.mod: New file.
4987         * gm2-libs/M2Dependent.def: New file.
4988         * gm2-libs/M2Dependent.mod: New file.
4989         * gm2-libs/M2EXCEPTION.def: New file.
4990         * gm2-libs/M2EXCEPTION.mod: New file.
4991         * gm2-libs/M2LINK.def: New file.
4992         * gm2-libs/M2RTS.def: New file.
4993         * gm2-libs/M2RTS.mod: New file.
4994         * gm2-libs/MathLib0.def: New file.
4995         * gm2-libs/MathLib0.mod: New file.
4996         * gm2-libs/MemUtils.def: New file.
4997         * gm2-libs/MemUtils.mod: New file.
4998         * gm2-libs/NumberIO.def: New file.
4999         * gm2-libs/NumberIO.mod: New file.
5000         * gm2-libs/OptLib.def: New file.
5001         * gm2-libs/OptLib.mod: New file.
5002         * gm2-libs/PushBackInput.def: New file.
5003         * gm2-libs/PushBackInput.mod: New file.
5004         * gm2-libs/README.texi: New file.
5005         * gm2-libs/RTExceptions.def: New file.
5006         * gm2-libs/RTExceptions.mod: New file.
5007         * gm2-libs/RTint.def: New file.
5008         * gm2-libs/RTint.mod: New file.
5009         * gm2-libs/SArgs.def: New file.
5010         * gm2-libs/SArgs.mod: New file.
5011         * gm2-libs/SCmdArgs.def: New file.
5012         * gm2-libs/SCmdArgs.mod: New file.
5013         * gm2-libs/SEnvironment.def: New file.
5014         * gm2-libs/SEnvironment.mod: New file.
5015         * gm2-libs/SFIO.def: New file.
5016         * gm2-libs/SFIO.mod: New file.
5017         * gm2-libs/SMathLib0.def: New file.
5018         * gm2-libs/SMathLib0.mod: New file.
5019         * gm2-libs/SYSTEM.def: New file.
5020         * gm2-libs/SYSTEM.mod: New file.
5021         * gm2-libs/Scan.def: New file.
5022         * gm2-libs/Scan.mod: New file.
5023         * gm2-libs/Selective.def: New file.
5024         * gm2-libs/StdIO.def: New file.
5025         * gm2-libs/StdIO.mod: New file.
5026         * gm2-libs/Storage.def: New file.
5027         * gm2-libs/Storage.mod: New file.
5028         * gm2-libs/StrCase.def: New file.
5029         * gm2-libs/StrCase.mod: New file.
5030         * gm2-libs/StrIO.def: New file.
5031         * gm2-libs/StrIO.mod: New file.
5032         * gm2-libs/StrLib.def: New file.
5033         * gm2-libs/StrLib.mod: New file.
5034         * gm2-libs/StringConvert.def: New file.
5035         * gm2-libs/StringConvert.mod: New file.
5036         * gm2-libs/SysExceptions.def: New file.
5037         * gm2-libs/SysStorage.def: New file.
5038         * gm2-libs/SysStorage.mod: New file.
5039         * gm2-libs/TimeString.def: New file.
5040         * gm2-libs/TimeString.mod: New file.
5041         * gm2-libs/UnixArgs.def: New file.
5042         * gm2-libs/cbuiltin.def: New file.
5043         * gm2-libs/cgetopt.def: New file.
5044         * gm2-libs/config-host: New file.
5045         * gm2-libs/config-host.in: New file.
5046         * gm2-libs/cxxabi.def: New file.
5047         * gm2-libs/dtoa.def: New file.
5048         * gm2-libs/errno.def: New file.
5049         * gm2-libs/gdbif.def: New file.
5050         * gm2-libs/gdbif.mod: New file.
5051         * gm2-libs/gm2-libs-host.h.in: New file.
5052         * gm2-libs/ldtoa.def: New file.
5053         * gm2-libs/libc.def: New file.
5054         * gm2-libs/libm.def: New file.
5055         * gm2-libs/sckt.def: New file.
5056         * gm2-libs/termios.def: New file.
5057         * gm2-libs/wrapc.def: New file.
5058         * gm2config.h.in: New file.
5059         * gm2spec.cc: New file.
5060         * gm2version.h: New file.
5061         * init/README: New file.
5062         * init/mcinit: New file.
5063         * init/ppginit: New file.
5064         * lang-specs.h: New file.
5065         * lang.opt: New file.
5066         * m2-tree.def: New file.
5067         * m2-tree.h: New file.
5068         * m2.flex: New file.
5069         * m2pp.cc: New file.
5070         * m2pp.h: New file.
5071         * mc-boot-ch/GBuiltins.c: New file.
5072         * mc-boot-ch/GM2LINK.c: New file.
5073         * mc-boot-ch/GRTco.c: New file.
5074         * mc-boot-ch/GSYSTEM.c: New file.
5075         * mc-boot-ch/GSelective.c: New file.
5076         * mc-boot-ch/GSysExceptions.c: New file.
5077         * mc-boot-ch/GUnixArgs.cc: New file.
5078         * mc-boot-ch/Gabort.c: New file.
5079         * mc-boot-ch/Gcbuiltin.c: New file.
5080         * mc-boot-ch/Gdtoa.c: New file.
5081         * mc-boot-ch/Gerrno.c: New file.
5082         * mc-boot-ch/Gldtoa.c: New file.
5083         * mc-boot-ch/Glibc.c: New file.
5084         * mc-boot-ch/Glibm.c: New file.
5085         * mc-boot-ch/Gmcrts.c: New file.
5086         * mc-boot-ch/Gmcrts.h: New file.
5087         * mc-boot-ch/Gnetwork.h: New file.
5088         * mc-boot-ch/Gtermios.cc: New file.
5089         * mc-boot-ch/Gwrapc.c: New file.
5090         * mc-boot-ch/README: New file.
5091         * mc-boot-ch/m2rts.h: New file.
5092         * mc-boot-ch/network.c: New file.
5093         * mc-boot/GASCII.c: New file.
5094         * mc-boot/GASCII.h: New file.
5095         * mc-boot/GArgs.c: New file.
5096         * mc-boot/GArgs.h: New file.
5097         * mc-boot/GAssertion.c: New file.
5098         * mc-boot/GAssertion.h: New file.
5099         * mc-boot/GBreak.c: New file.
5100         * mc-boot/GBreak.h: New file.
5101         * mc-boot/GCOROUTINES.h: New file.
5102         * mc-boot/GCmdArgs.c: New file.
5103         * mc-boot/GCmdArgs.h: New file.
5104         * mc-boot/GDebug.c: New file.
5105         * mc-boot/GDebug.h: New file.
5106         * mc-boot/GDynamicStrings.c: New file.
5107         * mc-boot/GDynamicStrings.h: New file.
5108         * mc-boot/GEnvironment.c: New file.
5109         * mc-boot/GEnvironment.h: New file.
5110         * mc-boot/GFIO.c: New file.
5111         * mc-boot/GFIO.h: New file.
5112         * mc-boot/GFormatStrings.c: New file.
5113         * mc-boot/GFormatStrings.h: New file.
5114         * mc-boot/GFpuIO.c: New file.
5115         * mc-boot/GFpuIO.h: New file.
5116         * mc-boot/GIO.c: New file.
5117         * mc-boot/GIO.h: New file.
5118         * mc-boot/GIndexing.c: New file.
5119         * mc-boot/GIndexing.h: New file.
5120         * mc-boot/GM2Dependent.c: New file.
5121         * mc-boot/GM2Dependent.h: New file.
5122         * mc-boot/GM2EXCEPTION.c: New file.
5123         * mc-boot/GM2EXCEPTION.h: New file.
5124         * mc-boot/GM2LINK.h: New file.
5125         * mc-boot/GM2RTS.c: New file.
5126         * mc-boot/GM2RTS.h: New file.
5127         * mc-boot/GMemUtils.c: New file.
5128         * mc-boot/GMemUtils.h: New file.
5129         * mc-boot/GNumberIO.c: New file.
5130         * mc-boot/GNumberIO.h: New file.
5131         * mc-boot/GPushBackInput.c: New file.
5132         * mc-boot/GPushBackInput.h: New file.
5133         * mc-boot/GRTExceptions.c: New file.
5134         * mc-boot/GRTExceptions.h: New file.
5135         * mc-boot/GRTco.h: New file.
5136         * mc-boot/GRTint.c: New file.
5137         * mc-boot/GRTint.h: New file.
5138         * mc-boot/GSArgs.c: New file.
5139         * mc-boot/GSArgs.h: New file.
5140         * mc-boot/GSFIO.c: New file.
5141         * mc-boot/GSFIO.h: New file.
5142         * mc-boot/GSYSTEM.h: New file.
5143         * mc-boot/GSelective.h: New file.
5144         * mc-boot/GStdIO.c: New file.
5145         * mc-boot/GStdIO.h: New file.
5146         * mc-boot/GStorage.c: New file.
5147         * mc-boot/GStorage.h: New file.
5148         * mc-boot/GStrCase.c: New file.
5149         * mc-boot/GStrCase.h: New file.
5150         * mc-boot/GStrIO.c: New file.
5151         * mc-boot/GStrIO.h: New file.
5152         * mc-boot/GStrLib.c: New file.
5153         * mc-boot/GStrLib.h: New file.
5154         * mc-boot/GStringConvert.c: New file.
5155         * mc-boot/GStringConvert.h: New file.
5156         * mc-boot/GSysExceptions.h: New file.
5157         * mc-boot/GSysStorage.c: New file.
5158         * mc-boot/GSysStorage.h: New file.
5159         * mc-boot/GTimeString.c: New file.
5160         * mc-boot/GTimeString.h: New file.
5161         * mc-boot/GUnixArgs.h: New file.
5162         * mc-boot/Galists.c: New file.
5163         * mc-boot/Galists.h: New file.
5164         * mc-boot/Gdecl.c: New file.
5165         * mc-boot/Gdecl.h: New file.
5166         * mc-boot/Gdtoa.h: New file.
5167         * mc-boot/Gerrno.h: New file.
5168         * mc-boot/Gkeyc.c: New file.
5169         * mc-boot/Gkeyc.h: New file.
5170         * mc-boot/Gldtoa.h: New file.
5171         * mc-boot/Glibc.h: New file.
5172         * mc-boot/Glibm.h: New file.
5173         * mc-boot/Glists.c: New file.
5174         * mc-boot/Glists.h: New file.
5175         * mc-boot/GmcComment.c: New file.
5176         * mc-boot/GmcComment.h: New file.
5177         * mc-boot/GmcComp.c: New file.
5178         * mc-boot/GmcComp.h: New file.
5179         * mc-boot/GmcDebug.c: New file.
5180         * mc-boot/GmcDebug.h: New file.
5181         * mc-boot/GmcError.c: New file.
5182         * mc-boot/GmcError.h: New file.
5183         * mc-boot/GmcFileName.c: New file.
5184         * mc-boot/GmcFileName.h: New file.
5185         * mc-boot/GmcLexBuf.c: New file.
5186         * mc-boot/GmcLexBuf.h: New file.
5187         * mc-boot/GmcMetaError.c: New file.
5188         * mc-boot/GmcMetaError.h: New file.
5189         * mc-boot/GmcOptions.c: New file.
5190         * mc-boot/GmcOptions.h: New file.
5191         * mc-boot/GmcPreprocess.c: New file.
5192         * mc-boot/GmcPreprocess.h: New file.
5193         * mc-boot/GmcPretty.c: New file.
5194         * mc-boot/GmcPretty.h: New file.
5195         * mc-boot/GmcPrintf.c: New file.
5196         * mc-boot/GmcPrintf.h: New file.
5197         * mc-boot/GmcQuiet.c: New file.
5198         * mc-boot/GmcQuiet.h: New file.
5199         * mc-boot/GmcReserved.c: New file.
5200         * mc-boot/GmcReserved.h: New file.
5201         * mc-boot/GmcSearch.c: New file.
5202         * mc-boot/GmcSearch.h: New file.
5203         * mc-boot/GmcStack.c: New file.
5204         * mc-boot/GmcStack.h: New file.
5205         * mc-boot/GmcStream.c: New file.
5206         * mc-boot/GmcStream.h: New file.
5207         * mc-boot/Gmcflex.h: New file.
5208         * mc-boot/Gmcp1.c: New file.
5209         * mc-boot/Gmcp1.h: New file.
5210         * mc-boot/Gmcp2.c: New file.
5211         * mc-boot/Gmcp2.h: New file.
5212         * mc-boot/Gmcp3.c: New file.
5213         * mc-boot/Gmcp3.h: New file.
5214         * mc-boot/Gmcp4.c: New file.
5215         * mc-boot/Gmcp4.h: New file.
5216         * mc-boot/Gmcp5.c: New file.
5217         * mc-boot/Gmcp5.h: New file.
5218         * mc-boot/GnameKey.c: New file.
5219         * mc-boot/GnameKey.h: New file.
5220         * mc-boot/Gpth.h: New file.
5221         * mc-boot/GsymbolKey.c: New file.
5222         * mc-boot/GsymbolKey.h: New file.
5223         * mc-boot/Gtermios.h: New file.
5224         * mc-boot/Gtop.c: New file.
5225         * mc-boot/Gvarargs.c: New file.
5226         * mc-boot/Gvarargs.h: New file.
5227         * mc-boot/Gwlists.c: New file.
5228         * mc-boot/Gwlists.h: New file.
5229         * mc-boot/Gwrapc.h: New file.
5230         * mc-boot/README: New file.
5231         * mc/Indexing.def: New file.
5232         * mc/Indexing.mod: New file.
5233         * mc/README: New file.
5234         * mc/alists.def: New file.
5235         * mc/alists.mod: New file.
5236         * mc/decl.def: New file.
5237         * mc/decl.mod: New file.
5238         * mc/decl.mod-extra: New file.
5239         * mc/keyc.def: New file.
5240         * mc/keyc.mod: New file.
5241         * mc/lists.def: New file.
5242         * mc/lists.mod: New file.
5243         * mc/m2flex.def: New file.
5244         * mc/mc.flex: New file.
5245         * mc/mcComment.def: New file.
5246         * mc/mcComment.h: New file.
5247         * mc/mcComment.mod: New file.
5248         * mc/mcComp.def: New file.
5249         * mc/mcComp.mod: New file.
5250         * mc/mcDebug.def: New file.
5251         * mc/mcDebug.mod: New file.
5252         * mc/mcError.def: New file.
5253         * mc/mcError.mod: New file.
5254         * mc/mcFileName.def: New file.
5255         * mc/mcFileName.mod: New file.
5256         * mc/mcLexBuf.def: New file.
5257         * mc/mcLexBuf.h: New file.
5258         * mc/mcLexBuf.mod: New file.
5259         * mc/mcMetaError.def: New file.
5260         * mc/mcMetaError.mod: New file.
5261         * mc/mcOptions.def: New file.
5262         * mc/mcOptions.mod: New file.
5263         * mc/mcPreprocess.def: New file.
5264         * mc/mcPreprocess.mod: New file.
5265         * mc/mcPretty.def: New file.
5266         * mc/mcPretty.mod: New file.
5267         * mc/mcPrintf.def: New file.
5268         * mc/mcPrintf.mod: New file.
5269         * mc/mcQuiet.def: New file.
5270         * mc/mcQuiet.mod: New file.
5271         * mc/mcReserved.def: New file.
5272         * mc/mcReserved.h: New file.
5273         * mc/mcReserved.mod: New file.
5274         * mc/mcSearch.def: New file.
5275         * mc/mcSearch.mod: New file.
5276         * mc/mcStack.def: New file.
5277         * mc/mcStack.mod: New file.
5278         * mc/mcStream.def: New file.
5279         * mc/mcStream.mod: New file.
5280         * mc/mcflex.def: New file.
5281         * mc/mcp1.bnf: New file.
5282         * mc/mcp1.def: New file.
5283         * mc/mcp2.bnf: New file.
5284         * mc/mcp2.def: New file.
5285         * mc/mcp3.bnf: New file.
5286         * mc/mcp3.def: New file.
5287         * mc/mcp4.bnf: New file.
5288         * mc/mcp4.def: New file.
5289         * mc/mcp5.bnf: New file.
5290         * mc/mcp5.def: New file.
5291         * mc/nameKey.def: New file.
5292         * mc/nameKey.mod: New file.
5293         * mc/symbolKey.def: New file.
5294         * mc/symbolKey.mod: New file.
5295         * mc/top.mod: New file.
5296         * mc/varargs.def: New file.
5297         * mc/varargs.mod: New file.
5298         * mc/wlists.def: New file.
5299         * mc/wlists.mod: New file.
5300         * pge-boot/GASCII.c: New file.
5301         * pge-boot/GASCII.h: New file.
5302         * pge-boot/GArgs.c: New file.
5303         * pge-boot/GArgs.h: New file.
5304         * pge-boot/GAssertion.c: New file.
5305         * pge-boot/GAssertion.h: New file.
5306         * pge-boot/GBreak.h: New file.
5307         * pge-boot/GBuiltins.c: New file.
5308         * pge-boot/GCmdArgs.h: New file.
5309         * pge-boot/GDebug.c: New file.
5310         * pge-boot/GDebug.h: New file.
5311         * pge-boot/GDynamicStrings.c: New file.
5312         * pge-boot/GDynamicStrings.h: New file.
5313         * pge-boot/GEnvironment.h: New file.
5314         * pge-boot/GFIO.c: New file.
5315         * pge-boot/GFIO.h: New file.
5316         * pge-boot/GFormatStrings.h: New file.
5317         * pge-boot/GFpuIO.h: New file.
5318         * pge-boot/GIO.c: New file.
5319         * pge-boot/GIO.h: New file.
5320         * pge-boot/GIndexing.c: New file.
5321         * pge-boot/GIndexing.h: New file.
5322         * pge-boot/GLists.c: New file.
5323         * pge-boot/GLists.h: New file.
5324         * pge-boot/GM2Dependent.c: New file.
5325         * pge-boot/GM2Dependent.h: New file.
5326         * pge-boot/GM2EXCEPTION.c: New file.
5327         * pge-boot/GM2EXCEPTION.h: New file.
5328         * pge-boot/GM2LINK.c: New file.
5329         * pge-boot/GM2LINK.h: New file.
5330         * pge-boot/GM2RTS.c: New file.
5331         * pge-boot/GM2RTS.h: New file.
5332         * pge-boot/GNameKey.c: New file.
5333         * pge-boot/GNameKey.h: New file.
5334         * pge-boot/GNumberIO.c: New file.
5335         * pge-boot/GNumberIO.h: New file.
5336         * pge-boot/GOutput.c: New file.
5337         * pge-boot/GOutput.h: New file.
5338         * pge-boot/GPushBackInput.c: New file.
5339         * pge-boot/GPushBackInput.h: New file.
5340         * pge-boot/GRTExceptions.c: New file.
5341         * pge-boot/GRTExceptions.h: New file.
5342         * pge-boot/GRTco.c: New file.
5343         * pge-boot/GSArgs.h: New file.
5344         * pge-boot/GSEnvironment.h: New file.
5345         * pge-boot/GSFIO.c: New file.
5346         * pge-boot/GSFIO.h: New file.
5347         * pge-boot/GSYSTEM.c: New file.
5348         * pge-boot/GSYSTEM.h: New file.
5349         * pge-boot/GScan.h: New file.
5350         * pge-boot/GSelective.c: New file.
5351         * pge-boot/GStdIO.c: New file.
5352         * pge-boot/GStdIO.h: New file.
5353         * pge-boot/GStorage.c: New file.
5354         * pge-boot/GStorage.h: New file.
5355         * pge-boot/GStrCase.c: New file.
5356         * pge-boot/GStrCase.h: New file.
5357         * pge-boot/GStrIO.c: New file.
5358         * pge-boot/GStrIO.h: New file.
5359         * pge-boot/GStrLib.c: New file.
5360         * pge-boot/GStrLib.h: New file.
5361         * pge-boot/GStringConvert.h: New file.
5362         * pge-boot/GSymbolKey.c: New file.
5363         * pge-boot/GSymbolKey.h: New file.
5364         * pge-boot/GSysExceptions.c: New file.
5365         * pge-boot/GSysExceptions.h: New file.
5366         * pge-boot/GSysStorage.c: New file.
5367         * pge-boot/GSysStorage.h: New file.
5368         * pge-boot/GTimeString.h: New file.
5369         * pge-boot/GUnixArgs.cc: New file.
5370         * pge-boot/GUnixArgs.h: New file.
5371         * pge-boot/Gabort.c: New file.
5372         * pge-boot/Gbnflex.c: New file.
5373         * pge-boot/Gbnflex.h: New file.
5374         * pge-boot/Gcbuiltin.c: New file.
5375         * pge-boot/Gdtoa.c: New file.
5376         * pge-boot/Gdtoa.h: New file.
5377         * pge-boot/Gerrno.c: New file.
5378         * pge-boot/Gerrno.h: New file.
5379         * pge-boot/Gldtoa.c: New file.
5380         * pge-boot/Gldtoa.h: New file.
5381         * pge-boot/Glibc.c: New file.
5382         * pge-boot/Glibc.h: New file.
5383         * pge-boot/Glibm.c: New file.
5384         * pge-boot/Glibm.h: New file.
5385         * pge-boot/Gmcrts.c: New file.
5386         * pge-boot/Gmcrts.h: New file.
5387         * pge-boot/Gnetwork.h: New file.
5388         * pge-boot/Gpge.c: New file.
5389         * pge-boot/Gtermios.cc: New file.
5390         * pge-boot/Gtermios.h: New file.
5391         * pge-boot/Gwrapc.c: New file.
5392         * pge-boot/Gwrapc.h: New file.
5393         * pge-boot/README: New file.
5394         * pge-boot/m2rts.h: New file.
5395         * pge-boot/main.c: New file.
5396         * pge-boot/network.c: New file.
5397         * plugin/README: New file.
5398         * plugin/m2rte.cc: New file.
5399         * tools-src/README: New file.
5400         * tools-src/boilerplate.py: New file.
5401         * tools-src/buildpg: New file.
5402         * tools-src/calcpath: New file.
5403         * tools-src/def2doc.py: New file.
5404         * tools-src/makeSystem: New file.
5405         * tools-src/mklink.c: New file.
5406         * tools-src/tidydates.py: New file.
5407         * images/LICENSE.IMG: New file.
5408         * images/gnupng: New file.
5409         * images/gnu.eps: New file.
5410         * version.c: New file.
5411         * configure: Rebuilt.
5412         * target-independent/Builtins.texi: New file.
5413         * target-independent/SYSTEM-iso.texi: New file.
5414         * target-independent/SYSTEM-pim.texi: New file.
5415         * target-independent/gm2-libs.texi: New file.
5416         * target-independent/readme.txt: New file.