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