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