libgcc: On FreeBSD use GCC's crt objects for static linking
[official-gcc.git] / gcc / m2 / ChangeLog
blobd5e21dea05e69fcfc8f8a0262f02fdb4d81a7410
1 2025-02-04  Gaius Mulley  <gaiusmod2@gmail.com>
3         PR modula2/115112
4         * gm2-compiler/M2Quads.mod (BuildPseudoProcedureCall): Pass
5         tokno to each build procedure.
6         (BuildThrowProcedure): New parameter functok.
7         (BuildIncProcedure): New parameter proctok.
8         Pass proctok on the quad stack during every push.
9         (BuildDecProcedure): Ditto.
10         (BuildInclProcedure): New parameter proctok.
11         (BuildExclProcedure): New parameter proctok.
13 2025-02-01  Gaius Mulley  <gaiusmod2@gmail.com>
15         PR modula2/118703
16         * gm2-gcc/m2builtins.cc (define_builtin_gcc): New function.
17         (m2builtins_init): Call define_builtin_gcc.
18         * gm2-libs/Builtins.def (clz): New procedure function.
19         (clzll): Ditto.
20         (ctz): Ditto.
21         (ctzll): Ditto.
22         * gm2-libs/Builtins.mod (clz): New procedure function.
23         (clzll): Ditto.
24         (ctz): Ditto.
25         (ctzll): Ditto.
26         * gm2-libs/cbuiltin.def (clz): New procedure function.
27         (clzll): Ditto.
28         (ctz): Ditto.
29         (ctzll): Ditto.
31 2025-01-29  Gaius Mulley  <gaiusmod2@gmail.com>
33         PR modula2/118010
34         PR modula2/118183
35         PR modula2/116073
36         * gm2-compiler/M2Options.mod (OffTBits): Assign to 0.
37         * gm2-gcc/m2type.cc (build_m2_specific_size_type): Ensure that
38         layout_type is called before returning c.
39         (build_m2_offt_type_node): If GetFileOffsetBits returns 0 then
40         use the type size of ssize_t.
42 2025-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
44         * gm2-compiler/M2GenGCC.mod (FoldConstBecomes): Remove
45         commented out code.
46         Improve early return comment.
48 2025-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
50         * gm2-compiler/M2GenGCC.mod (FoldStatementNote): Add header
51         comment.
52         (CodeStatementNote): Ditto.
53         (FoldRange): Tidy comment.
54         (CodeError): Ditto.
55         (CodeProcedureScope): Ditto.
56         (CheckConvertCoerceParameter): Replace op1 with nth.
57         Replace op2 with callee.
58         Replace op3 with actual.
60 2025-01-25  Gaius Mulley  <gaiusmod2@gmail.com>
62         PR modula2/117737
63         PR modula2/118010
64         * Make-maintainer.in (PGE-MC-OPTIONS): New macro.
65         (m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.o): Use $(PGE-MC-OPTIONS).
66         (m2/gm2-pge-boot/$(SRC_PREFIX)SymbolKey.o): Ditto.
67         (m2/gm2-pge-boot/$(SRC_PREFIX)NameKey.o): Ditto.
68         (m2/gm2-pge-boot/$(SRC_PREFIX)Lists.o): Ditto.
69         (m2/gm2-pge-boot/$(SRC_PREFIX)Output.o): Ditto.
70         (m2/gm2-pge-boot/$(SRC_PREFIX)bnflex.o): Ditto.
71         (m2/gm2-pge-boot/$(SRC_PREFIX)RTentity.o): Ditto.
72         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Ditto.
73         (m2/gm2-pge-boot/$(SRC_PREFIX)pge.o): Ditto.
74         (m2/gm2-auto/pg.o): Ditto.
75         (m2/gm2-auto/pge.o): Ditto.
76         (mc-autogen): Add include directory $(GMPINC) to $(CXX).
77         * mc/keyc.mod (checkGccConfigSystem): Remove
78         INCLUDE_MEMORY define.
79         * mc-boot/GASCII.cc (INCLUDE_MEMORY): Removed during rebuild.
80         * mc-boot/GASCII.h (INCLUDE_MEMORY): Ditto.
81         * mc-boot/GArgs.cc (INCLUDE_MEMORY): Ditto.
82         * mc-boot/GArgs.h (INCLUDE_MEMORY): Ditto.
83         * mc-boot/GAssertion.cc (INCLUDE_MEMORY): Ditto.
84         * mc-boot/GAssertion.h (INCLUDE_MEMORY): Ditto.
85         * mc-boot/GBreak.cc (INCLUDE_MEMORY): Ditto.
86         * mc-boot/GBreak.h (INCLUDE_MEMORY): Ditto.
87         * mc-boot/GCOROUTINES.h (INCLUDE_MEMORY): Ditto.
88         * mc-boot/GCmdArgs.cc (INCLUDE_MEMORY): Ditto.
89         * mc-boot/GCmdArgs.h (INCLUDE_MEMORY): Ditto.
90         * mc-boot/GDebug.cc (INCLUDE_MEMORY): Ditto.
91         * mc-boot/GDebug.h (INCLUDE_MEMORY): Ditto.
92         * mc-boot/GDynamicStrings.cc (INCLUDE_MEMORY): Ditto.
93         * mc-boot/GDynamicStrings.h (INCLUDE_MEMORY): Ditto.
94         * mc-boot/GEnvironment.cc (INCLUDE_MEMORY): Ditto.
95         * mc-boot/GEnvironment.h (INCLUDE_MEMORY): Ditto.
96         * mc-boot/GFIO.cc (INCLUDE_MEMORY): Ditto.
97         * mc-boot/GFIO.h (INCLUDE_MEMORY): Ditto.
98         * mc-boot/GFormatStrings.cc (INCLUDE_MEMORY): Ditto.
99         * mc-boot/GFormatStrings.h (INCLUDE_MEMORY): Ditto.
100         * mc-boot/GFpuIO.cc (INCLUDE_MEMORY): Ditto.
101         * mc-boot/GFpuIO.h (INCLUDE_MEMORY): Ditto.
102         * mc-boot/GIO.cc (INCLUDE_MEMORY): Ditto.
103         * mc-boot/GIO.h (INCLUDE_MEMORY): Ditto.
104         * mc-boot/GIndexing.cc (INCLUDE_MEMORY): Ditto.
105         * mc-boot/GIndexing.h (INCLUDE_MEMORY): Ditto.
106         * mc-boot/GM2Dependent.cc (INCLUDE_MEMORY): Ditto.
107         * mc-boot/GM2Dependent.h (INCLUDE_MEMORY): Ditto.
108         * mc-boot/GM2EXCEPTION.cc (INCLUDE_MEMORY): Ditto.
109         * mc-boot/GM2EXCEPTION.h (INCLUDE_MEMORY): Ditto.
110         * mc-boot/GM2RTS.cc (INCLUDE_MEMORY): Ditto.
111         * mc-boot/GM2RTS.h (INCLUDE_MEMORY): Ditto.
112         * mc-boot/GMemUtils.cc (INCLUDE_MEMORY): Ditto.
113         * mc-boot/GMemUtils.h (INCLUDE_MEMORY): Ditto.
114         * mc-boot/GNumberIO.cc (INCLUDE_MEMORY): Ditto.
115         * mc-boot/GNumberIO.h (INCLUDE_MEMORY): Ditto.
116         * mc-boot/GPushBackInput.cc (INCLUDE_MEMORY): Ditto.
117         * mc-boot/GPushBackInput.h (INCLUDE_MEMORY): Ditto.
118         * mc-boot/GRTExceptions.cc (INCLUDE_MEMORY): Ditto.
119         * mc-boot/GRTExceptions.h (INCLUDE_MEMORY): Ditto.
120         * mc-boot/GRTco.h (INCLUDE_MEMORY): Ditto.
121         * mc-boot/GRTentity.h (INCLUDE_MEMORY): Ditto.
122         * mc-boot/GRTint.cc (INCLUDE_MEMORY): Ditto.
123         * mc-boot/GRTint.h (INCLUDE_MEMORY): Ditto.
124         * mc-boot/GSArgs.cc (INCLUDE_MEMORY): Ditto.
125         * mc-boot/GSArgs.h (INCLUDE_MEMORY): Ditto.
126         * mc-boot/GSFIO.cc (INCLUDE_MEMORY): Ditto.
127         * mc-boot/GSFIO.h (INCLUDE_MEMORY): Ditto.
128         * mc-boot/GSYSTEM.h (INCLUDE_MEMORY): Ditto.
129         * mc-boot/GSelective.h (INCLUDE_MEMORY): Ditto.
130         * mc-boot/GStdIO.cc (INCLUDE_MEMORY): Ditto.
131         * mc-boot/GStdIO.h (INCLUDE_MEMORY): Ditto.
132         * mc-boot/GStorage.cc (INCLUDE_MEMORY): Ditto.
133         * mc-boot/GStorage.h (INCLUDE_MEMORY): Ditto.
134         * mc-boot/GStrCase.cc (INCLUDE_MEMORY): Ditto.
135         * mc-boot/GStrCase.h (INCLUDE_MEMORY): Ditto.
136         * mc-boot/GStrIO.cc (INCLUDE_MEMORY): Ditto.
137         * mc-boot/GStrIO.h (INCLUDE_MEMORY): Ditto.
138         * mc-boot/GStrLib.cc (INCLUDE_MEMORY): Ditto.
139         * mc-boot/GStrLib.h (INCLUDE_MEMORY): Ditto.
140         * mc-boot/GStringConvert.cc (INCLUDE_MEMORY): Ditto.
141         * mc-boot/GStringConvert.h (INCLUDE_MEMORY): Ditto.
142         * mc-boot/GSysExceptions.h (INCLUDE_MEMORY): Ditto.
143         * mc-boot/GSysStorage.cc (INCLUDE_MEMORY): Ditto.
144         * mc-boot/GSysStorage.h (INCLUDE_MEMORY): Ditto.
145         * mc-boot/GTimeString.cc (INCLUDE_MEMORY): Ditto.
146         * mc-boot/GTimeString.h (INCLUDE_MEMORY): Ditto.
147         * mc-boot/GUnixArgs.h (INCLUDE_MEMORY): Ditto.
148         * mc-boot/Galists.cc (INCLUDE_MEMORY): Ditto.
149         * mc-boot/Galists.h (INCLUDE_MEMORY): Ditto.
150         * mc-boot/Gdecl.cc (INCLUDE_MEMORY): Ditto.
151         * mc-boot/Gdecl.h (INCLUDE_MEMORY): Ditto.
152         * mc-boot/Gdtoa.h (INCLUDE_MEMORY): Ditto.
153         * mc-boot/Gerrno.h (INCLUDE_MEMORY): Ditto.
154         * mc-boot/Gkeyc.cc (INCLUDE_MEMORY): Ditto.
155         * mc-boot/Gkeyc.h (INCLUDE_MEMORY): Ditto.
156         * mc-boot/Gldtoa.h (INCLUDE_MEMORY): Ditto.
157         * mc-boot/Glibc.h (INCLUDE_MEMORY): Ditto.
158         * mc-boot/Glibm.h (INCLUDE_MEMORY): Ditto.
159         * mc-boot/Glists.cc (INCLUDE_MEMORY): Ditto.
160         * mc-boot/Glists.h (INCLUDE_MEMORY): Ditto.
161         * mc-boot/GmcComment.cc (INCLUDE_MEMORY): Ditto.
162         * mc-boot/GmcComment.h (INCLUDE_MEMORY): Ditto.
163         * mc-boot/GmcComp.cc (INCLUDE_MEMORY): Ditto.
164         * mc-boot/GmcComp.h (INCLUDE_MEMORY): Ditto.
165         * mc-boot/GmcDebug.cc (INCLUDE_MEMORY): Ditto.
166         * mc-boot/GmcDebug.h (INCLUDE_MEMORY): Ditto.
167         * mc-boot/GmcError.cc (INCLUDE_MEMORY): Ditto.
168         * mc-boot/GmcError.h (INCLUDE_MEMORY): Ditto.
169         * mc-boot/GmcFileName.cc (INCLUDE_MEMORY): Ditto.
170         * mc-boot/GmcFileName.h (INCLUDE_MEMORY): Ditto.
171         * mc-boot/GmcLexBuf.cc (INCLUDE_MEMORY): Ditto.
172         * mc-boot/GmcLexBuf.h (INCLUDE_MEMORY): Ditto.
173         * mc-boot/GmcMetaError.cc (INCLUDE_MEMORY): Ditto.
174         * mc-boot/GmcMetaError.h (INCLUDE_MEMORY): Ditto.
175         * mc-boot/GmcOptions.cc (INCLUDE_MEMORY): Ditto.
176         * mc-boot/GmcOptions.h (INCLUDE_MEMORY): Ditto.
177         * mc-boot/GmcPreprocess.cc (INCLUDE_MEMORY): Ditto.
178         * mc-boot/GmcPreprocess.h (INCLUDE_MEMORY): Ditto.
179         * mc-boot/GmcPretty.cc (INCLUDE_MEMORY): Ditto.
180         * mc-boot/GmcPretty.h (INCLUDE_MEMORY): Ditto.
181         * mc-boot/GmcPrintf.cc (INCLUDE_MEMORY): Ditto.
182         * mc-boot/GmcPrintf.h (INCLUDE_MEMORY): Ditto.
183         * mc-boot/GmcQuiet.cc (INCLUDE_MEMORY): Ditto.
184         * mc-boot/GmcQuiet.h (INCLUDE_MEMORY): Ditto.
185         * mc-boot/GmcReserved.cc (INCLUDE_MEMORY): Ditto.
186         * mc-boot/GmcReserved.h (INCLUDE_MEMORY): Ditto.
187         * mc-boot/GmcSearch.cc (INCLUDE_MEMORY): Ditto.
188         * mc-boot/GmcSearch.h (INCLUDE_MEMORY): Ditto.
189         * mc-boot/GmcStack.cc (INCLUDE_MEMORY): Ditto.
190         * mc-boot/GmcStack.h (INCLUDE_MEMORY): Ditto.
191         * mc-boot/GmcStream.cc (INCLUDE_MEMORY): Ditto.
192         * mc-boot/GmcStream.h (INCLUDE_MEMORY): Ditto.
193         * mc-boot/Gmcflex.h (INCLUDE_MEMORY): Ditto.
194         * mc-boot/Gmcp1.cc (INCLUDE_MEMORY): Ditto.
195         * mc-boot/Gmcp1.h (INCLUDE_MEMORY): Ditto.
196         * mc-boot/Gmcp2.cc (INCLUDE_MEMORY): Ditto.
197         * mc-boot/Gmcp2.h (INCLUDE_MEMORY): Ditto.
198         * mc-boot/Gmcp3.cc (INCLUDE_MEMORY): Ditto.
199         * mc-boot/Gmcp3.h (INCLUDE_MEMORY): Ditto.
200         * mc-boot/Gmcp4.cc (INCLUDE_MEMORY): Ditto.
201         * mc-boot/Gmcp4.h (INCLUDE_MEMORY): Ditto.
202         * mc-boot/Gmcp5.cc (INCLUDE_MEMORY): Ditto.
203         * mc-boot/Gmcp5.h (INCLUDE_MEMORY): Ditto.
204         * mc-boot/GnameKey.cc (INCLUDE_MEMORY): Ditto.
205         * mc-boot/GnameKey.h (INCLUDE_MEMORY): Ditto.
206         * mc-boot/GsymbolKey.cc (INCLUDE_MEMORY): Ditto.
207         * mc-boot/GsymbolKey.h (INCLUDE_MEMORY): Ditto.
208         * mc-boot/Gtermios.h (INCLUDE_MEMORY): Ditto.
209         * mc-boot/Gtop.cc (INCLUDE_MEMORY): Ditto.
210         * mc-boot/Gvarargs.cc (INCLUDE_MEMORY): Ditto.
211         * mc-boot/Gvarargs.h (INCLUDE_MEMORY): Ditto.
212         * mc-boot/Gwlists.cc (INCLUDE_MEMORY): Ditto.
213         * mc-boot/Gwlists.h (INCLUDE_MEMORY): Ditto.
214         * mc-boot/Gwrapc.h (INCLUDE_MEMORY): Ditto.
215         * pge-boot/GIndexing.h (INCLUDE_MEMORY): Ditto.
216         * pge-boot/GSEnvironment.h (INCLUDE_MEMORY): Ditto.
217         * pge-boot/GScan.h (INCLUDE_MEMORY): Ditto.
219 2025-01-25  Gaius Mulley  <gaiusmod2@gmail.com>
221         PR modula2/118010
222         * gm2-libs-log/FileSystem.mod (doModeChange): Replace
223         LONGINT with COFF_T.
224         (SetPos): Use COFF_T for the return value and offset type
225         when calling lseek.
226         * gm2-libs/FIO.mod (SetPositionFromBeginning): Convert pos
227         to COFF_T.
228         (SetPositionFromEnd): Ditto.
229         * mc-boot/GFIO.cc: Rebuild.
230         * mc-boot/Glibc.h: Ditto.
231         * pge-boot/GFIO.cc: Ditto.
232         * pge-boot/Glibc.h: Ditto.
234 2025-01-25  Gaius Mulley  <gaiusmod2@gmail.com>
236         PR modula2/118010
237         * gm2-compiler/P2SymBuild.mod (Debug): Comment out unused
238         procedure.
239         * gm2-libs/libc.def (lseek): Declare second parameter offset
240         as COFF_T.
242 2025-01-25  Gaius Mulley  <gaiusmod2@gmail.com>
244         PR modula2/118589
245         * gm2-compiler/M2MetaError.mod (symDesc): Add opaque type
246         description.
247         * gm2-compiler/M2Quads.mod (BuildDesignatorPointerError): New
248         procedure.
249         (BuildDesignatorPointer): Reimplement.
250         * gm2-compiler/P3Build.bnf (SubDesignator): Tidy up error message.
251         Use MetaErrorT2 rather than WriteForma1 and use the token pos from
252         the quad stack.
254 2025-01-13  Gaius Mulley  <gaiusmod2@gmail.com>
256         PR modula2/116557
257         * COPYING.FDL: Remove physical address and replace with a URL.
259 2025-01-13  Gaius Mulley  <gaiusmod2@gmail.com>
261         PR modula2/118453
262         * gm2-compiler/M2Check.mod (buildError4): Call MetaError1
263         for the actual and formal parameter type.
264         * gm2-compiler/P2Build.bnf (SubrangeType): Construct a virtual
265         token containing the subrange type declaration.
266         (PrefixedSubrangeType): Ditto.
267         * gm2-compiler/P2SymBuild.def (BuildSubrange): Add tok parameter.
268         * gm2-compiler/P2SymBuild.mod (BuildSubrange): Use tok parameter,
269         rather than the token at the start of the subrange.
271 2025-01-07  Gaius Mulley  <gaiusmod2@gmail.com>
273         PR modula2/118010
274         PR modula2/118183
275         * gm2-compiler/M2GCCDeclare.mod (Import): COffT, GetCOffTType.
276         (DeclareDefaultSimpleTypes): Declare COFF_T.
277         * gm2-compiler/M2GenGCC.mod (GetParamSize): Correct first
278         parameter to BuildSize to use location rather than a token position.
279         * gm2-compiler/M2Options.def (SetFileOffsetBits): New procedure.
280         (GetFileOffsetBits): New procedure function.
281         * gm2-compiler/M2Options.mod (SetFileOffsetBits): New procedure.
282         (GetFileOffsetBits): New procedure function.
283         (OffTBits): New variable.
284         * gm2-compiler/M2System.def (COffT): New variable.
285         * gm2-compiler/M2System.mod (MakeExtraSystemTypes): Declare
286         COffT.
287         * gm2-compiler/P1SymBuild.mod (EndBuildProcedure): Call
288         PutProcedureDefined.
289         * gm2-compiler/P2SymBuild.mod (Debug): Reimplement.
290         * gm2-compiler/SymbolTable.mod (InitProcedureDeclaration):
291         Initialize ProcedureTok.
292         * gm2-gcc/gcctypes.def (location_t): Declare as CARDINAL64.
293         * gm2-gcc/m2linemap.cc (m2linemap_GetLocationBinary): Add
294         call to linemap_add indication a LC_LEAVE.
295         * gm2-gcc/m2options.h (M2Options_SetFileOffsetBits): New procedure.
296         (M2Options_GetFileOffsetBits): New procedure function.
297         * gm2-gcc/m2type.cc (m2_offt_type_node): New variable.
298         (m2type_GetCSizeTType): Reword comment.
299         (m2type_GetCSSizeTType): Reword comment.
300         (m2type_GetCOffTType): New function.
301         (build_m2_offt_type_node): New function.
302         (m2type_InitSystemTypes): Initialize m2_offt_type_node.
303         * gm2-gcc/m2type.def (GetCSizeTType): Reword comment.
304         (GetCOffTType): New procedure function.
305         * gm2-gcc/m2type.h (m2type_GetCOffTType): New prototype.
306         * gm2-lang.cc (gm2_langhook_handle_option): New clause
307         OPT_fm2_file_offset_bits_.
308         * gm2-libs-coroutines/SYSTEM.def: Add COFF_T to export list.
309         * gm2-libs-iso/SYSTEM.def: Ditto.
310         * gm2-libs-min/SYSTEM.def: Ditto.
311         * gm2-libs/SYSTEM.def: Add COFF_T and CARDINAL64 to export list.
312         * gm2-libs/libc.def (lseek): Change return type to COFF_T.
313         * lang.opt (-fm2-file-offset-bits=): New option.
314         * mc-boot-ch/Glibc.c (libc_lseek): Change result to use off_t.
315         * mc-boot/GASCII.cc: Rebuilt.
316         * mc-boot/GASCII.h: Ditto.
317         * mc-boot/GArgs.cc: Ditto.
318         * mc-boot/GArgs.h: Ditto.
319         * mc-boot/GAssertion.cc: Ditto.
320         * mc-boot/GAssertion.h: Ditto.
321         * mc-boot/GBreak.cc: Ditto.
322         * mc-boot/GBreak.h: Ditto.
323         * mc-boot/GCOROUTINES.h: Ditto.
324         * mc-boot/GCmdArgs.cc: Ditto.
325         * mc-boot/GCmdArgs.h: Ditto.
326         * mc-boot/GDebug.cc: Ditto.
327         * mc-boot/GDebug.h: Ditto.
328         * mc-boot/GDynamicStrings.cc: Ditto.
329         * mc-boot/GDynamicStrings.h: Ditto.
330         * mc-boot/GEnvironment.cc: Ditto.
331         * mc-boot/GEnvironment.h: Ditto.
332         * mc-boot/GFIO.cc: Ditto.
333         * mc-boot/GFIO.h: Ditto.
334         * mc-boot/GFormatStrings.cc: Ditto.
335         * mc-boot/GFormatStrings.h: Ditto.
336         * mc-boot/GFpuIO.cc: Ditto.
337         * mc-boot/GFpuIO.h: Ditto.
338         * mc-boot/GIO.cc: Ditto.
339         * mc-boot/GIO.h: Ditto.
340         * mc-boot/GIndexing.cc: Ditto.
341         * mc-boot/GIndexing.h: Ditto.
342         * mc-boot/GM2Dependent.cc: Ditto.
343         * mc-boot/GM2Dependent.h: Ditto.
344         * mc-boot/GM2EXCEPTION.cc: Ditto.
345         * mc-boot/GM2EXCEPTION.h: Ditto.
346         * mc-boot/GM2RTS.cc: Ditto.
347         (M2RTS_Halt): Call libc_exit.
348         (M2RTS_HaltC): Ditto.
349         * mc-boot/GM2RTS.h: Rebuilt.
350         * mc-boot/GMemUtils.cc: Ditto.
351         * mc-boot/GMemUtils.h: Ditto.
352         * mc-boot/GNumberIO.cc: Ditto.
353         * mc-boot/GNumberIO.h: Ditto.
354         * mc-boot/GPushBackInput.cc: Ditto.
355         * mc-boot/GPushBackInput.h: Ditto.
356         * mc-boot/GRTExceptions.cc: Ditto.
357         * mc-boot/GRTExceptions.h: Ditto.
358         * mc-boot/GRTco.h: Ditto.
359         * mc-boot/GRTentity.h: Ditto.
360         * mc-boot/GRTint.cc: Ditto.
361         * mc-boot/GRTint.h: Ditto.
362         * mc-boot/GSArgs.cc: Ditto.
363         * mc-boot/GSArgs.h: Ditto.
364         * mc-boot/GSFIO.cc: Ditto.
365         * mc-boot/GSFIO.h: Ditto.
366         * mc-boot/GSYSTEM.h: Ditto.
367         * mc-boot/GSelective.h: Ditto.
368         * mc-boot/GStdIO.cc: Ditto.
369         * mc-boot/GStdIO.h: Ditto.
370         * mc-boot/GStorage.cc: Ditto.
371         * mc-boot/GStorage.h: Ditto.
372         * mc-boot/GStrCase.cc: Ditto.
373         * mc-boot/GStrCase.h: Ditto.
374         * mc-boot/GStrIO.cc: Ditto.
375         * mc-boot/GStrIO.h: Ditto.
376         * mc-boot/GStrLib.cc: Ditto.
377         * mc-boot/GStrLib.h: Ditto.
378         * mc-boot/GStringConvert.cc: Ditto.
379         * mc-boot/GStringConvert.h: Ditto.
380         * mc-boot/GSysExceptions.h: Ditto.
381         * mc-boot/GSysStorage.cc: Ditto.
382         * mc-boot/GSysStorage.h: Ditto.
383         * mc-boot/GTimeString.cc: Ditto.
384         * mc-boot/GTimeString.h: Ditto.
385         * mc-boot/GUnixArgs.h: Ditto.
386         * mc-boot/Galists.cc: Ditto.
387         * mc-boot/Galists.h: Ditto.
388         * mc-boot/Gdecl.cc: Ditto.
389         * mc-boot/Gdecl.h: Rebuilt.
390         * mc-boot/Gdtoa.h: Ditto.
391         * mc-boot/Gerrno.h: Ditto.
392         * mc-boot/Gkeyc.cc: Ditto.
393         * mc-boot/Gkeyc.h: Rebuilt.
394         * mc-boot/Gldtoa.h: Ditto.
395         * mc-boot/Glibc.h: Ditto.
396         * mc-boot/Glibm.h: Ditto.
397         * mc-boot/Glists.cc: Ditto.
398         * mc-boot/Glists.h: Ditto.
399         * mc-boot/GmcComment.cc: Ditto.
400         * mc-boot/GmcComment.h: Ditto.
401         * mc-boot/GmcComp.cc: Ditto.
402         * mc-boot/GmcComp.h: Ditto.
403         * mc-boot/GmcDebug.cc: Ditto.
404         * mc-boot/GmcDebug.h: Ditto.
405         * mc-boot/GmcError.cc: Ditto.
406         * mc-boot/GmcError.h: Ditto.
407         * mc-boot/GmcFileName.cc: Ditto.
408         * mc-boot/GmcFileName.h: Ditto.
409         * mc-boot/GmcLexBuf.cc: Ditto.
410         * mc-boot/GmcLexBuf.h: Ditto.
411         * mc-boot/GmcMetaError.cc: Ditto.
412         * mc-boot/GmcMetaError.h: Ditto.
413         * mc-boot/GmcOptions.cc: Ditto.
414         * mc-boot/GmcOptions.h: Ditto.
415         * mc-boot/GmcPreprocess.cc: Ditto.
416         * mc-boot/GmcPreprocess.h: Ditto.
417         * mc-boot/GmcPretty.cc: Ditto.
418         * mc-boot/GmcPretty.h: Ditto.
419         * mc-boot/GmcPrintf.cc: Ditto.
420         * mc-boot/GmcPrintf.h: Ditto.
421         * mc-boot/GmcQuiet.cc: Ditto.
422         * mc-boot/GmcQuiet.h: Ditto.
423         * mc-boot/GmcReserved.cc: Ditto.
424         * mc-boot/GmcReserved.h: Ditto.
425         * mc-boot/GmcSearch.cc: Ditto.
426         * mc-boot/GmcSearch.h: Ditto.
427         * mc-boot/GmcStack.cc: Ditto.
428         * mc-boot/GmcStack.h: Ditto.
429         * mc-boot/GmcStream.cc: Ditto.
430         * mc-boot/GmcStream.h: Ditto.
431         * mc-boot/Gmcflex.h: Ditto.
432         * mc-boot/Gmcp1.cc: Ditto.
433         * mc-boot/Gmcp1.h: Ditto.
434         * mc-boot/Gmcp2.cc: Ditto.
435         * mc-boot/Gmcp2.h: Ditto.
436         * mc-boot/Gmcp3.cc: Ditto.
437         * mc-boot/Gmcp3.h: Ditto.
438         * mc-boot/Gmcp4.cc: Ditto.
439         * mc-boot/Gmcp4.h: Ditto.
440         * mc-boot/Gmcp5.cc: Ditto.
441         * mc-boot/Gmcp5.h: Ditto.
442         * mc-boot/GnameKey.cc: Ditto.
443         * mc-boot/GnameKey.h: Ditto.
444         * mc-boot/GsymbolKey.cc: Ditto.
445         * mc-boot/GsymbolKey.h: Ditto.
446         * mc-boot/Gtermios.h: Ditto.
447         * mc-boot/Gtop.cc: Ditto.
448         * mc-boot/Gvarargs.cc: Ditto.
449         * mc-boot/Gvarargs.h: Ditto.
450         * mc-boot/Gwlists.cc: Ditto.
451         * mc-boot/Gwlists.h: Ditto.
452         * mc-boot/Gwrapc.h: Ditto.
453         * mc/decl.mod (cofft): New enum.
454         (cardinal64): Ditto.
455         (cofftN): New variable.
456         (cardinal64N): Ditto.
457         (isProcedure): Remove.
458         (getSymName): Add clause for cofft and cardinal64.
459         (makeBase): Ditto.
460         (isOrdinal): Ditto.
461         (getType): Ditto.
462         (doGetExprType): Ditto.
463         (getScope): Ditto.
464         (doExprC): Ditto.
465         (isSystem): Ditto.
466         (doSystemC): Ditto.
467         (doDependants): Ditto.
468         (visitDependants): Ditto.
469         (genKind): Ditto.
470         (doSystemM2): Ditto.
471         (doDupExpr): Ditto.
472         (makeSystem): Initialize cofftN and cardinal64N.
473         * mc/keyc.mod (useUIntMin): Remove.
474         (useUIntMax): Ditto.
475         * pge-boot/GIndexing.h: Rebuilt.
476         * pge-boot/GSEnvironment.h: Ditto.
477         * pge-boot/GScan.h: Ditto.
478         * pge-boot/Glibc.h: Ditto.
480 2024-12-23  Wilken Gottwalt  <wilken.gottwalt@posteo.net>
482         * gm2-libs-log/InOut.mod: Fix bad identifier warning.
484 2024-12-10  Gaius Mulley  <gaiusmod2@gmail.com>
486         PR modula2/117120
487         * gm2-compiler/M2CaseList.mod (CaseBoundsResolved): Rewrite.
488         (ConvertNulStr2NulChar): New procedure function.
489         (NulStr2NulChar): Ditto.
490         (GetCaseExpression): Ditto.
491         (OverlappingCaseBound): Rewrite.
492         * gm2-compiler/M2GCCDeclare.mod (CheckResolveSubrange): Allow
493         '' to be used as the subrange low limit.
494         * gm2-compiler/M2GenGCC.mod (FoldConvert): Rewrite.
495         (PopKindTree): Ditto.
496         (BuildHighFromString): Reformat.
497         * gm2-compiler/SymbolTable.mod (PushConstString): Add test for
498         length 0 and PushChar (nul).
500 2024-12-09  Gaius Mulley  <gaiusmod2@gmail.com>
502         PR modula2/115328
503         * gm2-compiler/M2Options.def (GetEnableForward): New procedure
504         function.
505         (SetEnableForward): New procedure.
506         * gm2-compiler/M2Options.mod (GetEnableForward): New procedure
507         function.
508         (SetEnableForward): New procedure.
509         (EnableForward): New boolean.
510         * gm2-compiler/P1SymBuild.mod (EndBuildForward): Check
511         GetEnableForward and generate an error message if false.
513 2024-12-07  Gaius Mulley  <gaiusmod2@gmail.com>
515         PR modula2/117948
516         * gm2-compiler/P1Build.bnf (ForwardDeclaration): Pass token
517         position of the FORWARD keyword to EndBuildForward.
518         * gm2-compiler/P1SymBuild.def (EndBuildForward): New parameter
519         forwardPos.
520         * gm2-compiler/P1SymBuild.mod (EndBuildForward): Issue an error at
521         forwardPos if the Iso boolean is false.
523 2024-12-05  Gaius Mulley  <gaiusmod2@gmail.com>
525         PR modula2/117904
526         * gm2-compiler/M2GenGCC.mod (PerformLastForIterator): Add call to
527         BuildConvert when increment is > 0.
529 2024-11-25  Gaius Mulley  <gaiusmod2@gmail.com>
531         PR modula2/117777
532         * gm2-compiler/P0SyntaxCheck.bnf (AsmOperands): Allow term after
533         ConstExpression to be optional.
534         * gm2-compiler/P1Build.bnf (AsmOperands): Ditto.
535         * gm2-compiler/P2Build.bnf (AsmOperands): Ditto.
536         * gm2-compiler/PCBuild.bnf (AsmOperands): Ditto.
537         * gm2-compiler/PHBuild.bnf (AsmOperands): Ditto.
539 2024-11-23  Maciej W. Rozycki  <macro@orcam.me.uk>
541         * Make-lang.in (m2 modula-2 modula2): Remove $(GCC_PARTS).
543 2024-11-22  Andrew Pinski  <quic_apinski@quicinc.com>
545         PR bootstrap/117737
546         * gm2-gcc/gcc-consolidation.h (INCLUDE_MEMORY): Remove.
547         * gm2-gcc/m2configure.cc (INCLUDE_MEMORY): Remove.
548         * mc-boot/GASCII.cc (INCLUDE_MEMORY): Remove.
549         * mc-boot/GASCII.h (INCLUDE_MEMORY): Remove.
550         * mc-boot/GArgs.cc (INCLUDE_MEMORY): Remove.
551         * mc-boot/GArgs.h (INCLUDE_MEMORY): Remove.
552         * mc-boot/GAssertion.cc (INCLUDE_MEMORY): Remove.
553         * mc-boot/GAssertion.h (INCLUDE_MEMORY): Remove.
554         * mc-boot/GBreak.cc (INCLUDE_MEMORY): Remove.
555         * mc-boot/GBreak.h (INCLUDE_MEMORY): Remove.
556         * mc-boot/GCOROUTINES.h (INCLUDE_MEMORY): Remove.
557         * mc-boot/GCmdArgs.cc (INCLUDE_MEMORY): Remove.
558         * mc-boot/GCmdArgs.h (INCLUDE_MEMORY): Remove.
559         * mc-boot/GDebug.cc (INCLUDE_MEMORY): Remove.
560         * mc-boot/GDebug.h (INCLUDE_MEMORY): Remove. Remove.
561         * mc-boot/GDynamicStrings.cc (INCLUDE_MEMORY): Remove.
562         * mc-boot/GDynamicStrings.h (INCLUDE_MEMORY): Remove.
563         * mc-boot/GEnvironment.cc (INCLUDE_MEMORY): Remove.
564         * mc-boot/GEnvironment.h (INCLUDE_MEMORY): Remove.
565         * mc-boot/GFIO.cc (INCLUDE_MEMORY): Remove.
566         * mc-boot/GFIO.h (INCLUDE_MEMORY): Remove.
567         * mc-boot/GFormatStrings.cc (INCLUDE_MEMORY): Remove.
568         * mc-boot/GFormatStrings.h (INCLUDE_MEMORY): Remove.
569         * mc-boot/GFpuIO.cc (INCLUDE_MEMORY): Remove.
570         * mc-boot/GFpuIO.h (INCLUDE_MEMORY): Remove.
571         * mc-boot/GIO.cc (INCLUDE_MEMORY): Remove.
572         * mc-boot/GIO.h (INCLUDE_MEMORY): Remove.
573         * mc-boot/GIndexing.cc (INCLUDE_MEMORY): Remove.
574         * mc-boot/GIndexing.h (INCLUDE_MEMORY): Remove.
575         * mc-boot/GM2Dependent.cc (INCLUDE_MEMORY): Remove.
576         * mc-boot/GM2Dependent.h (INCLUDE_MEMORY): Remove.
577         * mc-boot/GM2EXCEPTION.cc (INCLUDE_MEMORY): Remove.
578         * mc-boot/GM2EXCEPTION.h (INCLUDE_MEMORY): Remove.
579         * mc-boot/GM2RTS.cc (INCLUDE_MEMORY): Remove.
580         * mc-boot/GM2RTS.h (INCLUDE_MEMORY): Remove. Remove.
581         * mc-boot/GMemUtils.cc (INCLUDE_MEMORY): Remove.
582         * mc-boot/GMemUtils.h (INCLUDE_MEMORY): Remove.
583         * mc-boot/GNumberIO.cc (INCLUDE_MEMORY): Remove.
584         * mc-boot/GNumberIO.h (INCLUDE_MEMORY): Remove.
585         * mc-boot/GPushBackInput.cc (INCLUDE_MEMORY): Remove.
586         * mc-boot/GPushBackInput.h (INCLUDE_MEMORY): Remove.
587         * mc-boot/GRTExceptions.cc (INCLUDE_MEMORY): Remove.
588         * mc-boot/GRTExceptions.h (INCLUDE_MEMORY): Remove.
589         * mc-boot/GRTco.h (INCLUDE_MEMORY): Remove.
590         * mc-boot/GRTentity.h (INCLUDE_MEMORY): Remove.
591         * mc-boot/GRTint.cc (INCLUDE_MEMORY): Remove.
592         * mc-boot/GRTint.h (INCLUDE_MEMORY): Remove.
593         * mc-boot/GSArgs.cc (INCLUDE_MEMORY): Remove.
594         * mc-boot/GSArgs.h (INCLUDE_MEMORY): Remove.
595         * mc-boot/GSFIO.cc (INCLUDE_MEMORY): Remove.
596         * mc-boot/GSFIO.h (INCLUDE_MEMORY): Remove.
597         * mc-boot/GSYSTEM.h (INCLUDE_MEMORY): Remove.
598         * mc-boot/GSelective.h (INCLUDE_MEMORY): Remove.
599         * mc-boot/GStdIO.cc (INCLUDE_MEMORY): Remove.
600         * mc-boot/GStdIO.h (INCLUDE_MEMORY): Remove.
601         * mc-boot/GStorage.cc (INCLUDE_MEMORY): Remove.
602         * mc-boot/GStorage.h (INCLUDE_MEMORY): Remove.
603         * mc-boot/GStrCase.cc (INCLUDE_MEMORY): Remove.
604         * mc-boot/GStrCase.h (INCLUDE_MEMORY): Remove.
605         * mc-boot/GStrIO.cc (INCLUDE_MEMORY): Remove.
606         * mc-boot/GStrIO.h (INCLUDE_MEMORY): Remove.
607         * mc-boot/GStrLib.cc (INCLUDE_MEMORY): Remove.
608         * mc-boot/GStrLib.h (INCLUDE_MEMORY): Remove.
609         * mc-boot/GStringConvert.cc (INCLUDE_MEMORY): Remove.
610         * mc-boot/GStringConvert.h (INCLUDE_MEMORY): Remove.
611         * mc-boot/GSysExceptions.h (INCLUDE_MEMORY): Remove.
612         * mc-boot/GSysStorage.cc (INCLUDE_MEMORY): Remove.
613         * mc-boot/GSysStorage.h (INCLUDE_MEMORY): Remove.
614         * mc-boot/GTimeString.cc (INCLUDE_MEMORY): Remove.
615         * mc-boot/GTimeString.h (INCLUDE_MEMORY): Remove.
616         * mc-boot/GUnixArgs.h (INCLUDE_MEMORY): Remove.
617         * mc-boot/Galists.cc (INCLUDE_MEMORY): Remove.
618         * mc-boot/Galists.h (INCLUDE_MEMORY): Remove.
619         * mc-boot/Gdecl.cc (INCLUDE_MEMORY): Remove.
620         * mc-boot/Gdecl.h (INCLUDE_MEMORY): Remove.
621         * mc-boot/Gdtoa.h (INCLUDE_MEMORY): Remove.
622         * mc-boot/Gerrno.h (INCLUDE_MEMORY): Remove.
623         * mc-boot/Gkeyc.cc (INCLUDE_MEMORY): Remove.
624         (checkGccConfigSystem): Remove printing out `#define INCLUDE_MEMORY`.
625         * mc-boot/Gkeyc.h (INCLUDE_MEMORY): Remove.
626         * mc-boot/Gldtoa.h (INCLUDE_MEMORY): Remove.
627         * mc-boot/Glibc.h (INCLUDE_MEMORY): Remove.
628         * mc-boot/Glibm.h (INCLUDE_MEMORY): Remove.
629         * mc-boot/Glists.cc (INCLUDE_MEMORY): Remove.
630         * mc-boot/Glists.h (INCLUDE_MEMORY): Remove.
631         * mc-boot/GmcComment.cc (INCLUDE_MEMORY): Remove.
632         * mc-boot/GmcComment.h (INCLUDE_MEMORY): Remove.
633         * mc-boot/GmcComp.cc (INCLUDE_MEMORY): Remove.
634         * mc-boot/GmcComp.h (INCLUDE_MEMORY): Remove.
635         * mc-boot/GmcDebug.cc (INCLUDE_MEMORY): Remove.
636         * mc-boot/GmcDebug.h (INCLUDE_MEMORY): Remove.
637         * mc-boot/GmcError.cc (INCLUDE_MEMORY): Remove.
638         * mc-boot/GmcError.h (INCLUDE_MEMORY): Remove.
639         * mc-boot/GmcFileName.cc (INCLUDE_MEMORY): Remove.
640         * mc-boot/GmcFileName.h (INCLUDE_MEMORY): Remove.
641         * mc-boot/GmcLexBuf.cc (INCLUDE_MEMORY): Remove.
642         * mc-boot/GmcLexBuf.h (INCLUDE_MEMORY): Remove.
643         * mc-boot/GmcMetaError.cc (INCLUDE_MEMORY): Remove.
644         * mc-boot/GmcMetaError.h (INCLUDE_MEMORY): Remove.
645         * mc-boot/GmcOptions.cc (INCLUDE_MEMORY): Remove.
646         * mc-boot/GmcOptions.h (INCLUDE_MEMORY): Remove.
647         * mc-boot/GmcPreprocess.cc (INCLUDE_MEMORY): Remove.
648         * mc-boot/GmcPreprocess.h (INCLUDE_MEMORY): Remove.
649         * mc-boot/GmcPretty.cc (INCLUDE_MEMORY): Remove.
650         * mc-boot/GmcPretty.h (INCLUDE_MEMORY): Remove.
651         * mc-boot/GmcPrintf.cc (INCLUDE_MEMORY): Remove.
652         * mc-boot/GmcPrintf.h (INCLUDE_MEMORY): Remove.
653         * mc-boot/GmcQuiet.cc (INCLUDE_MEMORY): Remove.
654         * mc-boot/GmcQuiet.h (INCLUDE_MEMORY): Remove.
655         * mc-boot/GmcReserved.cc (INCLUDE_MEMORY): Remove.
656         * mc-boot/GmcReserved.h (INCLUDE_MEMORY): Remove.
657         * mc-boot/GmcSearch.cc (INCLUDE_MEMORY): Remove.
658         * mc-boot/GmcSearch.h (INCLUDE_MEMORY): Remove.
659         * mc-boot/GmcStack.cc (INCLUDE_MEMORY): Remove.
660         * mc-boot/GmcStack.h (INCLUDE_MEMORY): Remove.
661         * mc-boot/GmcStream.cc (INCLUDE_MEMORY): Remove.
662         * mc-boot/GmcStream.h (INCLUDE_MEMORY): Remove.
663         * mc-boot/Gmcflex.h (INCLUDE_MEMORY): Remove.
664         * mc-boot/Gmcp1.cc (INCLUDE_MEMORY): Remove.
665         * mc-boot/Gmcp1.h (INCLUDE_MEMORY): Remove.
666         * mc-boot/Gmcp2.cc (INCLUDE_MEMORY): Remove.
667         * mc-boot/Gmcp2.h (INCLUDE_MEMORY): Remove.
668         * mc-boot/Gmcp3.cc (INCLUDE_MEMORY): Remove.
669         * mc-boot/Gmcp3.h (INCLUDE_MEMORY): Remove.
670         * mc-boot/Gmcp4.cc (INCLUDE_MEMORY): Remove.
671         * mc-boot/Gmcp4.h (INCLUDE_MEMORY): Remove.
672         * mc-boot/Gmcp5.cc (INCLUDE_MEMORY): Remove.
673         * mc-boot/Gmcp5.h (INCLUDE_MEMORY): Remove.
674         * mc-boot/GnameKey.cc (INCLUDE_MEMORY): Remove.
675         * mc-boot/GnameKey.h (INCLUDE_MEMORY): Remove.
676         * mc-boot/GsymbolKey.cc (INCLUDE_MEMORY): Remove.
677         * mc-boot/GsymbolKey.h (INCLUDE_MEMORY): Remove.
678         * mc-boot/Gtermios.h (INCLUDE_MEMORY): Remove.
679         * mc-boot/Gtop.cc (INCLUDE_MEMORY): Remove.
680         * mc-boot/Gvarargs.cc (INCLUDE_MEMORY): Remove.
681         * mc-boot/Gvarargs.h (INCLUDE_MEMORY): Remove.
682         * mc-boot/Gwlists.cc (INCLUDE_MEMORY): Remove.
683         * mc-boot/Gwlists.h (INCLUDE_MEMORY): Remove.
684         * mc-boot/Gwrapc.h (INCLUDE_MEMORY): Remove.
685         * pge-boot/GIndexing.h (INCLUDE_MEMORY): Remove.
686         * pge-boot/GSEnvironment.h (INCLUDE_MEMORY): Remove.
687         * pge-boot/GScan.h (INCLUDE_MEMORY): Remove.
689 2024-11-18  Gaius Mulley  <gaiusmod2@gmail.com>
691         PR modula2/117555
692         * gm2-libs-iso/M2EXCEPTION.mod (M2Exception): Add missing
693         return statement.
694         * gm2-libs-iso/RealConv.mod (ValueReal): Ditto.
695         * gm2-libs-iso/RndFile.mod (StartPos): Ditto.
696         (EndPos): Ditto.
697         (NewPos): Ditto.
698         * gm2-libs-iso/ShortConv.mod (ValueReal): Ditto.
699         * gm2-libs-iso/WholeConv.mod (ValueInt): Ditto.
700         (ValueCard): Ditto.
702 2024-11-18  Gaius Mulley  <gaiusmod2@gmail.com>
704         PR modula2/117660
705         * gm2-compiler/P2Build.bnf (ArrayType): Update tok with the
706         composite token produced during array type declaration.
707         * gm2-compiler/P2SymBuild.mod (EndBuildArray): Create the
708         combinedtok and store it into the symbol table.
709         Also ensure combinedtok is pushed to the quad stack.
710         (BuildFieldArray): Preserve typetok.
711         * gm2-compiler/SymbolTable.def (PutArray): Rename parameters.
712         * gm2-compiler/SymbolTable.mod (PutArray): Rename parameters.
714 2024-11-18  Gaius Mulley  <gaiusmod2@gmail.com>
716         PR modula2/117371
717         * gm2-compiler/M2GenGCC.mod (PerformLastForIterator):
718         Add check for zero step value and issue an error message.
720 2024-11-16  Gaius Mulley  <gaiusmod2@gmail.com>
722         PR modula2/117555
723         * gm2-libs-iso/EXCEPTIONS.mod (CurrentNumber): Add return
724         statement.
725         * gm2-libs-iso/IOChan.mod (ReadResult): Ditto.
726         (CurrentFlags): Ditto.
727         (DeviceError): Ditto.
728         * gm2-libs-iso/IOLink.mod (DeviceTablePtrValue): Ditto.
729         * gm2-libs-iso/LongConv.mod (ValueReal): Ditto.
730         * gm2-libs/M2RTS.mod (Halt): Add noreturn attribute.
731         Add exit (1).
732         (HaltC): Add exit (1).
733         * pge-boot/GM2RTS.cc (M2RTS_Halt): Add exit (1).
734         (M2RTS_HaltC): Ditto.
736 2024-11-15  Gaius Mulley  <gaiusmod2@gmail.com>
738         PR modula2/117371
739         * gm2-compiler/M2Base.mod (MixMetaTypes): Add parameter TRUE to
740         MetaErrorDecl.
741         (IsUserType): Test against ZType.
742         (MixTypesDecl): Test for ZType.
743         * gm2-compiler/M2GenGCC.mod (ErrorMessageDecl): Add parameter TRUE to
744         MetaErrorDecl.
745         (CodeLastForIterator): New procedure.
746         (FoldLastForIterator): Ditto.
747         (PerformLastForIterator): Ditto.
748         (CodeStatement): Add case clause for LastForIteratorOp.
749         (ErrorMessageDecl): Add iserror parameter.
750         Call MetaErrorDecl with iserror parameter.
751         (checkIncorrectMeta): Call MetaErrorDecl with TRUE parameter.
752         (CheckBinaryExpressionTypes): Ditto.
753         (CheckElementSetTypes): Ditto.
754         * gm2-compiler/M2LexBuf.def (MakeVirtualTok): Update comment
755         detailing the fall back when UnknownTokenNo is encountered.
756         (MakeVirtual2Tok): Ditto.
757         * gm2-compiler/M2LexBuf.mod (MakeVirtualTok): Check against
758         UnknownTokenNo.
759         (MakeVirtual2Tok): Ditto.
760         * gm2-compiler/M2MetaError.def (MetaErrorDecl): Add error parameter.
761         * gm2-compiler/M2MetaError.mod (MetaErrorDecl): Add error
762         parameter.
763         Issue warning if error is FALSE.
764         * gm2-compiler/M2Quads.def (QuadOperator): Add LastForIteratorOp.
765         * gm2-compiler/M2Quads.mod (AddQuadInformation): New case clause
766         LastForIteratorOp.
767         (CheckAddTuple2Read): New procedure.
768         (BuildForLoopToRangeCheck): Remove.
769         (ForLoopLastIteratorVariable): Ditto.
770         (ForLoopLastIteratorConstant): Ditto.
771         (ForLoopLastIterator): Reimplement.
772         (BuildForToByDo): Remove ByType from call to ForLoopLastIterator.
773         (WriteQuad): New case clause LastForIteratorOp.
774         (WriteOperator): Ditto.
775         * gm2-compiler/M2Students.def
776         (CheckForVariableThatLooksLikeKeyword): Replace with ...
777         (CheckVariableAgainstKeyword): ... this.
778         * gm2-compiler/M2Students.mod
779         (CheckForVariableThatLooksLikeKeyword): Replace with ...
780         (CheckVariableAgainstKeyword): ... this.
781         * gm2-compiler/M2SymInit.mod (CheckLastForIterator): New
782         procedure.
783         (CheckReadBeforeInitQuad): New case clause to call
784         CheckLastForIterator.
785         * gm2-compiler/P2SymBuild.mod: Replace
786         CheckForVariableThatLooksLikeKeyword with CheckVariableAgainstKeyword.
788 2024-11-15  Gaius Mulley  <gaiusmod2@gmail.com>
790         * Make-lang.in (m2/gm2-compiler-boot/P0SyntaxCheck.c):
791         New rule.
792         (m2/gm2-compiler-boot/P0SyntaxCheck.o): Ditto.
793         (m2/gm2-compiler-boot/P1Build.c): Ditto.
794         (m2/gm2-compiler-boot/P1Build.o): Ditto.
795         (m2/gm2-compiler-boot/P2Build.c): Ditto.
796         (m2/gm2-compiler-boot/P2Build.o): Ditto.
797         (m2/gm2-compiler-boot/P3Build.c): Ditto.
798         (m2/gm2-compiler-boot/P3Build.o): Ditto.
799         (m2/gm2-compiler-boot/PCBuild.c): Ditto.
800         (m2/gm2-compiler-boot/PCBuild.o): Ditto.
801         (m2/gm2-compiler-boot/PHBuild.c): Ditto.
802         (m2/gm2-compiler-boot/PHBuild.o): Ditto.
804 2024-11-11  Gaius Mulley  <gaiusmod2@gmail.com>
806         * gm2-compiler/M2Base.def (MixTypes): Rename parameters.
807         (MixTypesDecl): New procedure function.
808         * gm2-compiler/M2Base.mod (BuildOrdFunctions): Add
809         DefProcedure parameter to PutFunction.
810         (BuildTruncFunctions): Ditto.
811         (BuildFloatFunctions): Ditto.
812         (BuildIntFunctions): Ditto.
813         (InitBaseFunctions): Ditto.
814         (MixTypesDecl): New procedure function.
815         (MixTypes): Reimplement.
816         * gm2-compiler/M2Check.mod (checkProcType): Replace
817         NoOfParam with NoOfParamAny.
818         Replace IsVarParam with IsVarParamAny.
819         (checkProcedureProcType): Ditto.
820         * gm2-compiler/M2Error.def: Remove unnecessary export qualified list.
821         * gm2-compiler/M2GCCDeclare.mod: Replace NoOfParam with NoOfParamAny.
822         Replace IsVarParam with IsVarParamAny.
823         (DeclareProcedureToGccWholeProgram): Rename son to
824         Variable.
825         (DeclareProcedureToGccSeparateProgram): Ditto.
826         (PrintKind): New procedure.
827         (PrintProcedureParameters): Ditto.
828         (PrintProcedureReturnType): Ditto.
829         (PrintProcedure): Reimplement.
830         (PrintProcTypeParameters): New procedure.
831         (PrintProcType): Ditto.
832         (DeclareProcType): Rename Son to Parameter.
833         * gm2-compiler/M2GenGCC.mod: Replace NoOfParam with NoOfParamAny.
834         Replace IsVarParam with IsVarParamAny.
835         (ErrorMessageDecl): New procedure.
836         (checkIncorrectMeta): Replace call to MetaErrorT2 with
837         ErrorMessageDecl.
838         (ComparisonMixTypes): Add varleft and varright parameters.
839         Adjust all callers of ComparisonMixTypes.
840         * gm2-compiler/M2MetaError.def (MetaErrorDecl): New procedure.
841         * gm2-compiler/M2MetaError.mod (MetaErrorDecl): New procedure.
842         * gm2-compiler/M2Options.def (SetXCode): Add -fd flag description
843         to comment.
844         * gm2-compiler/M2Options.mod (SetXCode): Add -fd flag description
845         to comment.
846         * gm2-compiler/M2Quads.mod (CheckBreak): New procedure.
847         Replace NoOfParam with NoOfParamAny.
848         Replace IsVarParam with IsVarParamAny.
849         (FailParameter): Reimplement using GetVarDeclFullTok.
850         Generate message for formal parameter, actual parameter and
851         declaration of actual parameter.
852         (WarnParameter): Ditto.
853         (CheckBuildFunction): Reimplement error message using MetaErrorT1.
854         * gm2-compiler/M2Range.mod: Replace NoOfParam with NoOfParamAny.
855         Replace IsVarParam with IsVarParamAny.
856         * gm2-compiler/M2Scaffold.mod (DeclareScaffoldFunctions): Call
857         PutProcedureDefined after every procedure declaration.
858         (DeclareArgEnvParams): Add ProperProcedure parameter to PutParam.
859         * gm2-compiler/M2Size.mod (MakeSize): Add DefProcedure parameter
860         to PutFunction.
861         * gm2-compiler/M2Swig.mod: Replace NoOfParam with NoOfParamAny.
862         Replace IsVarParam with IsVarParamAny.
863         * gm2-compiler/M2SymInit.mod: Ditto.
864         * gm2-compiler/M2System.mod (InitSystem): Add DefProcedure
865         parameter to PutFunction.
866         * gm2-compiler/P1SymBuild.mod (StartBuildProcedure): Reimplement.
867         (EndBuildProcedure): Ditto.
868         (EndBuildForward): Ditto.
869         * gm2-compiler/P2Build.bnf (BuildProcedureDefinedByForward):
870         Remove.
871         (BuildProcedureDefinedByProper): Ditto.
872         (ForwardDeclaration): Remove BuildProcedureDefinedByForward.
873         (BuildNoReturnAttribute): Remove parameter.
874         * gm2-compiler/P2SymBuild.def (BuildNoReturnAttribute): Remove
875         parameter.
876         (BuildProcedureDefinedByForward): Remove.
877         (BuildProcedureDefinedByProper): Ditto.
878         * gm2-compiler/P2SymBuild.mod (Import): Remove
879         AreParametersDefinedInDefinition,
880         AreParametersDefinedInImplementation,
881         AreProcedureParametersDefined,
882         ParametersDefinedInDefinition,
883         ParametersDefinedInImplementation,
884         GetProcedureDeclaredDefinition,
885         GetProcedureDeclaredForward,
886         GetProcedureDeclaredProper,
887         GetParametersDefinedByForward,
888         GetParametersDefinedByProper and
889         PutProcedureNoReturn.
890         Add PutProcedureParametersDefined,
891         GetProcedureParametersDefined,
892         GetProcedureKindDesc,
893         GetProcedureDeclaredTok,
894         GetProcedureKind,
895         GetReturnTypeTok,
896         SetReturnOptional,
897         IsReturnOptional,
898         PutProcedureNoReturn and
899         PutProcedureDefined.
900         (Debug): New procedure.
901         (P2StartBuildDefModule): Space formatting.
902         (BuildVariable): Reimplement to record full declaration.
903         (StartBuildProcedure): Reimplement using token to determine
904         the kind of procedure.
905         (BuildProcedureHeading): Ditto.
906         (BuildFPSection): Ditto.
907         (BuildVarArgs): Ditto.
908         (BuildOptArg): Ditto.
909         (BuildProcedureDefinedByForward): Remove.
910         (BuildProcedureDefinedByProper): Ditto.
911         (BuildFormalParameterSection): Reimplement so that the
912         quad stack is unchanged.
913         (CheckFormalParameterSection): Ditto.
914         (RemoveFPParameters): New procedure.
915         (ParameterError): Reimplement.
916         (StartBuildFormalParameters): Add annotation.
917         (ParameterMismatch): Reimplement.
918         (EndBuildFormalParameters): Reimplement to check against
919         all procedure kinds.
920         (GetSourceDesc): Remove.
921         (GetCurSrcDesc): Ditto.
922         (GetDeclared): Ditto.
923         (ReturnTypeMismatch): Reimplement.
924         (BuildFunction): Ditto.
925         (BuildOptFunction): Ditto.
926         (CheckOptFunction): New procedure.
927         (BuildNoReturnAttribute): Remove parameter and obtain
928         procedure symbol from quad stack.
929         (CheckProcedureReturn): New procedure.
930         * gm2-compiler/P3SymBuild.mod (BuildOptArgInitializer):
931         Preserve ProcSym tok on the quad stack.
932         Add Assert.
933         * gm2-compiler/PCSymBuild.mod (fixupProcedureType): Replace
934         NoOfParam with NoOfParamAny.
935         * gm2-compiler/SymbolTable.def (GetNthParam): Add ProcedureKind
936         parameter.
937         (PutFunction): Ditto.
938         (PutOptFunction): Ditto.
939         (IsReturnOptional): Ditto.
940         (PutParam): Ditto.
941         (PutVarParam): Ditto.
942         (PutParamName): Ditto.
943         (PutProcedureNoReturn): Ditto.
944         (IsProcedureNoReturn): Ditto.
945         (IsVarParam): Ditto.
946         (IsUnboundedParam): Ditto.
947         (NoOfParam): Ditto.
948         (ForeachLocalSymDo): Ditto.
949         (GetProcedureKind): Ditto.
950         (GetProcedureDeclaredTok): Ditto.
951         (PutProcedureDeclaredTok): Ditto.
952         (GetReturnTypeTok): Ditto.
953         (PutReturnTypeTok): Ditto.
954         (PutParametersDefinedByForward): New procedure.
955         (PutProcedureParametersDefined): Ditto.
956         (PutProcedureDefined): Ditto.
957         (GetParametersDefinedByProper): Ditto.
958         (GetProcedureDeclaredForward): Ditto.
959         (GetProcedureDeclaredProper): Ditto.
960         (PutProcedureDeclaredProper): Ditto.
961         (GetProcedureDeclaredDefinition): Ditto.
962         (PutProcedureDeclaredDefinition): Ditto.
963         (GetProcedureDefined): Ditto.
964         (PutUseOptArg): Ditto.
965         (UsesOptArg): Ditto.
966         (PutOptArgInit): Ditto.
967         (SetReturnOptional): Ditto.
968         (UsesOptArgAny): Ditto.
969         (GetProcedureKindDesc): Ditto.
970         (IsReturnOptionalAny): New procedure function.
971         (GetNthParamAny): Ditto.
972         (NoOfParamAny): Ditto.
973         (IsProcedureAnyNoReturn): Ditto.
974         (AreParametersDefinedInImplementation): Remove.
975         (ParametersDefinedInImplementation): Ditto.
976         (AreParametersDefinedInDefinition): Ditto.
977         (AreProcedureParametersDefined): Ditto.
978         (ParametersDefinedInDefinition): Ditto.
979         (ProcedureParametersDefined): Ditto.
980         (PutParametersDefinedByProper): Ditto.
981         (PutProcedureDeclaredForward): Ditto.
982         (GetParametersDefinedByForward): Ditto.
983         (GetProcedureParametersDefined): Ditto.
984         (PushOffset): Ditto.
985         (PopSize): Ditto.
986         (PushParamSize): Ditto.
987         (PushSumOfLocalVarSize): Ditto.
988         (PushSumOfParamSize): Ditto.
989         (PopOffset): Ditto.
990         (PopSumOfParamSize): Ditto.
991         * gm2-compiler/SymbolTable.mod (MakeProcedure): Reimplement.
992         (PutProcedureNoReturn): Add ProcedureKind parameter.
993         (GetNthParam): Ditto.
994         (PutFunction): Ditto.
995         (PutOptFunction): Ditto.
996         (IsReturnOptional): Ditto.
997         (MakeVariableForParam): Ditto.
998         (PutParam): Ditto.
999         (PutVarParam): Ditto.
1000         (PutParamName): Ditto.
1001         (AddParameter): Ditto.
1002         (IsVarParam): Ditto.
1003         (IsVarParamAny): Ditto.
1004         (NoOfParam): Ditto.
1005         (HasVarParameters): Ditto.
1006         (IsUnboundedParam): Ditto.
1007         (PutUseVarArgs): Ditto.
1008         (UsesVarArgs): Ditto.
1009         (PutUseOptArg): Ditto.
1010         (UsesOptArg): Ditto.
1011         (UsesOptArgAny): Ditto.
1012         (PutOptArgInit): Ditto.
1013         (IsProcedure): Ditto.
1014         (IsPointer): Ditto.
1015         (IsRecord): Ditto.
1016         (IsArray): Ditto.
1017         (IsEnumeration): Ditto.
1018         (IsUnbounded): Ditto.
1019         (IsSet): Ditto.
1020         (IsSetPacked): Ditto.
1021         (CheckUnbounded): Ditto.
1022         (IsOAFamily): Ditto.
1023         (IsModuleWithinProcedure): Ditto.
1024         (GetDeclaredDef): Ditto.
1025         (GetDeclaredMod): Ditto.
1026         (GetDeclaredFor): Ditto.
1027         (GetProcedureDeclaredForward): Ditto.
1028         (GetProcedureKind): Ditto.
1029         (PutProcedureDeclaredForward): Ditto.
1030         (GetProcedureDeclaredTok): Ditto.
1031         (GetProcedureDeclaredProper): Ditto.
1032         (PutProcedureDeclaredTok): Ditto.
1033         (PutProcedureDeclaredProper): Ditto.
1034         (GetReturnTypeTok): Ditto.
1035         (GetProcedureDeclaredDefinition): Ditto.
1036         (PutReturnTypeTok): Ditto.
1037         (PutProcedureDeclaredDefinition): Ditto.
1038         (GetProcedureKindDesc): Ditto.
1039         (IsProcedureVariable): Ditto.
1040         (IsAModula2Type): Ditto.
1041         (GetParam): Ditto.
1042         (ProcedureParametersDefined): Ditto.
1043         (AreParametersDefinedInImplementation): Remove.
1044         (AreParametersDefinedInDefinition): Ditto.
1045         (AreProcedureParametersDefined): Ditto.
1046         (IsSizeSolved): Ditto.
1047         (IsOffsetSolved): Ditto.
1048         (IsValueSolved): Ditto.
1049         (IsSumOfParamSizeSolved): Ditto.
1050         (PushSize): Ditto.
1051         (PushOffset): Ditto.
1052         (PopSize): Ditto.
1053         (PushValue): Ditto.
1054         (PushParamSize): Ditto.
1055         (PushSumOfLocalVarSize): Ditto.
1056         (PushSumOfParamSize): Ditto.
1057         (PushVarSize): Ditto.
1058         (PopValue): Ditto.
1059         (PopSize): Ditto.
1060         (PopOffset): Ditto.
1061         (PopSumOfParamSize): Ditto.
1062         (PutParametersDefinedByForward): New procedure.
1063         (PutProcedureParametersDefined): Ditto.
1064         (PutProcedureDefined): Ditto.
1065         (GetParametersDefinedByProper): Ditto.
1066         (GetProcedureDeclaredForward): Ditto.
1067         (GetProcedureDeclaredProper): Ditto.
1068         (PutProcedureDeclaredProper): Ditto.
1069         (GetProcedureDeclaredDefinition): Ditto.
1070         (PutProcedureDeclaredDefinition): Ditto.
1071         (GetProcedureDefined): Ditto.
1072         (PutUseOptArg): Ditto.
1073         (UsesOptArg): Ditto.
1074         (PutOptArgInit): Ditto.
1075         (SetReturnOptional): Ditto.
1076         (UsesOptArgAny): Ditto.
1077         (GetProcedureKindDesc): Ditto.
1078         (PutParametersDefinedByProper): Ditto.
1079         (GetParametersDefinedByProper): Ditto.
1080         (IsReturnOptionalAny): New procedure function.
1081         (IsProcedureAnyDefaultBoolean): Ditto.
1082         (IsProcedureAnyBoolean): Ditto.
1083         (IsProcedureAnyNoReturn): Ditto.
1084         (GetNthParamAny): Ditto.
1085         (NoOfParamAny): Ditto.
1086         (IsProcedureAnyNoReturn): Ditto.
1087         (GetProcedureKind): Ditto.
1088         (IsVarParamAny): Ditto.
1089         (IsUnboundedParamAny): Ditto.
1090         (ForeachParamSymDo): New comment.
1091         * gm2-libs-coroutines/SYSTEM.mod: Reformat.
1093 2024-11-09  Jakub Jelinek  <jakub@redhat.com>
1095         * Make-lang.in (m2_OBJS): Add $(BUILD-LIBS-BOOT),
1096         $(BUILD-COMPILER-BOOT) and $(MC_LIBS).
1098 2024-10-25  Jakub Jelinek  <jakub@redhat.com>
1100         * mc-boot/GFpuIO.cc: Remove trailing whitespace.
1101         * mc-boot/GFIO.cc: Likewise.
1102         * mc-boot/GFormatStrings.cc: Likewise.
1103         * mc-boot/GCmdArgs.cc: Likewise.
1104         * mc-boot/GDebug.h: Likewise.
1105         * mc-boot/GM2Dependent.cc: Likewise.
1106         * mc-boot/GRTint.cc: Likewise.
1107         * mc-boot/GDebug.cc: Likewise.
1108         * mc-boot/GmcError.cc: Likewise.
1109         * mc-boot/Gmcp4.cc: Likewise.
1110         * mc-boot/GM2RTS.cc: Likewise.
1111         * mc-boot/GIO.cc: Likewise.
1112         * mc-boot/Gmcp5.cc: Likewise.
1113         * mc-boot/GDynamicStrings.cc: Likewise.
1114         * mc-boot/Gmcp1.cc: Likewise.
1115         * mc-boot/GFormatStrings.h: Likewise.
1116         * mc-boot/Gmcp2.cc: Likewise.
1117         * mc-boot/Gmcp3.cc: Likewise.
1118         * pge-boot/GFIO.cc: Likewise.
1119         * pge-boot/GDebug.h: Likewise.
1120         * pge-boot/GM2Dependent.cc: Likewise.
1121         * pge-boot/GDebug.cc: Likewise.
1122         * pge-boot/GM2RTS.cc: Likewise.
1123         * pge-boot/GSymbolKey.cc: Likewise.
1124         * pge-boot/GIO.cc: Likewise.
1125         * pge-boot/GIndexing.cc: Likewise.
1126         * pge-boot/GDynamicStrings.cc: Likewise.
1127         * pge-boot/GFormatStrings.h: Likewise.
1129 2024-10-24  David Malcolm  <dmalcolm@redhat.com>
1130             Gaius Mulley  <gaiusmod2@gmail.com>
1132         PR other/116613
1133         * gm2-gcc/gcc-consolidation.h: Add #define INCLUDE_MEMORY.
1134         * gm2-gcc/m2configure.cc: Likewise.
1135         * mc-boot/GASCII.cc: Regenerate.
1136         * mc-boot/GASCII.h: Ditto.
1137         * mc-boot/GArgs.cc: Ditto.
1138         * mc-boot/GArgs.h: Ditto.
1139         * mc-boot/GAssertion.cc: Ditto.
1140         * mc-boot/GAssertion.h: Ditto.
1141         * mc-boot/GBreak.cc: Ditto.
1142         * mc-boot/GBreak.h: Ditto.
1143         * mc-boot/GCOROUTINES.h: Ditto.
1144         * mc-boot/GCmdArgs.cc: Ditto.
1145         * mc-boot/GCmdArgs.h: Ditto.
1146         * mc-boot/GDebug.cc: Ditto.
1147         * mc-boot/GDebug.h: Ditto.
1148         * mc-boot/GDynamicStrings.cc: Ditto.
1149         * mc-boot/GDynamicStrings.h: Ditto.
1150         * mc-boot/GEnvironment.cc: Ditto.
1151         * mc-boot/GEnvironment.h: Ditto.
1152         * mc-boot/GFIO.cc: Ditto.
1153         * mc-boot/GFIO.h: Ditto.
1154         * mc-boot/GFormatStrings.cc: Ditto.
1155         * mc-boot/GFormatStrings.h: Ditto.
1156         * mc-boot/GFpuIO.cc: Ditto.
1157         * mc-boot/GFpuIO.h: Ditto.
1158         * mc-boot/GIO.cc: Ditto.
1159         * mc-boot/GIO.h: Ditto.
1160         * mc-boot/GIndexing.cc: Ditto.
1161         * mc-boot/GIndexing.h: Ditto.
1162         * mc-boot/GM2Dependent.cc: Ditto.
1163         * mc-boot/GM2Dependent.h: Ditto.
1164         * mc-boot/GM2EXCEPTION.cc: Ditto.
1165         * mc-boot/GM2EXCEPTION.h: Ditto.
1166         * mc-boot/GM2RTS.cc: Ditto.
1167         * mc-boot/GM2RTS.h: Ditto.
1168         * mc-boot/GMemUtils.cc: Ditto.
1169         * mc-boot/GMemUtils.h: Ditto.
1170         * mc-boot/GNumberIO.cc: Ditto.
1171         * mc-boot/GNumberIO.h: Ditto.
1172         * mc-boot/GPushBackInput.cc: Ditto.
1173         * mc-boot/GPushBackInput.h: Ditto.
1174         * mc-boot/GRTExceptions.cc: Ditto.
1175         * mc-boot/GRTExceptions.h: Ditto.
1176         * mc-boot/GRTco.h: Ditto.
1177         * mc-boot/GRTentity.h: Ditto.
1178         * mc-boot/GRTint.cc: Ditto.
1179         * mc-boot/GRTint.h: Ditto.
1180         * mc-boot/GSArgs.cc: Ditto.
1181         * mc-boot/GSArgs.h: Ditto.
1182         * mc-boot/GSFIO.cc: Ditto.
1183         * mc-boot/GSFIO.h: Ditto.
1184         * mc-boot/GSYSTEM.h: Ditto.
1185         * mc-boot/GSelective.h: Ditto.
1186         * mc-boot/GStdIO.cc: Ditto.
1187         * mc-boot/GStdIO.h: Ditto.
1188         * mc-boot/GStorage.cc: Ditto.
1189         * mc-boot/GStorage.h: Ditto.
1190         * mc-boot/GStrCase.cc: Ditto.
1191         * mc-boot/GStrCase.h: Ditto.
1192         * mc-boot/GStrIO.cc: Ditto.
1193         * mc-boot/GStrIO.h: Ditto.
1194         * mc-boot/GStrLib.cc: Ditto.
1195         * mc-boot/GStrLib.h: Ditto.
1196         * mc-boot/GStringConvert.cc: Ditto.
1197         * mc-boot/GStringConvert.h: Ditto.
1198         * mc-boot/GSysExceptions.h: Ditto.
1199         * mc-boot/GSysStorage.cc: Ditto.
1200         * mc-boot/GSysStorage.h: Ditto.
1201         * mc-boot/GTimeString.cc: Ditto.
1202         * mc-boot/GTimeString.h: Ditto.
1203         * mc-boot/GUnixArgs.h: Ditto.
1204         * mc-boot/Galists.cc: Ditto.
1205         * mc-boot/Galists.h: Ditto.
1206         * mc-boot/Gdecl.cc: Ditto.
1207         * mc-boot/Gdecl.h: Ditto.
1208         * mc-boot/Gdtoa.h: Ditto.
1209         * mc-boot/Gerrno.h: Ditto.
1210         * mc-boot/Gkeyc.cc: Ditto.
1211         * mc-boot/Gkeyc.h: Ditto.
1212         * mc-boot/Gldtoa.h: Ditto.
1213         * mc-boot/Glibc.h: Ditto.
1214         * mc-boot/Glibm.h: Ditto.
1215         * mc-boot/Glists.cc: Ditto.
1216         * mc-boot/Glists.h: Ditto.
1217         * mc-boot/GmcComment.cc: Ditto.
1218         * mc-boot/GmcComment.h: Ditto.
1219         * mc-boot/GmcComp.cc: Ditto.
1220         * mc-boot/GmcComp.h: Ditto.
1221         * mc-boot/GmcDebug.cc: Ditto.
1222         * mc-boot/GmcDebug.h: Ditto.
1223         * mc-boot/GmcError.cc: Ditto.
1224         * mc-boot/GmcError.h: Ditto.
1225         * mc-boot/GmcFileName.cc: Ditto.
1226         * mc-boot/GmcFileName.h: Ditto.
1227         * mc-boot/GmcLexBuf.cc: Ditto.
1228         * mc-boot/GmcLexBuf.h: Ditto.
1229         * mc-boot/GmcMetaError.cc: Ditto.
1230         * mc-boot/GmcMetaError.h: Ditto.
1231         * mc-boot/GmcOptions.cc: Ditto.
1232         * mc-boot/GmcOptions.h: Ditto.
1233         * mc-boot/GmcPreprocess.cc: Ditto.
1234         * mc-boot/GmcPreprocess.h: Ditto.
1235         * mc-boot/GmcPretty.cc: Ditto.
1236         * mc-boot/GmcPretty.h: Ditto.
1237         * mc-boot/GmcPrintf.cc: Ditto.
1238         * mc-boot/GmcPrintf.h: Ditto.
1239         * mc-boot/GmcQuiet.cc: Ditto.
1240         * mc-boot/GmcQuiet.h: Ditto.
1241         * mc-boot/GmcReserved.cc: Ditto.
1242         * mc-boot/GmcReserved.h: Ditto.
1243         * mc-boot/GmcSearch.cc: Ditto.
1244         * mc-boot/GmcSearch.h: Ditto.
1245         * mc-boot/GmcStack.cc: Ditto.
1246         * mc-boot/GmcStack.h: Ditto.
1247         * mc-boot/GmcStream.cc: Ditto.
1248         * mc-boot/GmcStream.h: Ditto.
1249         * mc-boot/Gmcflex.h: Ditto.
1250         * mc-boot/Gmcp1.cc: Ditto.
1251         * mc-boot/Gmcp1.h: Ditto.
1252         * mc-boot/Gmcp2.cc: Ditto.
1253         * mc-boot/Gmcp2.h: Ditto.
1254         * mc-boot/Gmcp3.cc: Ditto.
1255         * mc-boot/Gmcp3.h: Ditto.
1256         * mc-boot/Gmcp4.cc: Ditto.
1257         * mc-boot/Gmcp4.h: Ditto.
1258         * mc-boot/Gmcp5.cc: Ditto.
1259         * mc-boot/Gmcp5.h: Ditto.
1260         * mc-boot/GnameKey.cc: Ditto.
1261         * mc-boot/GnameKey.h: Ditto.
1262         * mc-boot/GsymbolKey.cc: Ditto.
1263         * mc-boot/GsymbolKey.h: Ditto.
1264         * mc-boot/Gtermios.h: Ditto.
1265         * mc-boot/Gtop.cc: Ditto.
1266         * mc-boot/Gvarargs.cc: Ditto.
1267         * mc-boot/Gvarargs.h: Ditto.
1268         * mc-boot/Gwlists.cc: Ditto.
1269         * mc-boot/Gwlists.h: Ditto.
1270         * mc-boot/Gwrapc.h: Ditto.
1271         * mc/keyc.mod (checkGccConfigSystem): Add
1272         #define INCLUDE_MEMORY.
1273         * pge-boot/GASCII.cc: Regenerate.
1274         * pge-boot/GASCII.h: Ditto.
1275         * pge-boot/GArgs.cc: Ditto.
1276         * pge-boot/GArgs.h: Ditto.
1277         * pge-boot/GAssertion.cc: Ditto.
1278         * pge-boot/GAssertion.h: Ditto.
1279         * pge-boot/GBreak.h: Ditto.
1280         * pge-boot/GCmdArgs.h: Ditto.
1281         * pge-boot/GDebug.cc: Ditto.
1282         * pge-boot/GDebug.h: Ditto.
1283         * pge-boot/GDynamicStrings.cc: Ditto.
1284         * pge-boot/GDynamicStrings.h: Ditto.
1285         * pge-boot/GEnvironment.h: Ditto.
1286         * pge-boot/GFIO.cc: Ditto.
1287         * pge-boot/GFIO.h: Ditto.
1288         * pge-boot/GFormatStrings.h: Ditto.
1289         * pge-boot/GFpuIO.h: Ditto.
1290         * pge-boot/GIO.cc: Ditto.
1291         * pge-boot/GIO.h: Ditto.
1292         * pge-boot/GIndexing.cc: Ditto.
1293         * pge-boot/GIndexing.h: Ditto.
1294         * pge-boot/GLists.cc: Ditto.
1295         * pge-boot/GLists.h: Ditto.
1296         * pge-boot/GM2Dependent.cc: Ditto.
1297         * pge-boot/GM2Dependent.h: Ditto.
1298         * pge-boot/GM2EXCEPTION.cc: Ditto.
1299         * pge-boot/GM2EXCEPTION.h: Ditto.
1300         * pge-boot/GM2RTS.cc: Ditto.
1301         * pge-boot/GM2RTS.h: Ditto.
1302         * pge-boot/GNameKey.cc: Ditto.
1303         * pge-boot/GNameKey.h: Ditto.
1304         * pge-boot/GNumberIO.cc: Ditto.
1305         * pge-boot/GNumberIO.h: Ditto.
1306         * pge-boot/GOutput.cc: Ditto.
1307         * pge-boot/GOutput.h: Ditto.
1308         * pge-boot/GPushBackInput.cc: Ditto.
1309         * pge-boot/GPushBackInput.h: Ditto.
1310         * pge-boot/GRTExceptions.cc: Ditto.
1311         * pge-boot/GRTExceptions.h: Ditto.
1312         * pge-boot/GSArgs.h: Ditto.
1313         * pge-boot/GSEnvironment.h: Ditto.
1314         * pge-boot/GSFIO.cc: Ditto.
1315         * pge-boot/GSFIO.h: Ditto.
1316         * pge-boot/GSYSTEM.h: Ditto.
1317         * pge-boot/GScan.h: Ditto.
1318         * pge-boot/GStdIO.cc: Ditto.
1319         * pge-boot/GStdIO.h: Ditto.
1320         * pge-boot/GStorage.cc: Ditto.
1321         * pge-boot/GStorage.h: Ditto.
1322         * pge-boot/GStrCase.cc: Ditto.
1323         * pge-boot/GStrCase.h: Ditto.
1324         * pge-boot/GStrIO.cc: Ditto.
1325         * pge-boot/GStrIO.h: Ditto.
1326         * pge-boot/GStrLib.cc: Ditto.
1327         * pge-boot/GStrLib.h: Ditto.
1328         * pge-boot/GStringConvert.h: Ditto.
1329         * pge-boot/GSymbolKey.cc: Ditto.
1330         * pge-boot/GSymbolKey.h: Ditto.
1331         * pge-boot/GSysExceptions.h: Ditto.
1332         * pge-boot/GSysStorage.cc: Ditto.
1333         * pge-boot/GSysStorage.h: Ditto.
1334         * pge-boot/GTimeString.h: Ditto.
1335         * pge-boot/GUnixArgs.h: Ditto.
1336         * pge-boot/Gbnflex.cc: Ditto.
1337         * pge-boot/Gbnflex.h: Ditto.
1338         * pge-boot/Gdtoa.h: Ditto.
1339         * pge-boot/Gerrno.h: Ditto.
1340         * pge-boot/Gldtoa.h: Ditto.
1341         * pge-boot/Glibc.h: Ditto.
1342         * pge-boot/Glibm.h: Ditto.
1343         * pge-boot/Gpge.cc: Ditto.
1344         * pge-boot/Gtermios.h: Ditto.
1345         * pge-boot/Gwrapc.h: Ditto.
1347 2024-10-20  Gaius Mulley  <gaiusmod2@gmail.com>
1349         * gm2-compiler/M2MetaError.mod (op): Corrected ordering.
1350         * gm2-compiler/P2SymBuild.def: Remove comment.
1351         * gm2-compiler/P2SymBuild.mod (GetComparison): Replace
1352         the word less with fewer.
1354 2024-10-19  Gaius Mulley  <gaiusmod2@gmail.com>
1356         * gm2-compiler/M2MetaError.mod (op): Alphabetically order
1357         each case label and comment.
1359 2024-10-19  Gaius Mulley  <gaiusmod2@gmail.com>
1361         PR modula2/115328
1362         * gm2-compiler/M2MetaError.def: Extend comment documentating
1363         new format specifiers.
1364         * gm2-compiler/M2MetaError.mod (GetTokProcedure): New declaration.
1365         (doErrorScopeModule): New procedure.
1366         (doErrorScopeForward): Ditto.
1367         (doErrorScopeMod): Reimplement.
1368         (doErrorScopeFor): New procedure.
1369         (declarationMod): Ditto.
1370         (doErrorScopeDefinition): Ditto.
1371         (doErrorScopeDef): Reimplement.
1372         (declaredDef): New procedure.
1373         (declaredFor): Ditto.
1374         (doErrorScopeProc): Ditto.
1375         (declaredVar): Ditto.
1376         (declaredType): Ditto.
1377         (declaredFull): Ditto.
1378         * gm2-compiler/M2Options.mod (SetAutoInit): Add missing
1379         return type.
1380         (GetDumpGimple): Remove duplicate implementation.
1381         * gm2-compiler/M2Quads.def (DupFrame): New procedure.
1382         * gm2-compiler/M2Quads.mod (DupFrame): New procedure.
1383         * gm2-compiler/M2Reserved.def (ForwardTok): New variable.
1384         * gm2-compiler/M2Reserved.mod (ForwardTok): Initialize variable.
1385         * gm2-compiler/M2Scaffold.mod (DeclareArgEnvParams): Add
1386         tokno parameter for call to PutParam.
1387         * gm2-compiler/P0SymBuild.def (EndForward): New procedure.
1388         * gm2-compiler/P0SymBuild.mod (EndForward): New procedure.
1389         * gm2-compiler/P0SyntaxCheck.bnf (BlockAssert): New procedure.
1390         (ProcedureDeclaration): Reimplement rule.
1391         (PostProcedureHeading): New rule.
1392         (ForwardDeclaration): Ditto.
1393         (ProperProcedure): Ditto.
1394         * gm2-compiler/P1Build.bnf (ProcedureDeclaration): Reimplement rule.
1395         (PostProcedureHeading): New rule.
1396         (ForwardDeclaration): Ditto.
1397         (ProperProcedure): Ditto.
1398         * gm2-compiler/P1SymBuild.def (Export): Removed unnecessary
1399         export.
1400         (EndBuildForward): New procedure.
1401         * gm2-compiler/P1SymBuild.mod (StartBuildProcedure): Reimplement.
1402         (EndBuildProcedure): Ditto.
1403         (EndBuildForward): Ditto.
1404         * gm2-compiler/P2Build.bnf (ProcedureDeclaration): Reimplement rule.
1405         (PostProcedureHeading): New rule.
1406         (ForwardDeclaration): Ditto.
1407         (ProperProcedure): Ditto.
1408         * gm2-compiler/P2SymBuild.def (BuildProcedureDefinedByForward):
1409         New procedure.
1410         (BuildProcedureDefinedByProper): Ditto.
1411         (CheckProcedure): Ditto.
1412         (EndBuildForward): Ditto.
1413         * gm2-compiler/P2SymBuild.mod (EndBuildProcedure): Reimplement.
1414         (EndBuildForward): New procedure.
1415         (BuildFPSection): Reimplement to allow forward declaration or
1416         checking of parameters.
1417         (BuildProcedureDefinedByProper): New procedure.
1418         (BuildProcedureDefinedByForward): Ditto
1419         (FailParameter): Remove.
1420         (ParameterError): New procedure.
1421         (ParameterMismatch): Ditto.
1422         (EndBuildFormalParameters): Add parameter number check.
1423         (GetComparison): New procedure function.
1424         (GetSourceDesc): Ditto.
1425         (GetCurSrcDesc): Ditto.
1426         (GetDeclared): New procedure.
1427         (ReturnTypeMismatch): Ditto.
1428         (BuildFunction): Reimplement.
1429         (CheckProcedure): New procedure.
1430         (CheckFormalParameterSection): Reimplement using ParameterError.
1431         * gm2-compiler/P3Build.bnf (ProcedureDeclaration): Reimplement rule.
1432         (PostProcedureHeading): New rule.
1433         (ForwardDeclaration): Ditto.
1434         (ProperProcedure): Ditto.
1435         * gm2-compiler/P3SymBuild.def (Export): Remove unnecessary export.
1436         (EndBuildForward): New procedure.
1437         * gm2-compiler/P3SymBuild.mod (EndBuildForward): New procedure.
1438         * gm2-compiler/PCBuild.bnf (ProcedureDeclaration): Reimplement rule.
1439         (PostProcedureHeading): New rule.
1440         (ForwardDeclaration): Ditto.
1441         (ProperProcedure): Ditto.
1442         * gm2-compiler/PCSymBuild.def (EndBuildForward): New procedure.
1443         * gm2-compiler/PCSymBuild.mod (EndBuildForward): Ditto.
1444         * gm2-compiler/PHBuild.bnf (ProcedureDeclaration): Reimplement rule.
1445         (PostProcedureHeading): New rule.
1446         (ForwardDeclaration): Ditto.
1447         (ProperProcedure): Ditto.
1448         * gm2-compiler/SymbolTable.def (PutVarTok): New procedure.
1449         (PutParam): Add typetok parameter.
1450         (PutVarParam): Ditto.
1451         (PutParamName): Ditto.
1452         (GetDeclaredFor): New procedure function.
1453         (AreParametersDefinedInDefinition): Ditto.
1454         (PutParametersDefinedByForward): New procedure.
1455         (GetParametersDefinedByForward): New procedure function.
1456         (PutParametersDefinedByProper): New procedure.
1457         (GetParametersDefinedByProper): New procedure function.
1458         (GetProcedureDeclaredForward): Ditto.
1459         (PutProcedureDeclaredForward): New procedure.
1460         (GetProcedureDeclaredProper): New procedure function.
1461         (PutProcedureDeclaredProper): New procedure.
1462         (GetProcedureDeclaredDefinition): New procedure function.
1463         (PutProcedureDeclaredDefinition): New procedure.
1464         (GetVarDeclTypeTok): Ditto.
1465         (PutVarDeclTypeTok): New procedure.
1466         (GetVarDeclTok): Ditto.
1467         (PutVarDeclTok): New procedure.
1468         (GetVarDeclFullTok): Ditto.
1469         * gm2-compiler/SymbolTable.mod (ProcedureDecl): New record type.
1470         (VarDecl): Ditto.
1471         (SymProcedure): Add new field Declared.
1472         (SymVar): Add new field Declared.
1473         (PutVarTok): New procedure.
1474         (PutParam): Add typetok parameter.
1475         (PutVarParam): Ditto.
1476         (PutParamName): Ditto.
1477         (GetDeclaredFor): New procedure function.
1478         (AreParametersDefinedInDefinition): Ditto.
1479         (PutParametersDefinedByForward): New procedure.
1480         (GetParametersDefinedByForward): New procedure function.
1481         (PutParametersDefinedByProper): New procedure.
1482         (GetParametersDefinedByProper): New procedure function.
1483         (GetProcedureDeclaredForward): Ditto.
1484         (PutProcedureDeclaredForward): New procedure.
1485         (GetProcedureDeclaredProper): New procedure function.
1486         (PutProcedureDeclaredProper): New procedure.
1487         (GetProcedureDeclaredDefinition): New procedure function.
1488         (PutProcedureDeclaredDefinition): New procedure.
1489         (GetVarDeclTypeTok): Ditto.
1490         (PutVarDeclTypeTok): New procedure.
1491         (GetVarDeclTok): Ditto.
1492         (PutVarDeclTok): New procedure.
1493         (GetVarDeclFullTok): Ditto.
1494         (MakeProcedure): Initialize Declared field.
1495         (MakeVar): Initialize Declared field.
1496         * gm2-libs-log/FileSystem.def (FileNameChar): Add
1497         missing return type.
1498         * m2.flex: Add FORWARD keyword.
1500 2024-10-04  Gaius Mulley  <gaiusmod2@gmail.com>
1502         PR modula2/116918
1503         * gm2-compiler/M2Swig.mod (DoCheckUnbounded): Escape
1504         the % character used in array_functions with %%.
1506 2024-10-01  Gaius Mulley  <gaiusmod2@gmail.com>
1508         * gm2-libs/Indexing.def (FindIndice): New procedure
1509         function.
1510         * gm2-libs/Indexing.mod (FindIndice): Implement new
1511         procedure function.
1513 2024-10-01  Gaius Mulley  <gaiusmod2@gmail.com>
1515         PR modula2/116918
1516         * gm2-compiler/M2Swig.mod (AnnotateProcedure): Capitalize
1517         the generated comment, split comment into multiple lines and
1518         terminate the comment with ".  */".
1519         (DoCheckUnbounded): Escape the % character with %%.
1520         (DoWriteFile): Ditto.
1522 2024-09-25  Mikael Morin  <mikael@gcc.gnu.org>
1524         PR other/116801
1525         * lang.opt.urls: Regenerate.
1527 2024-09-23  Gaius Mulley  <gaiusmod2@gmail.com>
1529         * Make-lang.in (m2/gm2-libs-boot/M2RTS.o): Remove
1530         --suppress-noreturn.
1531         * gm2-libs/M2RTS.mod (HaltC): Add noreturn attribute.
1532         * gm2-libs-min/M2RTS.mod (HALT): Add LOOP END.
1534 2024-09-21  Gaius Mulley  <gaiusmod2@gmail.com>
1536         * gm2-compiler/M2Comp.mod (GenerateDependencies): Remove
1537         unused parameter.
1538         (WriteDep): Remove parameter dep.
1539         (WritePhoneDep): Ditto.
1541 2024-09-20  Gaius Mulley  <gaiusmod2@gmail.com>
1543         * gm2-compiler/M2Check.mod (checkUnboundedArray): New
1544         procedure function.
1545         (checkUnboundedUnbounded): Ditto.
1546         (checkUnbounded): Rewrite to check the unbounded data
1547         type.
1548         (checkPair): Add comment.
1549         (doCheckPair): Add comment.
1550         Remove tinfo parameter from the call to checkTypeKindViolation.
1551         (checkTypeKindViolation): Remove ununsed parameter tinfo.
1552         * gm2-libs-ch/UnixArgs.cc (GM2RTS.h): Remove include.
1553         * gm2-libs-ch/m2rts.h (M2RTS_INIT): New define.
1554         (M2RTS_DEP): Ditto.
1555         (M2RTS_RegisterModule): New prototype.
1556         (GM2RTS.h): Add include to the MC_M2 block.
1558 2024-09-16  Gaius Mulley  <gaiusmod2@gmail.com>
1560         * Make-lang.in (GM2_BOOT_INCLUDES): New variable.
1561         (m2/gm2-compiler-boot/M2GCCDeclare.o): Rewrite to use
1562         GM2_BOOT_INCLUDES.
1563         (m2/gm2-compiler-boot/M2Error.o): Ditto.
1564         (m2/gm2-compiler-boot/%.o): Ditto.
1566 2024-09-16  Gaius Mulley  <gaiusmod2@gmail.com>
1568         PR modula2/116181
1569         * Make-lang.in (GM2-GCC-DEFS): Add gcctypes.def and
1570         CDataTypes.def.
1571         (MC-LIB-DEFS): Add CDataTypes.def.
1572         * Make-maintainer.in (m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.o):
1573         Change include path to pge-boot.
1574         (m2/gm2-pge-boot/$(SRC_PREFIX)SymbolKey.o): Ditto.
1575         (m2/gm2-pge-boot/$(SRC_PREFIX)NameKey.o): Ditto.
1576         (m2/gm2-pge-boot/$(SRC_PREFIX)Lists.o): Ditto.
1577         (m2/gm2-pge-boot/$(SRC_PREFIX)Output.o): Ditto.
1578         (m2/gm2-pge-boot/$(SRC_PREFIX)bnflex.o): Ditto.
1579         (m2/gm2-pge-boot/$(SRC_PREFIX)RTentity.h): Ditto.
1580         (m2/gm2-pge-boot/$(SRC_PREFIX)RTentity.o): Ditto.
1581         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Ditto.
1582         (GM2PATH): Add -I$(srcdir)/m2/gm2-gcc.
1583         (m2/mc-boot-gen/$(SRC_PREFIX)%.h): Add -I$(srcdir)/m2/gm2-gcc.
1584         (m2/mc-boot-gen/$(SRC_PREFIX)%.cc): Ditto.
1585         * gm2-compiler/M2ALU.def (PushIntegerTree): Replace Tree with tree.
1586         (PopIntegerTree): Ditto.
1587         (PushRealTree): Ditto.
1588         (PopRealTree): Ditto.
1589         (PushComplexTree): Ditto.
1590         (PopComplexTree): Ditto.
1591         (PushSetTree): Ditto.
1592         (PopSetTree): Ditto.
1593         (PopConstructorTree): Ditto.
1594         (ConstructSetConstant): Ditto.
1595         (BuildRange): Ditto.
1596         (CheckOrResetOverflow): Ditto.
1597         (PushTypeOfTree): Ditto.
1598         * gm2-compiler/M2ALU.mod (Tree): Replace with ...
1599         (tree): ... this.
1600         (gcctypes): Import location_t and tree.
1601         (m2linemap): Remove import of location_t.
1602         * gm2-compiler/M2Base.def (m2linemap): Replace with ...
1603         (gcctypes): ... this.
1604         * gm2-compiler/M2Base.mod (gcctypes): Import of location_t.
1605         (m2linemap): Remove import of location_t.
1606         * gm2-compiler/M2Bitset.mod (m2tree): Remove import of Tree.
1607         * gm2-compiler/M2CaseList.mod (gcctypes): Import tree.
1608         (m2tree): Remove import of Tree.
1609         (Tree): Replace with ...
1610         (tree): ... this.
1611         * gm2-compiler/M2Emit.def (gcctypes): Import location_t.
1612         * gm2-compiler/M2GCCDeclare.def (gcctypes): Import tree.
1613         (PromoteToString): Replace Tree with tree.
1614         (PromoteToCString): Ditto.
1615         (ConstantKnownAndUsed): Ditto.
1616         * gm2-compiler/M2GCCDeclare.mod (gcctypes): Import tree.
1617         (m2tree): Remove import of Tree.
1618         (Tree): Replace with ...
1619         (tree): ... this.
1620         * gm2-compiler/M2GenGCC.def (gcctypes): Import tree.
1621         (m2tree): Remove import of Tree.
1622         (Tree): Replace with ...
1623         (tree): ... this.
1624         (GetHighFromUnbounded): Replace Tree with tree.
1625         (StringToChar): Ditto.
1626         (LValueToGenericPtr): Ditto.
1627         (ZConstToTypedConst): Ditto.
1628         (PrepareCopyString): Ditto.
1629         * gm2-compiler/M2GenGCC.mod (gcctypes): Import tree.
1630         (m2tree): Remove import of Tree.
1631         (Tree): Replace with ...
1632         (tree): ... this.
1633         * gm2-compiler/M2LangDump.def (gcctypes): Import tree.
1634         (m2tree): Remove import of Tree.
1635         (Tree): Replace with ...
1636         (tree): ... this.
1637         * gm2-compiler/M2LangDump.mod (Tree): Replace with ...
1638         (tree): ... this.
1639         * gm2-compiler/M2LexBuf.def (m2linemap): Replace with ...
1640         (gcctypes): ... this.
1641         * gm2-compiler/M2LexBuf.mod (m2linemap): Replace with ...
1642         (gcctypes): ... this.
1643         * gm2-compiler/M2Options.def (m2linemap): Replace with ...
1644         (gcctypes): ... this.
1645         * gm2-compiler/M2Options.mod (m2linemap): Replace with ...
1646         (gcctypes): ... this.
1647         * gm2-compiler/M2Range.def (m2linemap): Replace with ...
1648         (gcctypes): ... this.
1649         (CDataTypes): Import ConstCharStar.
1650         (CodeErrorCheck): Replace Tree with tree.
1651         (OverlapsRange): Ditto.
1652         (IsEqual): Ditto.
1653         (IsGreaterOrEqual): Ditto.
1654         (IsGreater): Ditto.
1655         (BuildIfCallWholeHandlerLoc): Replace Tree with tree.
1656         Replace ADDRESS with ConstCharStar.
1657         (BuildIfCallRealHandlerLoc): Ditto.
1658         (GetMinMax): Ditto.
1659         * gm2-compiler/M2Range.mod (m2tree): Remove Tree.
1660         (CodeErrorCheck): Replace Tree with tree.
1661         (OverlapsRange): Ditto.
1662         (IsEqual): Ditto.
1663         (IsGreaterOrEqual): Ditto.
1664         (IsGreater): Ditto.
1665         (GetMinMax): Ditto.
1666         (BuildIfCallWholeHandlerLoc): Replace Tree with tree.
1667         Replace ADDRESS with ConstCharStar.
1668         (BuildIfCallRealHandlerLoc): Ditto.
1669         * gm2-compiler/M2System.def (m2linemap): Replace with ...
1670         (gcctypes): ... this.
1671         * gm2-compiler/M2System.mod (m2linemap): Replace with ...
1672         (gcctypes): ... this.
1673         (CreateMinMaxFor): Replace Tree with tree.
1674         (CreateType): Ditto.
1675         (AttemptToCreateType): Ditto.
1676         (CreateSetType): Ditto.
1677         (AttemptToCreateSetType): Ditto.
1678         * gm2-compiler/P2SymBuild.mod (m2linemap): Replace with ...
1679         (gcctypes): ... this.
1680         * gm2-compiler/SymbolConversion.def (m2tree): Replace with ...
1681         (gcctypes): ... this.
1682         (Mod2Gcc): Replace Tree with tree.
1683         (Gcc2Mod): Ditto.
1684         (AddModGcc): Ditto.
1685         * gm2-compiler/SymbolConversion.mod (m2tree): Replace with ...
1686         (gcctypes): ... this.
1687         (Mod2Gcc): Replace Tree with tree.
1688         (Gcc2Mod): Ditto.
1689         (AddModGcc): Ditto.
1690         (Mod2GccWithoutGCCPoison): Ditto.
1691         * gm2-compiler/SymbolTable.def (m2tree): Replace with ...
1692         (gcctypes): ... this.
1693         (PutModuleFinallyFunction): Replace Tree with tree.
1694         (GetModuleFinallyFunction): Ditto.
1695         * gm2-compiler/SymbolTable.mod (m2tree): Replace with ...
1696         (gcctypes): ... this.
1697         (PutModuleFinallyFunction): Replace Tree with tree.
1698         (GetModuleFinallyFunction): Ditto.
1699         * gm2-compiler/m2flex.def (m2linemap): Replace with ...
1700         (gcctypes): ... this.
1701         * gm2-gcc/init.def (PerCompilationInit): Replace ADDRESS with ConstCharStar.
1702         (CDataTypes): Import ConstCharStar.
1703         * gm2-gcc/m2block.def (SYSTEM): Remove import.
1704         (CDataTypes): Import ConstCharStar.
1705         (m2linemap): Remove import.
1706         (m2tree): Remove import.
1707         (gcctypes): Import tree.
1708         (global_constant): Replace Tree with tree.
1709         (RememberInitModuleFunction): Ditto.
1710         (DumpGlobalConstants): Ditto.
1711         (RememberConstant): Ditto.
1712         (RememberType): Ditto.
1713         (pushDecl): Ditto.
1714         (popFunctionScope): Ditto.
1715         (pushFunctionScope): Ditto.
1716         (finishFunctionCode): Ditto.
1717         (finishFunctionDecl): Ditto.
1718         (GetErrorNode): Ditto.
1719         (includeDecl): Ditto.
1720         (GetGlobals): Ditto.
1721         (GetGlobalContext): Ditto.
1722         (begin_statement_list): Ditto.
1723         (push_statement_list): Ditto.
1724         (pop_statement_list): Ditto.
1725         (getLabel): Replace Tree with tree.
1726         Replace ADDRESS with ConstCharStar.
1727         * gm2-gcc/m2builtins.def (CDataTypes): Import ConstCharStar.
1728         (GetBuiltinConst): Replace Tree with tree.
1729         (GetBuiltinConstType): Ditto.
1730         (GetBuiltinTypeInfoType): Ditto.
1731         (GetBuiltinTypeInfo): Ditto.
1732         (BuiltinExists): Ditto.
1733         (BuildBuiltinTree): Ditto.
1734         (BuiltinMemCopy): Ditto.
1735         (BuiltinMemSet): Ditto.
1736         (BuiltInAlloca): Ditto.
1737         (BuiltInIsfinite): Ditto.
1738         * gm2-gcc/m2convert.def (CDataTypes): Import ConstCharStar.
1739         (ToWord): Ditto.
1740         (ToCardinal): Ditto.
1741         (ToInteger): Ditto.
1742         (ToBitset): Ditto.
1743         (ConvertToPtr): Ditto.
1744         (BuildConvert): Ditto.
1745         (ConvertConstantAndCheck): Ditto.
1746         (ConvertString): Ditto.
1747         (GenericToType): Ditto.
1748         * gm2-gcc/m2decl.cc (m2decl_BuildParameterDeclaration): Add
1749         const attribute.
1750         * gm2-gcc/m2decl.def (CDataTypes): Import ConstCharStar.
1751         (BuildModuleCtor): Ditto.
1752         (DeclareModuleCtor): Ditto.
1753         (DeclareM2linkForcedModuleInitOrder): Ditto.
1754         (DeclareM2linkStaticInitialization): Ditto.
1755         (BuildPtrToTypeString): Ditto.
1756         (BuildIntegerConstant): Ditto.
1757         (BuildStringConstantType): Ditto.
1758         (DeclareKnownVariable): Ditto.
1759         (DeclareKnownConstant): Ditto.
1760         (BuildParameterDeclaration): Ditto.
1761         (BuildEndFunctionDeclaration): Ditto.
1762         (RememberVariables): Ditto.
1763         (BuildConstLiteralNumber): Ditto.
1764         (BuildStringConstant): Ditto.
1765         (BuildCStringConstant): Ditto.
1766         (GetDeclContext): Ditto.
1767         * gm2-gcc/m2decl.h (m2decl_BuildParameterDeclaration): Add
1768         const attribute.
1769         * gm2-gcc/m2except.def (CDataTypes): Import ConstCharStar.
1770         (BuildThrow): Ditto.
1771         (BuildTryBegin): Ditto.
1772         (BuildTryEnd): Ditto.
1773         (BuildCatchBegin): Ditto.
1774         (BuildCatchEnd): Ditto.
1775         * gm2-gcc/m2expr.def (CDataTypes): Import ConstCharStar.
1776         (CSTIntToString): Ditto.
1777         (CSTIntToChar): Ditto.
1778         (CheckConstStrZtypeRange): Ditto.
1779         (CompareTrees): Ditto.
1780         (GetPointerOne): Ditto.
1781         (GetPointerZero): Ditto.
1782         (GetWordOne): Ditto.
1783         (GetWordZero): Ditto.
1784         (GetIntegerOne): Ditto.
1785         (GetIntegerZero): Ditto.
1786         (GetCardinalOne): Ditto.
1787         (GetCardinalZero): Ditto.
1788         (GetSizeOfInBits): Ditto.
1789         (GetSizeOf): Ditto.
1790         (BuildLogicalRotate): Ditto.
1791         (BuildLRRn): Ditto.
1792         (BuildLRLn): Ditto.
1793         (BuildMask): Ditto.
1794         (BuildMult): Ditto.
1795         (BuildMultCheck): Ditto.
1796         (BuildLRR): Ditto.
1797         (BuildLRL): Ditto.
1798         (BuildLogicalShift): Ditto.
1799         (BuildLSR): Ditto.
1800         (BuildLSL): Ditto.
1801         (BuildDivM2): Ditto.
1802         (BuildDivM2Check): Ditto.
1803         (BuildModM2): Ditto.
1804         (BuildModM2Check): Ditto.
1805         (BuildModFloor): Ditto.
1806         (BuildDivCeil): Ditto.
1807         (BuildModCeil): Ditto.
1808         (BuildDivFloor): Ditto.
1809         (BuildModTrunc): Ditto.
1810         (BuildDivTrunc): Ditto.
1811         (BuildDivTruncCheck): Ditto.
1812         (BuildRDiv): Ditto.
1813         (BuildSubCheck): Ditto.
1814         (BuildAddCheck): Ditto.
1815         (BuildSub): Ditto.
1816         (BuildAdd): Ditto.
1817         (FoldAndStrip): Ditto.
1818         (StringLength): Ditto.
1819         (TreeOverflow): Ditto.
1820         (RemoveOverflow): Ditto.
1821         (BuildCoerce): Ditto.
1822         (BuildTrunc): Ditto.
1823         (BuildNegate): Ditto.
1824         (BuildNegateCheck): Ditto.
1825         (BuildSetNegate): Ditto.
1826         (BuildTBitSize): Ditto.
1827         (BuildSize): Ditto.
1828         (BuildAddr): Ditto.
1829         (BuildOffset1): Ditto.
1830         (BuildOffset): Ditto.
1831         (BuildLogicalOrAddress): Ditto.
1832         (BuildLogicalOr): Ditto.
1833         (BuildLogicalAnd): Ditto.
1834         (BuildSymmetricDifference): Ditto.
1835         (BuildLogicalDifference): Ditto.
1836         (BuildLessThan): Ditto.
1837         (BuildGreaterThan): Ditto.
1838         (BuildLessThanOrEqual): Ditto.
1839         (BuildGreaterThanOrEqual): Ditto.
1840         (BuildEqualTo): Ditto.
1841         (BuildNotEqualTo): Ditto.
1842         (BuildIsSuperset): Ditto.
1843         (BuildIsNotSuperset): Ditto.
1844         (BuildIsSubset): Ditto.
1845         (BuildIsNotSubset): Ditto.
1846         (BuildIfConstInVar): Ditto.
1847         (BuildIfNotConstInVar): Ditto.
1848         (BuildIfVarInVar): Ditto.
1849         (BuildIfNotVarInVar): Ditto.
1850         (BuildForeachWordInSetDoIfExpr): Ditto.
1851         (BuildIfInRangeGoto): Ditto.
1852         (BuildIfNotInRangeGoto): Ditto.
1853         (BuildArray): Ditto.
1854         (BuildComponentRef): Ditto.
1855         (BuildIndirect): Ditto.
1856         (IsTrue): Ditto.
1857         (IsFalse): Ditto.
1858         (GetCstInteger): Ditto.
1859         (AreConstantsEqual): Ditto.
1860         (AreRealOrComplexConstantsEqual): Ditto.
1861         (DetermineSign): Ditto.
1862         (BuildCap): Ditto.
1863         (BuildAbs): Ditto.
1864         (BuildRe): Ditto.
1865         (BuildIm): Ditto.
1866         (BuildCmplx): Ditto.
1867         (BuildBinaryForeachWordDo): Ditto.
1868         (BuildBinarySetDo): Ditto.
1869         (ConstantExpressionWarning): Ditto.
1870         (BuildAddAddress): Ditto.
1871         (calcNbits): Ditto.
1872         (OverflowZType): Ditto.
1873         (BuildCondIfExpression): Ditto.
1874         * gm2-gcc/m2linemap.def (CDataTypes): Import ConstCharStar.
1875         * gm2-gcc/m2misc.def (m2tree): Replace with ...
1876         (gcctypes): ... this.
1877         (DebugTree): Replace Tree with tree.
1878         * gm2-gcc/m2pp.def (m2tree): Replace with ...
1879         (gcctypes): ... this.
1880         (DumpGimpleFd): Replace Tree with tree.
1881         * gm2-gcc/m2statement.cc (m2statement_BuildBuiltinCallTree):
1882         Remove unused location parameter.
1883         * gm2-gcc/m2statement.def (m2linemap): Replace with ...
1884         (gcctypes): ... this.
1885         (CDataTypes): Import CharStar.
1886         (DoJump): Replace Tree with tree.
1887         Replace ADDRESS with CharStar.
1888         (BuildStartFunctionCode): Replace Tree with tree.
1889         (BuildEndFunctionCode): Ditto.
1890         (BuildReturnValueCode): Ditto.
1891         (BuildAssignmentTree): Ditto.
1892         (BuildAssignmentStatement): Ditto.
1893         (BuildGoto): Ditto.
1894         (DeclareLabel): Ditto.
1895         (BuildIfThenDoEnd): Ditto.
1896         (BuildIfThenElseEnd): Ditto.
1897         (BuildParam): Ditto.
1898         (BuildFunctionCallTree): Ditto.
1899         (BuildProcedureCallTree): Ditto.
1900         (BuildIndirectProcedureCallTree): Ditto.
1901         (BuildFunctValue): Ditto.
1902         (BuildCall2): Ditto.
1903         (BuildCall3): Ditto.
1904         (SetLastFunction): Ditto.
1905         (GetLastFunction): Ditto.
1906         (GetParamTree): Ditto.
1907         (BuildTryFinally): Ditto.
1908         (BuildCleanUp): Ditto.
1909         (BuildAsm): Ditto.
1910         (BuildUnaryForeachWordDo): Ditto.
1911         (BuildExcludeVarConst): Ditto.
1912         (BuildExcludeVarVar): Ditto.
1913         (BuildIncludeVarConst): Ditto.
1914         (BuildIncludeVarVar): Ditto.
1915         (BuildStart): Ditto.
1916         (BuildEnd): Ditto.
1917         (BuildCallInner): Ditto.
1918         (BuildBuiltinCallTree):  Remove unused location parameter.
1919         * gm2-gcc/m2statement.h (m2statement_BuildBuiltinCallTree): Remove
1920         unused location parameter.
1921         * gm2-gcc/m2tree.def (gcctypes): Import tree.
1922         (IsAConstant): Replace Tree with tree.
1923         (IsOrdinal): Ditto.
1924         (IsTreeOverflow): Ditto.
1925         (skip_const_decl): Ditto.
1926         (skip_type_decl): Ditto.
1927         (is_type): Ditto.
1928         (is_array): Ditto.
1929         (is_var): Ditto.
1930         (debug_tree): Ditto.
1931         (IstreeOverflow): Ditto.
1932         * gm2-gcc/m2treelib.def (m2linemap): Replace with ...
1933         (gcctypes): ... this.
1934         (get_set_address_if_var): Ditto.
1935         (get_set_field_rhs): Ditto.
1936         (get_set_field_lhs): Ditto.
1937         (get_set_address): Ditto.
1938         (get_set_value): Ditto.
1939         (get_field_no): Ditto.
1940         (get_rvalue): Ditto.
1941         (DoCall): Ditto.
1942         (build_modify_expr): Ditto.
1943         (do_jump_if_bit): Ditto.
1944         * gm2-gcc/m2type.def (m2linemap): Replace with ...
1945         (gcctypes): ... this.
1946         (m2tree): Remove.
1947         (CDataTypes): Import ConstCharStar and charStar.
1948         (ValueInTypeRange): Replace Tree with tree.
1949         (ValueOutOfTypeRange): Ditto.
1950         (ExceedsTypeRange): Ditto.
1951         (WithinTypeRange): Ditto.
1952         (BuildSubrangeType): Ditto.
1953         (BuildCharConstant): Ditto.
1954         (BuildCharConstantChar): Ditto.
1955         (BuildArrayConstructorElement): Ditto.
1956         (BuildEndArrayConstructor): Ditto.
1957         (BuildStartArrayConstructor): Ditto.
1958         (BuildRecordConstructorElement): Ditto.
1959         (BuildEndRecordConstructor): Ditto.
1960         (BuildStartRecordConstructor): Ditto.
1961         (BuildEndSetConstructor): Ditto.
1962         (BuildSetConstructorElement): Ditto.
1963         (BuildStartSetConstructor): Ditto.
1964         (BuildSetType): Ditto.
1965         (BuildConstPointerType): Ditto.
1966         (BuildPointerType): Ditto.
1967         (BuildEnumerator): Ditto.
1968         (BuildEndEnumeration): Ditto.
1969         (BuildStartEnumeration): Ditto.
1970         (BuildTypeDeclaration): Ditto.
1971         (GetMaxFrom): Ditto.
1972         (GetMinFrom): Ditto.
1973         (GetDefaultType): Ditto.
1974         (BuildEndType): Ditto.
1975         (BuildStartType): Ditto.
1976         (BuildVariableArrayAndDeclare): Ditto.
1977         (BuildProcTypeParameterDeclaration): Ditto.
1978         (BuildStartFunctionType): Ditto.
1979         (BuildEndFunctionType): Ditto.
1980         (GetTreeType): Ditto.
1981         (DeclareKnownType): Ditto.
1982         (GetM2ZType): Ditto.
1983         (GetM2RType): Ditto.
1984         (BuildSetTypeFromSubrange): Ditto.
1985         (BuildSmallestTypeRange): Ditto.
1986         (GetBooleanType): Ditto.
1987         (GetBooleanFalse): Ditto.
1988         (GetBooleanTrue): Ditto.
1989         (GetPackedBooleanType): Ditto.
1990         (GetCharType): Ditto.
1991         (GetByteType): Ditto.
1992         (GetVoidType): Ditto.
1993         (GetBitnumType): Ditto.
1994         (GetRealType): Ditto.
1995         (GetLongRealType): Ditto.
1996         (GetShortRealType): Ditto.
1997         (GetLongIntType): Ditto.
1998         (GetPointerType): Ditto.
1999         (GetCardinalType): Ditto.
2000         (GetIntegerType): Ditto.
2001         (GetWordType): Ditto.
2002         (GetM2CardinalType): Ditto.
2003         (GetBitsetType): Ditto.
2004         (GetM2CType): Ditto.
2005         (GetProcType): Ditto.
2006         (GetM2ComplexType): Ditto.
2007         (GetM2LongComplexType): Ditto.
2008         (GetM2ShortComplexType): Ditto.
2009         (GetM2Complex128): Ditto.
2010         (GetM2Complex96): Ditto.
2011         (GetM2Complex64): Ditto.
2012         (GetM2Complex32): Ditto.
2013         (GetM2Real128): Ditto.
2014         (GetM2Real96): Ditto.
2015         (GetM2Real64): Ditto.
2016         (GetM2Real32): Ditto.
2017         (GetM2Bitset32): Ditto.
2018         (GetM2Bitset16): Ditto.
2019         (GetM2Bitset8): Ditto.
2020         (GetM2Word64): Ditto.
2021         (GetM2Word32): Ditto.
2022         (GetM2Word16): Ditto.
2023         (GetM2Cardinal64): Ditto.
2024         (GetM2Cardinal32): Ditto.
2025         (GetM2Cardinal16): Ditto.
2026         (GetM2Cardinal8): Ditto.
2027         (GetM2Integer64): Ditto.
2028         (GetM2Integer32): Ditto.
2029         (GetM2Integer16): Ditto.
2030         (GetM2Integer8): Ditto.
2031         (GetISOLocType): Ditto.
2032         (GetISOByteType): Ditto.
2033         (GetISOWordType): Ditto.
2034         (GetShortCardType): Ditto.
2035         (GetM2ShortCardType): Ditto.
2036         (GetShortIntType): Ditto.
2037         (GetM2ShortIntType): Ditto.
2038         (GetM2LongCardType): Ditto.
2039         (GetM2LongIntType): Ditto.
2040         (GetM2LongRealType): Ditto.
2041         (GetM2RealType): Ditto.
2042         (GetM2ShortRealType): Ditto.
2043         (GetM2IntegerType): Ditto.
2044         (GetM2CharType): Ditto.
2045         (GetCSizeTType): Ditto.
2046         (GetCSSizeTType): Ditto.
2047         (BuildArrayStringConstructor): Ditto.
2048         (RealToTree): Ditto.
2049         (BuildStartRecord): Ditto.
2050         (BuildStartUnion): Ditto.
2051         (BuildStartVarient): Ditto.
2052         (BuildEndVarient): Ditto.
2053         (BuildStartFieldVarient): Ditto.
2054         (BuildEndFieldVarient): Ditto.
2055         (BuildStartFieldRecord): Ditto.
2056         (BuildFieldRecord): Ditto.
2057         (ChainOn): Ditto.
2058         (ChainOnParamValue): Ditto.
2059         (AddStringToTreeList): Ditto.
2060         (BuildEndRecord): Ditto.
2061         (SetAlignment): Ditto.
2062         (SetDeclPacked): Ditto.
2063         (SetTypePacked): Ditto.
2064         (SetRecordFieldOffset): Ditto.
2065         (BuildPackedFieldRecord): Ditto.
2066         (BuildNumberOfArrayElements): Ditto.
2067         (AddStatement): Ditto.
2068         (MarkFunctionReferenced): Ditto.
2069         (BuildArrayIndexType): Ditto.
2070         (GetArrayNoOfElements): Ditto.
2071         (BuildEndArrayType): Ditto.
2072         (PutArrayType): Ditto.
2073         (BuildStartArrayType): Ditto.
2074         (IsAddress): Ditto.
2075         (SameRealType): Ditto.
2076         * m2.flex (Gm2linemap.h): Include.
2077         * mc-boot/GDynamicStrings.cc: Rebuild.
2078         * mc-boot/GFIO.cc: Ditto.
2079         * mc-boot/GIndexing.cc: Ditto.
2080         * mc-boot/GM2Dependent.cc: Ditto.
2081         * mc-boot/GSArgs.cc: Ditto.
2082         * mc-boot/GStringConvert.cc: Ditto.
2083         * mc-boot/Gdecl.cc: Ditto.
2084         * mc-boot/Gdecl.h: Ditto.
2085         * mc-boot/Gdtoa.h: Ditto.
2086         * mc-boot/Gkeyc.cc: Ditto.
2087         * mc-boot/Gkeyc.h: Ditto.
2088         * mc-boot/Glibc.h: Ditto.
2089         * mc-boot/GmcComp.cc: Ditto.
2090         * mc-boot/GmcLexBuf.cc: Ditto.
2091         * mc-boot/GmcPreprocess.cc: Ditto.
2092         * mc-boot/GmcStream.cc: Ditto.
2093         * mc-boot/Gmcp1.cc: Ditto.
2094         * mc-boot/Gmcp3.cc: Ditto.
2095         * mc-boot/Gmcp4.cc: Ditto.
2096         * mc-boot/Gmcp5.cc: Ditto.
2097         * mc-boot/GnameKey.cc: Ditto.
2098         * mc-boot/Gvarargs.cc: Ditto.
2099         * mc/decl.def (putDefUnqualified): New procedure function.
2100         (isDefUnqualified): Ditto.
2101         * mc/decl.mod (defT): Add unqualified field.
2102         (charStarN): New variable.
2103         (constCharStarN): Ditto.
2104         (checkGccType): New procedure.
2105         (checkCDataTypes): Ditto.
2106         (import): Call checkGccType and checkCDataTypes.
2107         (putDefUnqualified): New procedure function.
2108         (isDefUnqualified): Ditto.
2109         * mc/keyc.def (useGccTree): New procedure.
2110         (useGccLocation): Ditto.
2111         * mc/keyc.mod (checkGccConfigSystem): Call checkGccConfigSystem.
2112         (useGccTree): New procedure.
2113         (useGccLocation): Ditto.
2114         * mc/mcp1.bnf (decl): Import putDefUnqualified.
2115         (Export): Call putDefUnqualified.
2116         * gm2-gcc/CDataTypes.def: New file.
2117         * gm2-gcc/gcctypes.def: New file.
2119 2024-09-02  Gaius Mulley  <gaiusmod2@gmail.com>
2121         PR modula2/116557
2122         * gm2-lang.cc: Replace physical address with URL in GPL header.
2123         * gm2-lang.h: Ditto.
2124         * images/LICENSE.IMG: Ditto.
2125         * m2-tree.def: Ditto.
2126         * mc-boot/GIndexing.cc: Ditto.
2127         * mc-boot/Gkeyc.cc: Ditto.
2128         * mc-boot/Glists.cc: Ditto.
2129         * mc-boot/GmcComp.cc: Ditto.
2130         * mc-boot/GmcDebug.cc: Ditto.
2131         * mc-boot/GmcFileName.cc: Ditto.
2132         * mc-boot/GmcMetaError.cc: Ditto.
2133         * mc-boot/GmcOptions.cc: Ditto.
2134         * mc-boot/GmcPreprocess.cc: Ditto.
2135         * mc-boot/GmcPretty.cc: Ditto.
2136         * mc-boot/GmcPrintf.cc: Ditto.
2137         * mc-boot/GmcQuiet.cc: Ditto.
2138         * mc-boot/GmcReserved.cc: Ditto.
2139         * mc-boot/GmcSearch.cc: Ditto.
2140         * mc-boot/GmcStack.cc: Ditto.
2141         * mc/Indexing.mod: Ditto.
2142         * mc/keyc.mod: Ditto.
2143         * mc/lists.mod: Ditto.
2144         * mc/mcComp.mod: Ditto.
2145         * mc/mcDebug.mod: Ditto.
2146         * mc/mcFileName.mod: Ditto.
2147         * mc/mcMetaError.mod: Ditto.
2148         * mc/mcOptions.mod: Ditto.
2149         * mc/mcPreprocess.mod: Ditto.
2150         * mc/mcPretty.mod: Ditto.
2151         * mc/mcPrintf.mod: Ditto.
2152         * mc/mcQuiet.mod: Ditto.
2153         * mc/mcReserved.mod: Ditto.
2154         * mc/mcSearch.mod: Ditto.
2155         * mc/mcStack.mod: Ditto.
2156         * tools-src/buildpg: Ditto.
2157         * tools-src/calcpath: Ditto.
2158         * tools-src/checkmeta.py: Ditto.
2159         * tools-src/def2doc.py: Ditto.
2160         * tools-src/makeSystem: Ditto.
2161         * tools-src/tidydates.py: Ditto.
2163 2024-09-02  Richard Sandiford  <richard.sandiford@arm.com>
2165         * gm2-gcc/m2block.cc (flush_pending_note): Rename ASM_INPUT_P
2166         to ASM_BASIC_P.
2167         * gm2-gcc/m2statement.cc (m2statement_BuildAsm): Likewise.
2169 2024-08-30  Gaius Mulley  <gaiusmod2@gmail.com>
2171         PR modula2/116181
2172         * pge-boot/GM2RTS.h: Regenerate.
2173         * pge-boot/m2rts.h: Ditto.
2175 2024-08-28  Gaius Mulley  <gaiusmod2@gmail.com>
2177         PR modula2/116181
2178         * Make-lang.in (MC_SRC_FLAGS): New macro.
2179         (m2/mc-boot/$(SRC_PREFIX)%.o): Use MC_SRC_FLAGS.
2180         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
2181         (m2/gm2-libs-boot/M2RTS.o): Ditto.
2182         (m2/gm2-libs-boot/%.o): Ditto.
2183         (GM2-LIBS-BOOT-H): New macro.
2184         (m2/gm2-libs-boot/RTcodummy.o): Use MC_SRC_FLAGS.
2185         Remove gm2-libs-host.h from the dependancy.
2186         (m2/gm2-libs-boot/wrapc.o): Use MC_SRC_FLAGS.
2187         Add dependancy GM2-LIBS-BOOT-H.
2188         (m2/gm2-libs-boot/UnixArgs.o): Ditto.
2189         (m2/gm2-libs-boot/choosetemp.o): Ditto.
2190         (m2/gm2-libs-boot/errno.o): Ditto.
2191         (m2/gm2-libs-boot/dtoa.o): Ditto.
2192         (m2/gm2-libs-boot/ldtoa.o): Ditto.
2193         (m2/gm2-libs-boot/termios.o): Ditto.
2194         (m2/gm2-libs-boot/SysExceptions.o): Ditto.
2195         (m2/gm2-compiler-boot/M2GCCDeclare.o): Add gm2-libs-ch to the
2196         search path.
2197         (m2/gm2-compiler-boot/M2Error.o): Ditto.
2198         (m2/gm2-compiler-boot/%.o): Ditto.
2199         (m2/pge-boot/%.o): Ditto.
2200         * gm2-gcc/m2color.cc (m2color_colorize_start): Replace parameter
2201         type char to void and recast to char * when calling colorize_start.
2202         * gm2-gcc/m2color.h (m2color_colorize_start): Replace parameter
2203         type char to void.
2204         * gm2-gcc/m2type.h: Remove #if 0 block.
2205         * gm2-libs-ch/SysExceptions.c (DECL_PROC_T): Provide alternative
2206         defines for MC an gm2.
2207         (PROC_FUNC): Ditto.
2208         (EXTERN): Force undefine and redefine.
2209         (SysExceptions_InitExceptionHandlers): Rewrite function
2210         declaration using defined macros.
2211         (_M2_SysExceptions_init): Use EXTERN.
2212         (_M2_SysExceptions_finish): Replace with ...
2213         (_M2_SysExceptions_fini): ... this and add parameters.
2214         * gm2-libs-ch/UnixArgs.cc (gm2-libs-host.h): Include.
2215         (GUnixArgs.h): Include.
2216         (GM2RTS.h): Include.
2217         (UnixArgs_GetArgV): Change return type to void *.
2218         (UnixArgs_GetEnvV): Ditto.
2219         * gm2-libs-ch/m2rts.h (M2RTS_RegisterModule_Cstr): Add new
2220         conditional macro.
2221         (M2RTS_RequestDependant): Remove.
2222         (M2RTS_RegisterModule): Ditto.
2223         (M2RTS_Terminate): Ditto.
2224         (M2RTS_DeconstructModules): Ditto.
2225         (M2RTS_Halt): Ditto.
2226         (_M2_M2RTS_init): Ditto.
2227         (M2RTS_ConstructModules): Ditto.
2228         * gm2-libs-ch/termios.c (_termios_C): Define.
2229         (EXTERN): Add conditional definition.
2230         (doSetUnset): New function.
2231         (_M2_termios_init): Add correct parameters.
2232         (_M2_termios_finish): Ditto.
2233         (_M2_termios_fini): Ditto.
2234         * mc-boot-ch/GSysExceptions.c (DECL_PROC_T): New define.
2235         (PROC_FUNC): Ditto.
2236         (EXTERN): Force undef.
2237         (SysExceptions_InitExceptionHandlers): Rewrite.
2238         * mc-boot-ch/Glibc.c (libc_open): Rename parameter
2239         oflag to flags.
2240         * mc-boot-ch/Gtermios.cc (_termios_C): New define.
2241         (KillTermios): Change parameter type from
2242         struct termios * to termios_TERMIOS.
2243         (tcsnow): Rewrite.
2244         (tcsnow): Rewrite.
2245         (tcsdrain): Rewrite.
2246         (tcsflush): Rewrite.
2247         (cfgetospeed): Rewrite.
2248         (cfgetispeed): Rewrite.
2249         (cfsetospeed): Rewrite.
2250         (cfsetispeed): Rewrite.
2251         (cfsetspeed): Rewrite.
2252         (cfsetspeed): Rewrite.
2253         (tcgetattr): Rewrite.
2254         (tcsetattr): Rewrite.
2255         (cfmakeraw): Rewrite.
2256         (tcsendbreak): Rewrite.
2257         (tcdrain): Rewrite.
2258         (tcflushi): Rewrite.
2259         (tcflusho): Rewrite.
2260         (tcflushio): Rewrite.
2261         (tcflowoni): Rewrite.
2262         (tcflowoffi): Rewrite.
2263         (tcflowono): Rewrite.
2264         (tcflowoffo): Rewrite.
2265         (GetFlag): Rewrite.
2266         (SetFlag): Rewrite.
2267         (GetChar): Rewrite.
2268         (SetChar): Rewrite.
2269         (InitTermios): Rewrite.
2270         * pge-boot/GM2RTS.cc: Regenerate.
2271         * pge-boot/GSysExceptions.cc: Ditto.
2272         * pge-boot/Gtermios.cc: Ditto.
2273         * pge-boot/m2rts.h: Rewrite.
2274         * mc-boot-ch/GSYSTEM.h: New file.
2275         * mc-boot-ch/GSysExceptions.h: New file.
2276         * mc-boot-ch/Gtermios.h: New file.
2278 2024-08-24  Gaius Mulley  <gaiusmod2@gmail.com>
2280         * gm2-libs/libc.def (atof): Export unqualified.
2281         (atoi): Ditto.
2282         (atol): Ditto.
2283         (atoll): Ditto.
2284         (strtod): Ditto.
2285         (strtof): Ditto.
2286         (strtold): Ditto.
2287         (strtol): Ditto.
2288         (strtoll): Ditto.
2289         (strtoul): Ditto.
2290         (strtoull): Ditto.
2292 2024-08-16  Gaius Mulley  <gaiusmod2@gmail.com>
2294         * gm2-libs-iso/StdChans.mod (in): Rename to ...
2295         (inch): ... this.
2296         (out): Rename to ...
2297         (outch): ... this.
2298         (err): Rename to ...
2299         (errch): ... this.
2301 2024-08-16  Gaius Mulley  <gaiusmod2@gmail.com>
2303         * gm2-libs/DynamicStrings.mod (Slice): Rename end to stop.
2305 2024-08-16  Gaius Mulley  <gaiusmod2@gmail.com>
2307         PR modula2/116378
2308         * gm2-libs-iso/TermFile.mod (termOpen): Add third argument
2309         for open.
2310         * gm2-libs/libc.def (open): Remove vararg and use INTEGER for
2311         mode parameter three.
2312         * mc-boot-ch/Glibc.c (tracedb_open): Replace mode_t with int.
2313         (libc_open): Rewrite without varargs.
2314         * mc-boot/Glibc.h (libc_open): Replace varargs with int mode.
2315         * pge-boot/Glibc.cc (libc_open): Rewrite.
2316         * pge-boot/Glibc.h (libc_open): Replace varargs with int mode.
2318 2024-08-12  Gaius Mulley  <gaiusmod2@gmail.com>
2320         PR modula2/116181
2321         * gm2-compiler/ppg.mod (FindStr): Initialize j.
2322         * gm2-libs-ch/UnixArgs.cc (_M2_UnixArgs_ctor): Replace
2323         M2RTS_RegisterModule with M2RTS_RegisterModule_Cstr.
2324         * gm2-libs-ch/dtoa.cc (_M2_dtoa_ctor): Ditto.
2325         * gm2-libs-ch/ldtoa.cc (ldtoa_strtold): Cast parameter s
2326         for strtod.
2327         (_M2_ldtoa_ctor): Replace M2RTS_RegisterModule with
2328         M2RTS_RegisterModule_Cstr.
2329         * gm2-libs-ch/m2rts.h (M2RTS_RegisterModule_Cstr): New
2330         define.
2331         (M2RTS_RegisterModule): Remove const.
2332         * mc-boot-ch/GSelective.c (Selective_FdIsSet): Return bool
2333         rather than int.
2334         * mc-boot-ch/Gldtoa.cc (ldtoa_strtold): Change const char to
2335         void.
2336         Cast s before passing as a parameter to strtod.
2337         * mc-boot-ch/Glibc.c (tracedb_open): Replace const char with const
2338         void.
2339         (libc_perror): Replace char with const char.
2340         (libc_printf): Replace char with void.
2341         (libc_snprintf): Replace char with void.
2342         Add const_cast for parameter to index.
2343         Add reinterpret_cast for parameter to vsnprintf.
2344         (libc_open): Replace first paramter type char with void.
2345         Add vararg for the third parameter.
2346         * mc-boot-ch/Gm2rtsdummy.cc (M2RTS_RequestDependant): Remove #if 0 code.
2347         (m2pim_M2RTS_RegisterModule): Change const char parameters to void
2348         (M2RTS_RegisterModule): Ditto.
2349         (_M2_M2RTS_init): Remove #if 0 code.
2350         (M2RTS_ConstructModules): Ditto.
2351         (M2RTS_Terminate): Ditto.
2352         (M2RTS_DeconstructModules): Ditto.
2353         (M2RTS_Halt): Ditto.
2354         * mc-boot-ch/Gtermios.cc (SetFlag): Return bool.
2355         * mc-boot-ch/m2rts.h (M2RTS_RegisterModule_Cstr): New define.
2356         (M2RTS_RegisterModule): Change const char parameters to void.
2357         * mc-boot/Gdecl.cc: Regenerate.
2358         * mc/decl.mod (getNextConstExp): Reimplement.
2359         * pge-boot/GDynamicStrings.cc: Regenerate.
2360         * pge-boot/GDynamicStrings.h: Ditto.
2361         * pge-boot/GM2RTS.h (M2RTS_RegisterModule_Cstr): New function.
2362         (M2RTS_RegisterModule): Reformat.
2363         * pge-boot/GSymbolKey.cc: Regenerate.
2364         * pge-boot/GSysExceptions.cc (_M2_SysExceptions_init): Add correct parameters.
2365         (_M2_SysExceptions_fini): Ditto.
2366         * pge-boot/GUnixArgs.cc (_M2_UnixArgs_ctor::_M2_UnixArgs_ctor):
2367         Replace call to M2RTS_RegisterModule with M2RTS_RegisterModuleCstr.
2368         * pge-boot/Gerrno.cc (_M2_errno_init): Add correct parameters.
2369         (_M2_errno_fini): Ditto.
2370         * pge-boot/Gldtoa.cc (ldtoa_strtold): Replace const char with
2371         void.
2372         Use reinterpret_cast when passing s to strtod.
2373         Replace true with TRUE.
2374         * pge-boot/Gldtoa.h (ldtoa_strtold): Tidy up.
2375         * pge-boot/Glibc.cc (libc_read): Use size_t as the return type.
2376         (libc_write): Ditto.
2377         (libc_strlen): Ditto.
2378         (libc_perror): Replace char with const char.
2379         (libc_printf): Replace char to const char.
2380         Cast parameter to index using const_cast.
2381         (libc_snprintf): Replace char with void.
2382         Cast parameter to index using const_cast.
2383         (libc_malloc): Replace parameter type with size_t.
2384         (libc_memcpy): Replace third parameter type with size_t.
2385         (libc_open): Use varargs.
2386         * pge-boot/Glibc.h (libc_perror): Add _string_high parameter.
2387         * pge-boot/Gpge.cc: Regenerate.
2388         * pge-boot/Gtermios.cc (SetFlag): Replace return type with bool.
2389         (_M2_termios_init): Add correct parameters.
2390         (_M2_termios_fini): Ditto.
2391         * pge-boot/m2rts.h (M2RTS_RegisterModule_Cstr): New define.
2392         (M2RTS_RegisterModule): Replace const char with void.
2394 2024-08-10  Wilken Gottwalt  <wilken.gottwalt@posteo.net>
2396         * gm2-libs-iso/MemStream.mod: Guard debug output.
2398 2024-07-28  Gaius Mulley  <gaiusmod2@gmail.com>
2400         PR modula2/115823
2401         * gm2-gcc/m2builtins.cc (define_builtin): Build
2402         the function decl using the libname.
2404 2024-07-24  Gaius Mulley  <gaiusmod2@gmail.com>
2406         * gm2-compiler/M2StateCheck.mod (GenerateError): Add
2407         symbol name to the error message.
2409 2024-07-23  Gaius Mulley  <gaiusmod2@gmail.com>
2411         PR modula2/116048
2412         * Make-lang.in (GM2-COMP-BOOT-DEFS): Add M2StateCheck.def.
2413         (GM2-COMP-BOOT-MODS): Add M2StateCheck.mod.
2414         (GM2-COMP-DEFS): Add M2StateCheck.def.
2415         (GM2-COMP-MODS): Add M2StateCheck.mod.
2416         * gm2-compiler/M2Quads.mod (StartBuildWith): Generate
2417         unrecoverable error is the qualident type is NulSym.
2418         Replace MetaError1 with MetaErrorT1 and position the error
2419         to the qualident.
2420         * gm2-compiler/P3Build.bnf (M2StateCheck): Import procedures.
2421         (seenError): New variable.
2422         (WasNoError): Remove variable.
2423         (BlockState): New variable.
2424         (ErrorString): Rewrite using seenError.
2425         (CompilationUnit): Ditto.
2426         (QualidentCheck): New rule.
2427         (ConstantDeclaration): Bookend with InclConst and ExclConst.
2428         (Constructor): Add InclConstructor, ExclConstructor and call
2429         CheckQualident.
2430         (ConstActualParameters): Call PushState, PopState, InclConstFunc
2431         and CheckQualident.
2432         (TypeDeclaration): Bookend with InclType and ExclType.
2433         (SimpleType): Call QualidentCheck.
2434         (CaseTag): Ditto.
2435         (OptReturnType): Ditto.
2436         (VariableDeclaration): Bookend with InclVar and ExclVar.
2437         (Designator): Call QualidentCheck.
2438         (Formal;Type): Ditto.
2439         * gm2-compiler/PCBuild.bnf (M2StateCheck): Import procedures.
2440         (ConstantDeclaration): Rewrite using InclConst and ExclConst.
2441         (Constructor): Bookend with InclConstructor and ExclConstructor.
2442         Call CheckQualident.
2443         (ConstructorOrConstActualParameters): Rewrite and cal
2444         l CheckQualident.
2445         (ConstActualParameters): Bookend with PushState PopState.
2446         Call InclConstFunc and CheckQualident.
2447         * gm2-gcc/init.cc (_M2_M2StateCheck_init): New declaration.
2448         (_M2_P3Build_init): New declaration.
2449         (init_PerCompilationInit): Call _M2_M2StateCheck_init and
2450         _M2_P3Build_init.
2451         * gm2-compiler/M2StateCheck.def: New file.
2452         * gm2-compiler/M2StateCheck.mod: New file.
2454 2024-07-16  Gaius Mulley  <gaiusmod2@gmail.com>
2456         PR modula2/115957
2457         * gm2-compiler/M2StackAddress.mod (PopAddress): Detect tail=NIL
2458         and generate an internal error.
2459         * gm2-compiler/PCBuild.bnf (InConstParameter): New variable.
2460         (InConstBlock): New variable.
2461         (ErrorString): Rewrite using MetaErrorStringT0.
2462         (ErrorArrayAt): Rewrite using MetaErrorStringT0.
2463         (WarnMissingToken): Use MetaErrorStringT0.
2464         (CompilationUnit): Set seenError FALSE.
2465         (init): Initialize InConstParameter and InConstBlock.
2466         (ConstantDeclaration): Set InConstBlock.
2467         (ConstSetOrQualidentOrFunction): Call CheckNotVar if not
2468         InConstParameter and InConstBlock.
2469         (ConstActualParameters): Set InConstParameter TRUE and restore
2470         value at the end.
2471         * gm2-compiler/PCSymBuild.def (CheckNotVar): New procedure.
2472         Remove all unnecessary export qualified list.
2473         * gm2-compiler/PCSymBuild.mod (CheckNotVar): New procedure.
2475 2024-07-12  FX Coudert  <fxcoudert@gmail.com>
2477         * gm2-gcc/m2linemap.cc (INCLUDE_STRING): Define before
2478         include of gcc-consolidation.h.
2479         * gm2spec.cc (INCLUDE_STRING): Define before include of
2480         system.h.
2481         (INCLUDE_VECTOR): Ditto.
2483 2024-07-10  Gaius Mulley  <gaiusmod2@gmail.com>
2485         PR modula2/115823
2486         * gm2-gcc/m2builtins.cc (struct builtin_macro_definition): New
2487         field builtinname.
2488         (builtin_function_match): New function.
2489         (builtin_macro_match): Ditto.
2490         (m2builtins_BuiltinExists): Use builtin_function_match and
2491         builtin_macro_match.
2492         (lookup_builtin_macro): Use builtin_macro_match.
2493         (lookup_builtin_function): Use builtin_function_match.
2494         (define_builtin): Assign builtinname field.
2496 2024-07-07  Gaius Mulley  <gaiusmod2@gmail.com>
2497             Stefan Schulze Frielinghaus   <stefansf@linux.ibm.com>
2498             Andrew Pinski   <quic_apinski@quicinc.com>
2500         PR modula2/115804
2501         * gm2-gcc/m2builtins.cc (builtin_function_entry): Add GTY.
2502         (DoBuiltinMemCopy): Add rettype and use rettype in the call.
2503         (DoBuiltinAlloca): Ditto.
2504         (DoBuiltinIsfinite): Ditto.
2505         (DoBuiltinIsnan): Ditto.
2506         (m2builtins_BuiltInHugeVal): Ditto.
2507         (m2builtins_BuiltInHugeValShort): Ditto.
2508         (m2builtins_BuiltInHugeValLong): Ditto.
2510 2024-06-25  Gaius Mulley  <gaiusmod2@gmail.com>
2512         * gm2-compiler/M2GenGCC.mod (QuadCondition): Remove.
2513         (FoldIfEqu): Remove WalkAction parameter.
2514         (FoldIfNotEqu): Ditto.
2515         (FoldIfGreEqu): Ditto.
2516         (FoldIfLessEqu): Ditto.
2517         (FoldIfGre): Ditto.
2518         (FoldIfLess): Ditto.
2519         (FoldIfIn): Ditto.
2520         (FoldIfNotIn): Ditto.
2521         * gm2-compiler/M2Quads.mod (GenQuadOTypeUniquetok): Remove.
2523 2024-06-25  Gaius Mulley  <gaiusmod2@gmail.com>
2525         PR modula2/115540
2526         * gm2-libs-ch/termios.c (cfmakeraw): Remove return.
2527         * mc-boot-ch/Gtermios.cc (cfmakeraw): Remove return.
2528         * pge-boot/Gtermios.cc (cfmakeraw): Remove return.
2530 2024-06-25  Gaius Mulley  <gaiusmod2@gmail.com>
2532         PR modula2/115536
2533         * gm2-compiler/M2BasicBlock.def (GetBasicBlockScope): New procedure.
2534         (GetBasicBlockStart): Ditto.
2535         (GetBasicBlockEnd): Ditto.
2536         (IsBasicBlockFirst): New procedure function.
2537         * gm2-compiler/M2BasicBlock.mod (ConvertQuads2BasicBlock): Allow
2538         conditional boolean quads to be removed.
2539         (GetBasicBlockScope): Implement new procedure.
2540         (GetBasicBlockStart): Ditto.
2541         (GetBasicBlockEnd): Ditto.
2542         (IsBasicBlockFirst): Implement new procedure function.
2543         * gm2-compiler/M2GCCDeclare.def (FoldConstants): New parameter
2544         declaration.
2545         * gm2-compiler/M2GCCDeclare.mod (FoldConstants): New parameter
2546         declaration.
2547         (DeclareTypesConstantsProceduresInRange): Recreate basic blocks
2548         after resolving constant expressions.
2549         (CodeBecomes): Guard IsVariableSSA with IsVar.
2550         * gm2-compiler/M2GenGCC.def (ResolveConstantExpressions): New
2551         parameter declaration.
2552         * gm2-compiler/M2GenGCC.mod (FoldIfLess): Remove relop pattern
2553         detection.
2554         (FoldIfGre): Ditto.
2555         (FoldIfLessEqu): Ditto.
2556         (FoldIfGreEqu): Ditto.
2557         (FoldIfIn): Ditto.
2558         (FoldIfNotIn): Ditto.
2559         (FoldIfEqu): Ditto.
2560         (FoldIfNotEqu): Ditto.
2561         (FoldBecomes): Add BasicBlock parameter and allow conditional
2562         boolean becomes to be folded in the first basic block.
2563         (ResolveConstantExpressions): Reimplement.
2564         * gm2-compiler/M2Quads.def (IsConstQuad): New procedure function.
2565         (IsConditionalBooleanQuad): Ditto.
2566         * gm2-compiler/M2Quads.mod (IsConstQuad): Implement new procedure function.
2567         (IsConditionalBooleanQuad): Ditto.
2568         (MoveWithMode): Use GenQuadOTypetok.
2569         (IsInitialisingConst): Rewrite using OpUsesOp1.
2570         (OpUsesOp1): New procedure function.
2571         (doBuildAssignment): Mark des as a VarConditional.
2572         (ConvertBooleanToVariable): Call PutVarConditional.
2573         (DumpQuadSummary): New procedure.
2574         (BuildRelOpFromBoolean): Updated debugging and improved comments.
2575         (BuildRelOp): Only call BuildRelOpFromBoolean if we are in a const
2576         expression and both operands are boolean relops.
2577         (GenQuadOTypeUniquetok): New procedure.
2578         (BackPatch): Correct comment.
2579         * gm2-compiler/SymbolTable.def (PutVarConditional): New procedure.
2580         (IsVarConditional): New procedure function.
2581         * gm2-compiler/SymbolTable.mod (PutVarConditional): Implement new
2582         procedure.
2583         (IsVarConditional): Implement new procedure function.
2584         (SymConstVar): New field IsConditional.
2585         (SymVar): New field IsConditional.
2586         (MakeVar): Initialize IsConditional field.
2587         (MakeConstVar): Initialize IsConditional field.
2588         * gm2-compiler/M2Swig.mod (DoBasicBlock): Change parameters to
2589         use BasicBlock.
2590         * gm2-compiler/M2Code.mod (SecondDeclareAndOptimize): Use iterator
2591         to FoldConstants over basic block list.
2592         * gm2-compiler/M2SymInit.mod (AppendEntry): Replace parameters
2593         with BasicBlock.
2594         * gm2-compiler/P3Build.bnf (Relation): Call RecordOp for #, <> and =.
2596 2024-06-17  Kewen Lin  <linkw@linux.ibm.com>
2598         * gm2-gcc/m2type.cc (build_m2_short_real_node): Adjust assertion with
2599         TYPE_SIZE check.
2600         (build_m2_real_node): Likewise.
2601         (build_m2_long_real_node): Add assertion with TYPE_SIZE check.
2603 2024-06-11  Gaius Mulley  <gaiusmod2@gmail.com>
2605         PR modula2/114529
2606         * Make-lang.in (MC_EXTENDED_OPAQUE): Assign to nothing.
2607         * Make-maintainer.in (mc-basetest): New rule.
2608         (mc-devel-basetest): New rule.
2609         (mc-clean): Remove mc.
2610         (m2/mc-boot-gen/$(SRC_PREFIX)decl.cc): Replace --extended-opaque
2611         with $(EXTENDED_OPAQUE).
2612         (PG-SRC): Move define before generic rules.
2613         (PGE-DEF): Ditto.
2614         (m2/gm2-ppg-boot/$(SRC_PREFIX)%.h): New rule.
2615         (m2/gm2-ppg-boot/$(SRC_PREFIX)libc.o): Ditto.
2616         (m2/gm2-ppg-boot/$(SRC_PREFIX)mcrts.o): Ditto.
2617         (m2/gm2-ppg-boot/$(SRC_PREFIX)UnixArgs.o): Ditto.
2618         (m2/gm2-ppg-boot/$(SRC_PREFIX)Selective.o): Ditto.
2619         (m2/gm2-ppg-boot/$(SRC_PREFIX)termios.o): Ditto.
2620         (m2/gm2-ppg-boot/$(SRC_PREFIX)SysExceptions.o): Ditto.
2621         (m2/gm2-ppg-boot/$(SRC_PREFIX)ldtoa.o): Ditto.
2622         (m2/gm2-ppg-boot/$(SRC_PREFIX)wrapc.o): Ditto.
2623         (m2/gm2-ppg-boot/$(SRC_PREFIX)SYSTEM.o): Ditto.
2624         (m2/gm2-ppg-boot/$(SRC_PREFIX)errno.o): Ditto.
2625         (m2/gm2-ppg-boot/$(SRC_PREFIX)M2RTS.o): Ditto.
2626         (m2/gm2-ppg-boot/$(SRC_PREFIX)SymbolKey.h): Ditto.
2627         (m2/gm2-ppg-boot/$(SRC_PREFIX)SymbolKey.o): Ditto.
2628         (m2/gm2-ppg-boot/$(SRC_PREFIX)NameKey.h): Ditto.
2629         (m2/gm2-ppg-boot/$(SRC_PREFIX)NameKey.o): Ditto.
2630         (m2/gm2-ppg-boot/$(SRC_PREFIX)Lists.h): Ditto.
2631         (m2/gm2-ppg-boot/$(SRC_PREFIX)Lists.o): Ditto.
2632         (m2/gm2-ppg-boot/$(SRC_PREFIX)Output.h): Ditto.
2633         (m2/gm2-ppg-boot/$(SRC_PREFIX)bnflex.h): Ditto.
2634         (m2/gm2-ppg-boot/$(SRC_PREFIX)bnflex.o): Ditto.
2635         (m2/gm2-ppg-boot/$(SRC_PREFIX)RTco.h): Ditto.
2636         (m2/gm2-ppg-boot/$(SRC_PREFIX)RTentity.h): Ditto.
2637         (m2/gm2-ppg-boot/$(SRC_PREFIX)RTco.o): Ditto.
2638         (m2/gm2-ppg-boot/$(SRC_PREFIX)RTentity.o): Ditto.
2639         (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): Ditto.
2640         (m2/ppg$(exeext)): Ditto.
2641         (m2/gm2-ppg-boot/main.o): Ditto.
2642         (m2/gm2-auto): Ditto.
2643         (c-family/m2pp.o): Ditto.
2644         (BUILD-BOOT-PG-H): Correct macro definition.
2645         (m2/gm2-pg-boot/$(SRC_PREFIX)%.h): New rule.
2646         (m2/gm2-pg-boot/$(SRC_PREFIX)NameKey.h): Ditto.
2647         (m2/gm2-pg-boot/$(SRC_PREFIX)NameKey.o): Ditto.
2648         (m2/gm2-pg-boot/$(SRC_PREFIX)Lists.h): Ditto.
2649         (m2/gm2-pg-boot/$(SRC_PREFIX)Lists.o): Ditto.
2650         (m2/gm2-pg-boot/$(SRC_PREFIX)Output.h): Ditto.
2651         (m2/gm2-pg-boot/$(SRC_PREFIX)Output.o): Ditto.
2652         (m2/gm2-pg-boot/$(SRC_PREFIX)bnflex.h): Ditto.
2653         (m2/gm2-pg-boot/$(SRC_PREFIX)bnflex.o): Ditto.
2654         (m2/gm2-pg-boot/$(SRC_PREFIX)RTco.h): Ditto.
2655         (m2/gm2-pg-boot/$(SRC_PREFIX)RTentity.h): Ditto.
2656         (m2/gm2-pg-boot/$(SRC_PREFIX)RTco.o): Ditto.
2657         (m2/gm2-pg-boot/$(SRC_PREFIX)RTentity.o): Ditto.
2658         (BUILD-BOOT-PGE-H): Correct macro definition.
2659         (m2/gm2-pge-boot/$(SRC_PREFIX)SymbolKey.h): Ditto.
2660         (m2/gm2-pge-boot/$(SRC_PREFIX)SymbolKey.o): Ditto.
2661         (m2/gm2-pge-boot/$(SRC_PREFIX)NameKey.h): Ditto.
2662         (m2/gm2-pge-boot/$(SRC_PREFIX)NameKey.o): Ditto.
2663         (m2/gm2-pge-boot/$(SRC_PREFIX)Lists.h): Ditto.
2664         (m2/gm2-pge-boot/$(SRC_PREFIX)Lists.o): Ditto.
2665         (m2/gm2-pge-boot/$(SRC_PREFIX)Output.h): Ditto.
2666         (m2/gm2-pge-boot/$(SRC_PREFIX)Output.o): Ditto.
2667         (m2/gm2-pge-boot/$(SRC_PREFIX)bnflex.h): Ditto.
2668         (m2/gm2-pge-boot/$(SRC_PREFIX)bnflex.o): Ditto.
2669         (m2/gm2-pge-boot/$(SRC_PREFIX)RTco.h): Ditto.
2670         (m2/gm2-pge-boot/$(SRC_PREFIX)RTentity.h): Ditto.
2671         (m2/gm2-pge-boot/$(SRC_PREFIX)RTco.o): Ditto.
2672         (m2/gm2-pge-boot/$(SRC_PREFIX)RTentity.o): Ditto.
2673         (mc-basetest): Ditto.
2674         (mc-devel-basetest): Ditto.
2675         * gm2-compiler/M2Options.def (SetM2Dump): Add BOOLEAN return.
2676         * gm2-compiler/M2Quads.def (BuildAlignment): Add tokno parameter.
2677         (BuildBitLength): Ditto.
2678         * gm2-compiler/P3Build.bnf (ByteAlignment): Move tokpos assignment
2679         to the start of the block.
2680         * gm2-compiler/PCBuild.bnf (ConstSetOrQualidentOrFunction): Ditto.
2681         (SetOrDesignatorOrFunction): Ditto.
2682         * gm2-compiler/PHBuild.bnf (ConstSetOrQualidentOrFunction): Ditto.
2683         (SetOrDesignatorOrFunction): Ditto.
2684         (ByteAlignment): Ditto.
2685         * gm2-libs/dtoa.def (dtoa): Change mode to INTEGER.
2686         * gm2-libs/ldtoa.def (ldtoa): Ditto.
2687         * mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_init): Correct parameter list.
2688         (_M2_SYSTEM_fini): Ditto.
2689         * mc-boot-ch/Gdtoa.cc (dtoa_calcsign): Return bool.
2690         (dtoa_dtoa): Return void * and use bool in the fifth parameter.
2691         (_M2_dtoa_init): Correct parameter list.
2692         (_M2_dtoa_fini): Ditto.
2693         * mc-boot-ch/Gerrno.cc (_M2_errno_init): Ditto.
2694         (_M2_errno_fini): Ditto.
2695         * mc-boot-ch/Gldtoa.cc (dtoa_calcsign): Return bool.
2696         (ldtoa_ldtoa): Return void * and use bool in the fifth parameter.
2697         (_M2_ldtoa_init): Correct parameter list.
2698         (_M2_ldtoa_fini): Ditto.
2699         * mc-boot-ch/Glibc.c (tracedb_zresult): New function.
2700         (libc_read): Return size_t and use size_t in parameter three.
2701         (libc_write): Return size_t and use size_t in parameter three.
2702         (libc_printf): Add const to the format specifier.
2703         Change declaration of c to use const.
2704         (libc_snprintf): Add const to the format specifier.
2705         Change declaration of c to use const.
2706         (libc_malloc): Use size_t.
2707         (libc_memcpy): Ditto.
2708         * mc-boot/GASCII.cc: Regenerate.
2709         * mc-boot/GArgs.cc: Ditto.
2710         * mc-boot/GAssertion.cc: Ditto.
2711         * mc-boot/GBreak.cc: Ditto.
2712         * mc-boot/GCmdArgs.cc: Ditto.
2713         * mc-boot/GDebug.cc: Ditto.
2714         * mc-boot/GDynamicStrings.cc: Ditto.
2715         * mc-boot/GEnvironment.cc: Ditto.
2716         * mc-boot/GFIO.cc: Ditto.
2717         * mc-boot/GFormatStrings.cc: Ditto.
2718         * mc-boot/GFpuIO.cc: Ditto.
2719         * mc-boot/GIO.cc: Ditto.
2720         * mc-boot/GIndexing.cc: Ditto.
2721         * mc-boot/GM2Dependent.cc: Ditto.
2722         * mc-boot/GM2EXCEPTION.cc: Ditto.
2723         * mc-boot/GM2RTS.cc: Ditto.
2724         * mc-boot/GMemUtils.cc: Ditto.
2725         * mc-boot/GNumberIO.cc: Ditto.
2726         * mc-boot/GPushBackInput.cc: Ditto.
2727         * mc-boot/GRTExceptions.cc: Ditto.
2728         * mc-boot/GRTint.cc: Ditto.
2729         * mc-boot/GSArgs.cc: Ditto.
2730         * mc-boot/GSFIO.cc: Ditto.
2731         * mc-boot/GStdIO.cc: Ditto.
2732         * mc-boot/GStorage.cc: Ditto.
2733         * mc-boot/GStrCase.cc: Ditto.
2734         * mc-boot/GStrIO.cc: Ditto.
2735         * mc-boot/GStrLib.cc: Ditto.
2736         * mc-boot/GStringConvert.cc: Ditto.
2737         * mc-boot/GSysStorage.cc: Ditto.
2738         * mc-boot/GTimeString.cc: Ditto.
2739         * mc-boot/Galists.cc: Ditto.
2740         * mc-boot/Gdecl.cc: Ditto.
2741         * mc-boot/Gkeyc.cc: Ditto.
2742         * mc-boot/Glists.cc: Ditto.
2743         * mc-boot/GmcComment.cc: Ditto.
2744         * mc-boot/GmcComp.cc: Ditto.
2745         * mc-boot/GmcDebug.cc: Ditto.
2746         * mc-boot/GmcError.cc: Ditto.
2747         * mc-boot/GmcFileName.cc: Ditto.
2748         * mc-boot/GmcLexBuf.cc: Ditto.
2749         * mc-boot/GmcMetaError.cc: Ditto.
2750         * mc-boot/GmcOptions.cc: Ditto.
2751         * mc-boot/GmcPreprocess.cc: Ditto.
2752         * mc-boot/GmcPretty.cc: Ditto.
2753         * mc-boot/GmcPrintf.cc: Ditto.
2754         * mc-boot/GmcQuiet.cc: Ditto.
2755         * mc-boot/GmcReserved.cc: Ditto.
2756         * mc-boot/GmcSearch.cc: Ditto.
2757         * mc-boot/GmcStack.cc: Ditto.
2758         * mc-boot/GmcStream.cc: Ditto.
2759         * mc-boot/Gmcp1.cc: Ditto.
2760         * mc-boot/Gmcp2.cc: Ditto.
2761         * mc-boot/Gmcp3.cc: Ditto.
2762         * mc-boot/Gmcp4.cc: Ditto.
2763         * mc-boot/Gmcp5.cc: Ditto.
2764         * mc-boot/GnameKey.cc: Ditto.
2765         * mc-boot/GsymbolKey.cc: Ditto.
2766         * mc-boot/Gvarargs.cc: Ditto.
2767         * mc-boot/Gwlists.cc: Ditto.
2768         * mc-boot/Gdecl.h: Ditto.
2769         * mc-boot/Gldtoa.h: Ditto.
2770         * mc-boot/Glibc.h: Ditto.
2771         * mc/decl.def (putTypeOpaque): New procedure.
2772         (isTypeOpaque): New procedure function.
2773         * mc/decl.mod (debugOpaque): New constant.
2774         (nodeT): New enumeration field opaquecast.
2775         (node): New record field opaquecastF.
2776         (opaqueCastState): New record.
2777         (opaquecastT): New record.
2778         (typeT): New field isOpaque.
2779         (varT): New field opaqueState.
2780         (arrayT): Ditto.
2781         (varparamT): Ditto.
2782         (paramT): Ditto.
2783         (pointerT): Ditto.
2784         (recordfieldT): Ditto.
2785         (componentrefT): Ditto.
2786         (pointerrefT): Ditto.
2787         (arrayrefT): Ditto.
2788         (procedureT): Ditto.
2789         (proctypeT): Ditto.
2790         (makeType): Initialize field isOpaque.
2791         (makeTypeImp): Initialize field isOpaque.
2792         (putVar): Call initNodeOpaqueCastState.
2793         (putReturnType): Ditto.
2794         (makeProcType): Ditto.
2795         (putProcTypeReturn): Ditto.
2796         (makeVarParameter): Ditto.
2797         (makeNonVarParameter): Ditto.
2798         (makeFuncCall): Ditto.
2799         (putTypeOpaque): New procedure.
2800         (isTypeOpaque): New procedure function.
2801         (doMakeComponentRef): Call initNodeOpaqueCastState.
2802         (makePointerRef): Call initNodeOpaqueCastState.
2803         (doGetFuncType): Call initNodeOpaqueCastState.
2804         (doBinary): Add FALSE parameter to doExprCup.
2805         (doDeRefC): Rewrite.
2806         (doComponentRefC): Call flushOpaque.
2807         (doPointerRefC): Call flushOpaque.
2808         (doArrayRefC): Add const_cast for unbounded array.
2809         (doExprCup): Rewrite.
2810         (doTypeAliasC): Remove.
2811         (isDeclType): New procedure function.
2812         (doEnumerationC): New procedure function.
2813         (doParamTypeEmit): Ditto.
2814         (doParamTypeNameModifier): Ditto.
2815         (initOpaqueCastState): Ditto.
2816         (initNodeOpaqueCastState): Ditto.
2817         (setOpaqueCastState): Ditto.
2818         (setNodeOpaqueVoidStar): Ditto.
2819         (nodeUsesOpaque): Ditto.
2820         (getNodeOpaqueVoidStar): Ditto.
2821         (getOpaqueFlushNecessary): Ditto.
2822         (makeOpaqueCast): Ditto.
2823         (flushOpaque): Ditto.
2824         (castOpaque): Ditto.
2825         (isTypeOpaqueDefImp): Ditto.
2826         (isParamVoidStar): Ditto.
2827         (isRefVoidStar): Ditto.
2828         (isReturnVoidStar): Ditto.
2829         (isVarVoidStar): Ditto.
2830         (initNodeOpaqueState): Ditto.
2831         (assignNodeOpaqueCastState): Ditto.
2832         (assignNodeOpaqueCastFalse): Ditto.
2833         (dumpOpaqueState): Ditto.
2834         (doProcTypeC): Rewrite.
2835         (isDeclInImp): New procedure function.
2836         (doTypeNameModifier): Ditto.
2837         (doTypeC): Emit typedef if enum is declared in this module.
2838         (doCompletePartialProcType): Rewrite.
2839         (outputCompletePartialProcType): New procedure.
2840         (doOpaqueModifier): Ditto.
2841         (doVarC): Ditto.
2842         (doProcedureHeadingC): Add opaque modifier to return type if
2843         necessary.
2844         (doReturnC): Cast opaque type for return if necessary.
2845         (forceCastOpaque): New procedure.
2846         (forceReintCastOpaque): New procedure.
2847         (doUnConstCastUnbounded): New procedure.
2848         (doAssignmentC): Cast opaque for both des and expr if necessary.
2849         (doAdrExprC): Use static_cast for void * casting.
2850         (doFuncVarParam): New procedure.
2851         (doFuncParamC): Rewrite.
2852         (doAdrArgC): Rewrite.
2853         (getFunction): New procedure function.
2854         (stop): Rename to ...
2855         (localstop): ... this.
2856         (dupFunccall): Call assignNodeOpaqueCastState.
2857         (dbg): Rewrite.
2858         (addDone): Rewrite.
2859         (addDoneDef): Do not add opaque types to the doneQ when declared in
2860         the definition module.
2861         * mc/mc.flex (openSource): Return bool.
2862         (_M2_mcflex_init): Correct parameter list.
2863         (_M2_mcflex_fini): Ditto.
2864         * mc/mcComment.h (stdbool.h): Include.
2865         (mcComment_initComment): Change unsigned int to bool.
2866         * mc/mcOptions.mod (handleOption): Disable --extended-opaque
2867         and issue warning.
2868         * mc/mcp1.bnf (DefTypeDeclaration): Call putTypeOpaque.
2870 2024-06-06  Gaius Mulley  <gaiusmod2@gmail.com>
2871             Kewen.Lin   <linkw@linux.ibm.com>
2873         * gm2-gcc/m2type.cc (build_m2_short_real_node): Rewrite
2874         to use the default float_type_node.
2875         (build_m2_real_node): Rewrite to use the default
2876         double_type_node.
2877         (build_m2_long_real_node): Rewrite to use the default
2878         long_double_type_node or float128_type_node.
2880 2024-05-21  Gaius Mulley  <gaiusmod2@gmail.com>
2882         * Make-lang.in (MC_EXTENDED_OPAQUE): New definition.
2883         * mc-boot/GDynamicStrings.cc: Rebuild.
2884         * mc-boot/GDynamicStrings.h: Rebuild.
2885         * mc-boot/Galists.cc: Rebuild.
2886         * mc-boot/Galists.h: Rebuild.
2887         * mc-boot/Gdecl.cc: Rebuild.
2888         * mc/alists.def (equalList): New procedure.
2889         * mc/alists.mod (equalList): New procedure implementation.
2890         * mc/decl.mod (group): New type.
2891         (freeGroup): New variable.
2892         (globalGroup): Ditto.
2893         (todoQ): Remove declaration and prefix all occurances with globalGroup^.
2894         (partialQ): Ditto.
2895         (doneQ): Ditto.
2896         (newGroup): New procedure.
2897         (initGroup): Ditto.
2898         (killGroup): Ditto.
2899         (dupGroup): Ditto.
2900         (equalGroup): Ditto.
2901         (topologicallyOut): Rewrite.
2903 2024-05-21  Sam James  <sam@gentoo.org>
2905         * Make-lang.in (m2.install-info): Pass --destdir for dir index.
2907 2024-05-15  Gaius Mulley  <gaiusmod2@gmail.com>
2909         PR modula2/115057
2910         * gm2-libs-iso/TextIO.mod (ReadRestLine): Use ReadChar to
2911         skip unwanted characters as this calls IOChan.Look and updates
2912         the cid result status.  A Skip without a Look does not update
2913         the status.  Skip always sets read result to allRight.
2914         * gm2-libs-iso/TextUtil.def (SkipSpaces): Improve comments.
2915         (CharAvailable): Improve comments.
2916         * gm2-libs-iso/TextUtil.mod (SkipSpaces): Improve comments.
2917         (CharAvailable): Improve comments.
2919 2024-05-09  Gaius Mulley  <gaiusmod2@gmail.com>
2921         PR modula2/115003
2922         * gm2-compiler/SymbolTable.mod (GetScope): Add UndefinedSym
2923         case clause and return NulSym.
2925 2024-05-03  Gaius Mulley  <gaiusmod2@gmail.com>
2927         PR modula2/114929
2928         * gm2-compiler/M2LangDump.mod (GenQualidentSymString): Add
2929         missing return result into identstr.
2930         * gm2-compiler/M2Quads.mod (ForLoopLastIteratorVariable): New
2931         procedure.
2932         (ForLoopLastIteratorConstant): Ditto.
2933         (ForLoopLastIterator): Ditto.
2934         (BuildForToByDo): Remove LastIterator calculation and call
2935         ForLoopLastIterator instead.
2936         (FinalValue): Replace with ...
2937         (LastIterator): ... this.
2939 2024-05-02  Gaius Mulley  <gaiusmod2@gmail.com>
2941         PR modula2/113836
2942         * gm2-compiler/M2AsmUtil.def: Remove export qualified and
2943         unused import.
2944         * gm2-compiler/M2LangDump.mod (AddRuleTextDump): New procedure.
2945         (AddRuleScopeQualidentDump): Add warning check against unmatched
2946         rule.
2947         (GenQualidentSymString): New procedure function.
2948         (IdentQualidentMatch): New procedure function.
2949         (IsRuleFilenameMatch): New procedure function.
2950         (CheckRuleMatch): New procedure function.
2951         (AddRuleFilenameDump): New procedure function.
2952         * gm2-gcc/m2misc.cc (m2misc_warning_m2_dump_filter): New function.
2953         * gm2-gcc/m2misc.def (warning_m2_dump_filter): New procedure.
2954         * gm2-gcc/m2misc.h (m2misc_warning_m2_dump_filter): New prototype.
2955         * gm2-gcc/m2pp.cc (VERBOSE_TYPE_DESC): New define.
2956         (m2pp_identifier): Define out verbose type info.
2957         (m2pp_constructor): Define out verbose type info.
2958         (m2pp_assignment): Define out verbose type info.
2959         * gm2-lang.cc (ENABLE_M2DUMP_ALL): Remove.
2960         * lang.opt (fm2-dump): Add.
2961         (fm2-dump-decl=): Add.
2962         (fm2-dump-gimple=): Add.
2963         (fm2-dump-quad=): Add.
2964         (fm2-dump-filter=): Add.
2966 2024-04-25  Gaius Mulley  <gaiusmod2@gmail.com>
2968         PR modula2/114836
2969         * gm2-compiler/M2Range.mod (FoldTypeAssign): Avoid error
2970         string concatenation.
2972 2024-04-25  Gaius Mulley  <gaiusmod2@gmail.com>
2974         * gm2-compiler/M2FileName.def (CalculateFileName): Remove
2975         quoted string in comment.
2976         * gm2-compiler/M2Range.mod (FoldTypeParam): Generate dialect
2977         specific parameter incompatibility error message.
2979 2024-04-23  Jakub Jelinek  <jakub@redhat.com>
2981         * lang.opt (fdef=, fmod=): Spelling fix: recognise -> recognize.
2983 2024-04-23  Jakub Jelinek  <jakub@redhat.com>
2985         * lang.opt (fuse-list=): Spelling fix: finalializations ->
2986         finalizations.
2988 2024-04-22  Gaius Mulley  <gaiusmod2@gmail.com>
2990         PR modula2/114811
2991         * gm2-compiler/M2GenGCC.mod (FoldBinarySet): Add condition
2992         checking to ensure op2 and op3 are fully resolved before
2993         type checking is performed.
2995 2024-04-22  Gaius Mulley  <gaiusmod2@gmail.com>
2997         PR modula2/114807
2998         * gm2-compiler/M2Check.mod (checkUnbounded): Remove unused
2999         local variables.
3000         (constCheckMeta): Include check for IsReallyPointer in the
3001         failure case.
3002         * gm2-compiler/M2Quads.mod (MoveWithMode): Remove CopyConstString.
3003         * gm2-compiler/SymbolTable.def (IsHiddenReallyPointer): Export.
3004         * gm2-compiler/SymbolTable.mod (SkipHiddenType): Remove.
3005         (IsReallyPointer): Include IsHiddenReallyPointer test.
3007 2024-04-20  Gaius Mulley  <gaiusmod2@gmail.com>
3009         PR modula2/112893
3010         * gm2-compiler/M2Check.mod (GetProcedureProcType): Import.
3011         (getType): Return value using GetProcedureProcType if sym is a
3012         procedure.
3013         * gm2-compiler/M2Range.mod (FoldTypeExpr): Remove quad if
3014         expression is type compatible.
3015         * gm2-compiler/SymbolTable.def (GetProcedureProcType): New
3016         procedure function.
3017         * gm2-compiler/SymbolTable.mod (Procedure): Add ProcedureType.
3018         (MakeProcedure): Initialize ProcedureType.
3019         (PutParam): Call AddProcedureProcTypeParam.
3020         (PutVarParam): Call AddProcedureProcTypeParam.
3021         (AddProcedureProcTypeParam): New procedure.
3022         (GetProcedureProcType): New procedure function.
3024 2024-04-16  Gaius Mulley  <gaiusmod2@gmail.com>
3026         PR modula2/114745
3027         * gm2-compiler/M2Code.mod (DumpLangDecl): Replace with ...
3028         (GetDumpDecl): ... this.
3029         (DumpLangGimple): Replace with ...
3030         (GetDumpGimple): ... this.
3031         * gm2-compiler/M2GenGCC.mod:
3032         * gm2-compiler/M2LangDump.mod (GetDumpLangQuadFilename): Replace with ...
3033         (GetDumpQuadFilename): ... this.
3034         (GetDumpLangDeclFilename): Replace with ...
3035         (GetDumpDeclFilename): ... this.
3036         (GetDumpLangGimpleFilename): Replace with ...
3037         (GetDumpGimpleFilename): ... this.
3038         * gm2-compiler/M2Options.def (GetDumpLangDeclFilename): New
3039         procedure function.
3040         (GetDumpDeclFilename): Ditto.
3041         (SetDumpLangDeclFilename): New procedure.
3042         (SetDumpDeclFilename): Ditto.
3043         (GetDumpLangQuadFilename): New procedure function.
3044         (GetDumpQuadFilename): Ditto
3045         (SetDumpLangQuadFilename): New procedure.
3046         (SetDumpQuadFilename): Ditto.
3047         (GetDumpLangGimpleFilename): New procedure function.
3048         (GetDumpGimpleFilename): Ditto.
3049         (SetDumpLangGimpleFilename): New procedure.
3050         (SetDumpGimpleFilename): Ditto.
3051         (GetDumpLangGimple): New procedure function.
3052         (SetM2Dump): New procedure.
3053         (GetDumpGimple): New procedure function.
3054         (GetDumpQuad): Ditto.
3055         (GetDumpDecl): Ditto.
3056         * gm2-compiler/M2Options.mod (DumpLangDeclFilename): Remove.
3057         (DumpLangQuadFilename): Ditto.
3058         (DumpLangGimpleFilename): Ditto.
3059         (DumpDeclFilename): New variable.
3060         (DumpQuadFilename): Ditto.
3061         (DumpGimpleFilename): Ditto.
3062         (DebugTraceTree): New variable.
3063         (SetQuadDebugging): Rewrite.
3064         (GetDumpLangDeclFilename): Replace with ...
3065         (GetDumpDeclFilename): ... this.
3066         (SetDumpLangQuadFilename): Replace with ...
3067         (SetDumpQuadFilename): ... this.
3068         (GetDumpLangGimpleFilename): Replace with ...
3069         (GetDumpGimpleFilename): ... this.
3070         (SetDumpLangGimpleFilename): Replace with ...
3071         (SetDumpGimpleFilename): ... this.
3072         (GetDumpLangGimple): Remove.
3073         (MatchDump): New procedure function.
3074         (SetM2Dump): New procedure.
3075         (GetDumpGimple): New procedure function.
3076         (GetDumpQuad): Ditto.
3077         (GetDumpDecl): Ditto.
3078         (GetDumpLangGimple): Ditto.
3079         * gm2-compiler/M2Quads.mod (BreakAtQuad): Assigned to 140.
3080         (BuildTypeCoercion): Add ConstExpr parameter.
3081         Check for const parameter in a const expression.
3082         Create a constant temporary if in a const expression.
3083         (BuildCastFunction): Pass ConstExpr to BuildTypeCoercion.
3084         (BuildFunctionCall): Pass ConstExpr to BuildTypeCoercion.
3085         * gm2-compiler/PCSymBuild.mod (buildConstFunction): Test for Cast
3086         and call InitConvert.
3087         (ErrorConstFunction): Add CAST to the error message.
3088         * gm2-compiler/SymbolTable.mod (GetConstStringContent): Remove
3089         unused procedure.
3090         * gm2-gcc/m2decl.cc (m2decl_DeclareKnownConstant): Copy value
3091         and change type of value.
3092         * gm2-gcc/m2options.h (M2Options_GetDumpLangDeclFilename): Remove.
3093         (M2Options_SetDumpLangDeclFilename): Ditto.
3094         (M2Options_GetDumpLangQuadFilename): Ditto.
3095         (M2Options_SetDumpLangQuadFilename): Ditto.
3096         (M2Options_GetDumpLangGimpleFilename): Ditto.
3097         (M2Options_SetDumpLangGimpleFilename): Ditto.
3098         (M2Options_GetDumpLangGimple): Ditto.
3099         (M2Options_GetDumpDeclFilename): New function.
3100         (M2Options_SetDumpDeclFilename): Ditto.
3101         (M2Options_GetDumpQuadFilename): Ditto.
3102         (M2Options_SetDumpQuadFilename): Ditto.
3103         (M2Options_GetDumpGimpleFilename): Ditto.
3104         (M2Options_SetDumpGimpleFilename): Ditto.
3105         (M2Options_SetM2Dump): Ditto.
3106         (M2Options_GetDumpGimple): Ditto.
3107         * gm2-gcc/m2pp.cc (GM2): New define.
3108         (m2pp_type_lowlevel): Remove linefeed.
3109         (m2pp_identifier): Add type description for const.
3110         (m2pp_assignment): Display lhs/rhs types.
3111         (m2pp_dump_gimple): Replace GetDumpLangGimple with GetDumpGimple.
3112         * gm2-lang.cc (ENABLE_QUAD_DUMP_ALL): Remove.
3113         (ENABLE_M2DUMP_ALL): New define.
3114         (gm2_langhook_handle_option): Remove commented options
3115         OPT_fdump_lang_all, OPT_fdump_lang_decl_, OPT_fdump_lang_gimple,
3116         OPT_fdump_lang_gimple_, OPT_fdump_lang_quad and
3117         OPT_fdump_lang_quad_.
3118         Add commented options OPT_fm2_dump_, OPT_fm2_dump_decl_,
3119         OPT_fm2_dump_gimple_ and OPT_fm2_dump_quad_.
3121 2024-04-09  Gaius Mulley  <gaiusmod2@gmail.com>
3123         * tools-src/makeSystem: Invoke ${COMPILER} once and adjust
3124         the echo string to expand the shell variables with -wrapper
3125         gdb, --args.
3127 2024-04-09  Gaius Mulley  <gaiusmod2@gmail.com>
3129         PR modula2/114648
3130         * gm2-compiler/M2Options.mod (LineDirectives): Initially
3131         set to true.
3133 2024-04-06  Gaius Mulley  <gaiusmod2@gmail.com>
3135         PR modula2/114617
3136         * gm2-compiler/M2GenGCC.mod (CodeStatememt): Add quad trace.
3137         (ResolveConstantExpressions): Add parameter p to FoldIfLess,
3138         FoldIfGre, FoldIfLessEqu, FoldIfGreEqu, FoldIfEqu, FoldIfNotEqu,
3139         FoldIfIn and FoldIfNotIn.
3140         (CodeInline): Add constExpr variable and pass it to GetQuadOtok.
3141         (CodeReturnValue): Ditto.
3142         (CodeParam): Ditto.
3143         (FoldStringLength): Ditto.
3144         (FoldStringConvertM2nul): Ditto.
3145         (FoldStringConvertCnul): Ditto.
3146         (DeclaredOperandsBecomes): Ditto.
3147         (TypeCheckBecomes): Ditto.
3148         (PerformFoldBecomes): Ditto.
3149         (CodeBecomes): Ditto.
3150         (CheckElementSetTypes): Ditto.
3151         (CodeBinarySet): Ditto.
3152         (PerformCodeIfLess): Ditto.
3153         (PerformCodeIfGre): Ditto.
3154         (PerformCodeIfLessEqu): Ditto.
3155         (PerformCodeIfGreEqu): Ditto.
3156         (PerformCodeIfEqu): Ditto.
3157         (PerformCodeIfNotEqu): Ditto.
3158         (IsValidExpressionRelOp): Ditto.
3159         (PerformCodeIfIn): Ditto.
3160         (PerformCodeIfNotIn): Ditto.
3161         (CodeXIndr): Ditto.
3162         (QuadCondition): New procedure function.
3163         (IsBooleanRelOpPattern): Ditto.
3164         (FoldBooleanRelopPattern): Ditto.
3165         (FoldIfGre): Check for boolean relop constant expression and
3166         add parameter p.
3167         (FoldIfLessEqu): Ditto.
3168         (FoldIfIn): Ditto.
3169         (FoldIfEqu): Ditto.
3170         (FoldIfNotIn): Ditto.
3171         (FoldIfGreEqu): New procedure.
3172         (FoldIfNotEqu): Ditto.
3173         * gm2-compiler/M2Optimize.mod (ReduceBranch): Add constExpr
3174         variable and pass it to GetQuadOtok.
3175         * gm2-compiler/M2Quads.def (IsBecomes): New procedure function.
3176         (IsDummy): Ditto.
3177         (IsQuadConstExpr): Ditto.
3178         (SetQuadConstExpr): Ditto.
3179         (GetQuadDest): New procedure.
3180         (GetQuadOp1): New procedure.
3181         (GetQuadOp2): New procedure.
3182         (GetQuadOp3): New procedure.
3183         (GetQuadOtok): New procedure.
3184         (GetQuadOTypetok): New procedure.
3185         (PutQuadOtok): New procedure.
3186         (IsInConstParameters): New procedure function.
3187         * gm2-compiler/M2Quads.mod (IsBecomes): New procedure function.
3188         (IsDummy): Ditto.
3189         (IsQuadConstExpr): Ditto.
3190         (SetQuadConstExpr): Ditto.
3191         (GetQuadDest): New procedure.
3192         (GetQuadOp1): New procedure.
3193         (GetQuadOp2): New procedure.
3194         (GetQuadOp3): New procedure.
3195         (GetQuadOtok): New procedure.
3196         (GetQuadOTypetok): New procedure.
3197         (PutQuadOtok): New procedure.
3198         (IsInConstParameters): New procedure function.
3199         (ConstStack): Remove to ...
3200         (ConstExprStack): ... this.
3201         (ConstParamStack): New variable and initialize.
3202         (QuadFrame): New field ConstExpr.
3203         (GetQuadOtok): Add parameter constExpr and assign.
3204         (PutQuadOtok): Add constExpr parameter and assign.
3205         (PutQuadOType): Ditto.
3206         (GetQuadOTypetok): Ditto.
3207         (EraseQuad): Assign ConstExpr to FALSE.
3208         (FoldSubrange): Set ConstExpr to FALSE in BecomesOp.
3209         (PushInConstParameters): New procedure.
3210         (PopInConstParameters): New procedure.
3211         (IsInConstParameters): New procedure function.
3212         * gm2-compiler/M2SymInit.mod (IssueConditional): Add
3213         constExpr boolean variable.
3214         (CheckReadBeforeInitQuad): Ditto.
3215         (trashParam): Ditto.
3216         * gm2-compiler/P3Build.bnf (ConstExpression): Call
3217         PushInConstExpression and PopInConstExpression.
3218         (ConstSetOrQualidentOrFunction): Call
3219         PushInConstParameters and PopInConstParameters.
3220         * gm2-compiler/PCBuild.bnf (ConstExpression): Call
3221         PushInConstExpression and PopInConstExpression.
3222         * gm2-compiler/PHBuild.bnf: Ditto
3223         * gm2-gcc/m2expr.cc (m2expr_BuildCondIfExpression): New
3224         function.
3225         * gm2-gcc/m2expr.def (BuildCondIfExpression): New prototype.
3226         * gm2-gcc/m2expr.h (m2expr_BuildCondIfExpression): New function.
3228 2024-04-05  Christophe Lyon  <christophe.lyon@linaro.org>
3230         * Make-lang.in (m2.install-dvi): New rule.
3232 2024-04-02  Gaius Mulley  <gaiusmod2@gmail.com>
3234         PR modula2/114565
3235         * gm2-compiler/M2GenGCC.mod (CodeStatement): Test
3236         GetDebugTraceQuad before calling DisplayQuad.
3237         * gm2-compiler/M2LexBuf.mod (NumberIO): Import CardToStr.
3238         (GetToken): Test GetDebugTraceToken before writing the
3239         token number or token line.
3240         * gm2-compiler/M2Options.def (SetDebugTraceQuad): Rename to
3241         (SetM2DebugTraceFilter): ...this.
3242         (SetDebugTraceAPI): Remove.
3243         (GetDebugTraceQuad): New procedure function.
3244         (GetDebugTraceTree): Ditto.
3245         (GetDebugTraceToken): Ditto.
3246         (GetDebugTraceLine): Ditto.
3247         (GetDebugFunctionLineNumbers): Ditto.
3248         * gm2-compiler/M2Options.mod (DebugFunctionLineNumbers): New
3249         boolean variable.
3250         (DebugTraceQuad): Ditto.
3251         (DebugTraceTree): Ditto.
3252         (DebugTraceLine): Ditto.
3253         (DebugTraceToken): Ditto.
3254         (errors1): New procedure.
3255         (SetDebugTraceQuad): Remove.
3256         (SetM2DebugTraceFilter): New procedure implemented.
3257         (SetM2DebugTrace): Ditto.
3258         (GetDebugTraceQuad): Ditto.
3259         (GetDebugTraceToken ): Ditto.
3260         (GetDebugTraceLine): Ditto.
3261         (SetDebugTraceLine): Remove.
3262         * gm2-compiler/M2Quads.mod (GenQuadOTrash): Test
3263         GetDebugTraceQuad and call DisplayQuad.
3264         (GenQuadOTypetok): Ditto.
3265         * gm2-compiler/SymbolTable.mod: Replace
3266         DebugFunctionLineNumbers with GetDebugFunctionLineNumbers.
3267         * gm2-gcc/init.cc (_M2_M2LangDump_init): Add prototype.
3268         (init_PerCompilationInit): Add call.
3269         * gm2-gcc/m2misc.cc (m2misc_cerror): New function.
3270         (m2misc_error): Ditto.
3271         * gm2-gcc/m2misc.def (error): New procedure.
3272         (cerror): Ditto.
3273         * gm2-gcc/m2misc.h (m2misc_cerror): New prototype.
3274         (m2misc_error): Ditto.
3275         * gm2-gcc/m2options.h (M2Options_SetDebugTraceQuad): New
3276         prototype.
3277         (M2Options_SetDebugTraceAPI): Remove.
3278         (M2Options_GetDebugTraceToken): New prototype.
3279         (M2Options_GetDebugTraceLine): Ditto.
3280         (M2Options_SetDebugFunctionLineNumbers): Ditto.
3281         (M2Options_GetDebugFunctionLineNumbers): Ditto.
3282         (M2Options_SetM2DebugTraceFilter): Ditto.
3283         * gm2-lang.cc (gm2_langhook_init_options): Remove
3284         OPT_fdebug_trace_quad case.
3285         Remove OPT_fdebug_trace_api case.
3286         Add OPT_fm2_debug_trace_ case.
3287         * lang.opt (fm2-debug-trace): New option.
3288         (fdebug-trace-api): Remove.
3289         (fdebug-trace-quad): Remove.
3290         * m2.flex (m2flex_M2Error): Check s for NULL.
3291         (skipnewline): New function.
3292         (consumeLine): Call traceline.
3294 2024-04-01  Gaius Mulley  <gaiusmod2@gmail.com>
3296         PR modula2/114548
3297         * gm2-compiler/M2Quads.mod (ConvertToAddress): Pass
3298         procedure, false parameters to BuildConvertFunction.
3299         (PushOne): Pass procedure, true parameters to
3300         BuildConvertFunction.
3301         Remove usused parameter internal.
3302         (BuildPseudoBy): Remove parameter to PushOne.
3303         (BuildIncProcedure): Ditto.
3304         (BuildDecProcedure): Ditto.
3305         (BuildFunctionCall): Add ConstExpr parameter to
3306         BuildPseudoFunctionCall.
3307         (BuildConstFunctionCall): Add procedure and true to
3308         BuildConvertFunction.
3309         (BuildPseudoFunctionCall): Add ConstExpr parameter.
3310         Pass ProcSym and ConstExpr to BuildLengthFunction,
3311         BuildConvertFunction, BuildOddFunction, BuildAbsFunction,
3312         BuildCapFunction, BuildValFunction, BuildChrFunction,
3313         BuildOrdFunction, BuildIntFunction, BuildTruncFunction,
3314         BuildFloatFunction, BuildAddAdrFunction, BuildSubAdrFunction,
3315         BuildDifAdrFunction, BuildCastFunction, BuildReFunction,
3316         BuildImFunction and BuildCmplxFunction.
3317         (BuildAddAdrFunction): Add ProcSym, ConstExpr parameters and
3318         check for constant parameters.
3319         (BuildSubAdrFunction): Ditto.
3320         (BuildDifAdrFunction): Ditto.
3321         (ConstExprError): Ditto.
3322         (BuildLengthFunction): Ditto.
3323         (BuildOddFunction): Ditto.
3324         (BuildAbsFunction): Ditto.
3325         (BuildCapFunction): Ditto.
3326         (BuildChrFunction): Ditto.
3327         (BuildOrdFunction): Ditto.
3328         (BuildIntFunction): Ditto.
3329         (BuildValFunction): Ditto.
3330         (BuildCastFunction): Ditto.
3331         (BuildConvertFunction): Ditto.
3332         (BuildTruncFunction): Ditto.
3333         (BuildFloatFunction): Ditto.
3334         (BuildReFunction): Ditto.
3335         (BuildImFunction): Ditto.
3336         (BuildCmplxFunction): Ditto.
3338 2024-03-31  Christophe Lyon  <christophe.lyon@linaro.org>
3340         * Make-lang.in (m2.install-info): Fix rule.
3342 2024-03-31  Christophe Lyon  <christophe.lyon@linaro.org>
3344         * Make-lang.in (install-html): New rule.
3346 2024-03-28  Gaius Mulley  <gaiusmod2@gmail.com>
3348         PR modula2/114520
3349         * gm2-compiler/P0SyntaxCheck.bnf (DetectImport): New
3350         procedure.
3351         (EnableImportCheck): New boolean.
3352         (Expect): Call DetectImport.
3353         (Export): Set EnableImportCheck TRUE before ';' and FALSE
3354         afterwards.
3356 2024-03-28  Gaius Mulley  <(no_default)>
3358         PR modula2/114517
3359         * gm2-compiler/M2Options.def (SetCpp): Add comment.
3360         (GetCpp): Move after SetCpp.
3361         (GetLineDirectives): New procedure function.
3362         * gm2-compiler/M2Options.mod (GetLineDirectives): New
3363         procedure function.
3364         * gm2-gcc/m2options.h (M2Options_GetLineDirectives): New
3365         prototype.
3366         * gm2-lang.cc (gm2_langhook_init_options): OPT_fcpp only
3367         assert if !value.
3368         * m2.flex: Test GetLineDirectives before changing to LINE0
3369         state.
3371 2024-03-28  Gaius Mulley  <gaiusmod2@gmail.com>
3373         * target-independent/m2/Builtins.texi: Rebuilt.
3374         * target-independent/m2/gm2-libs.texi: Rebuilt.
3376 2024-03-26  Gaius Mulley  <gaiusmod2@gmail.com>
3378         PR modula2/114478
3379         * gm2-gcc/m2builtins.cc (struct builtin_macro_definition): New struct.
3380         (lookup_builtin_macro): New function.
3381         (m2builtins_BuildBuiltinTree): Rewrite to lookup builtin function
3382         and builtin macro.
3383         (lookup_builtin_function): New function.
3384         (define_builtin): Rename parameter type to prototype push macro
3385         definition to builtin_macros vector.
3386         (define_builtin_ext): New function.
3387         (define_builtin_math): New function.
3388         (m2builtins_init): Add isgreater, isless, isgreaterequal,
3389         islessequal, islessgreater, isunordered, isnormal to macro definitions.
3390         * gm2-libs/Builtins.def (isgreater): New procedure function.
3391         (isgreaterf): Ditto.
3392         (isgreaterl): Ditto.
3393         (isgreaterequal): Ditto.
3394         (isgreaterequalf): Ditto.
3395         (isgreaterequall): Ditto.
3396         (isless): Ditto.
3397         (islessf): Ditto.
3398         (islessl): Ditto.
3399         (islessequal): Ditto.
3400         (islessequalf): Ditto.
3401         (islessequall): Ditto.
3402         (islessgreater): Ditto.
3403         (islessgreaterf): Ditto.
3404         (islessgreaterl): Ditto.
3405         (isunordered): Ditto.
3406         (isunorderedf): Ditto.
3407         (isunorderedl): Ditto.
3408         (iseqsig): Ditto.
3409         (iseqsigf): Ditto.
3410         (iseqsigl): Ditto.
3411         (isnormal): Ditto.
3412         (isnormalf): Ditto.
3413         (isnormall): Ditto.
3414         (isinf_sign): Ditto.
3415         (isinf_signf): Ditto.
3416         (isinf_signl): Ditto.
3417         * gm2-libs/Builtins.mod (isgreater): New procedure function.
3418         (isgreaterf): Ditto.
3419         (isgreaterl): Ditto.
3420         (isgreaterequal): Ditto.
3421         (isgreaterequalf): Ditto.
3422         (isgreaterequall): Ditto.
3423         (isless): Ditto.
3424         (islessf): Ditto.
3425         (islessl): Ditto.
3426         (islessequal): Ditto.
3427         (islessequalf): Ditto.
3428         (islessequall): Ditto.
3429         (islessgreater): Ditto.
3430         (islessgreaterf): Ditto.
3431         (islessgreaterl): Ditto.
3432         (isunordered): Ditto.
3433         (isunorderedf): Ditto.
3434         (isunorderedl): Ditto.
3435         (iseqsig): Ditto.
3436         (iseqsigf): Ditto.
3437         (iseqsigl): Ditto.
3438         (isnormal): Ditto.
3439         (isnormalf): Ditto.
3440         (isnormall): Ditto.
3441         (isinf_sign): Ditto.
3442         (isinf_signf): Ditto.
3443         (isinf_signl): Ditto.
3445 2024-03-25  Gaius Mulley  <gaiusmod2@gmail.com>
3447         * Make-lang.in (doc/m2.pdf): Add line break.
3448         * target-independent/m2/Builtins.texi: Rebuilt.
3449         * target-independent/m2/gm2-libs.texi: Rebuilt.
3451 2024-03-23  Gaius Mulley  <gaiusmod2@gmail.com>
3453         PR modula2/114444
3454         * gm2-compiler/M2Quads.mod (BuildTruncFunction): Correct
3455         error format specifier.
3456         (BuildFloatFunction): Correct error format specifier.
3458 2024-03-23  Gaius Mulley  <gaiusmod2@gmail.com>
3460         PR modula2/114443
3461         * m2.flex: Call AddTokCharStar with a stringtok if
3462         end of line is reached without a closing quote.
3464 2024-03-22  Gaius Mulley  <gaiusmod2@gmail.com>
3466         PR modula2/114422
3467         * gm2-compiler/M2Quads.mod (BuildConstructor): Add escape
3468         character.
3470 2024-03-21  Gaius Mulley  <gaiusmod2@gmail.com>
3472         PR modula2/113836
3473         * Make-lang.in (GM2_C_OBJS): Add m2/gm2-gcc/m2pp.o.
3474         (m2/m2pp.o): Remove rule.
3475         (GM2-COMP-BOOT-DEFS): Add M2LangDump.def.
3476         (GM2-COMP-BOOT-MODS): Add M2LangDump.mod.
3477         (GM2-GCC-DEFS): Add M2LangDump.def.
3478         (GM2-GCC-MODS): Add M2LangDump.mod.
3479         * gm2-compiler/M2CaseList.mod (WriteCase): Rewrite.
3480         * gm2-compiler/M2Code.mod (DoModuleDeclare): Call
3481         DumpFilteredResolver depending upon DumpLangDecl.
3482         (DoCodeBlock): Call CreateDumpGimple depending upon
3483         DumpLangGimple.
3484         (Code): Replace DisplayQuadList blocks with DumpQuadruples.
3485         (DisplayQuadsInScope): Remove.
3486         (DisplayQuadNumbers): Remove.
3487         (CodeBlock): Rewrite.
3488         * gm2-compiler/M2GCCDeclare.def (IncludeDumpSymbol): New procedure.
3489         (DumpFilteredResolver): New procedure.
3490         (DumpFilteredDefinitive): New procedure.
3491         * gm2-compiler/M2GCCDeclare.mod (IncludeDumpSymbol): New procedure.
3492         (DumpFilteredResolver): New procedure.
3493         (DumpFilteredDefinitive): New procedure.
3494         (doInclude): Rewrite to use GetDumpFile.
3495         (WatchIncludeList): Remove fixed debugging value.
3496         (doExclude): Rewrite to use GetDumpFile.
3497         (DeclareTypesConstantsProceduresInRange): Remove fixed debugging
3498         values.
3499         (PreAddModGcc): Rename parameter t as tree.
3500         (IncludeGetNth): Rewrite to use GetDumpFile.
3501         (IncludeType): Ditto.
3502         (IncludeSubscript): Ditto.
3503         (PrintLocalSymbol): Ditto.
3504         (PrintLocalSymbols): Ditto.
3505         (IncludeGetVarient): Ditto.
3506         (PrintDeclared): Ditto.
3507         (PrintAlignment): Ditto.
3508         (PrintDecl): Ditto.
3509         (PrintScope): Ditto.
3510         (PrintProcedure): Ditto.
3511         (PrintSym): Ditto.
3512         (PrintSymbol): Ditto.
3513         (PrintTerse): Ditto.
3514         * gm2-compiler/M2Options.def (GetDumpLangDeclFilename): New
3515         procedure function.
3516         (SetDumpLangDeclFilename): New procedure.
3517         (GetDumpLangQuadFilename): New procedure function.
3518         (SetDumpLangQuadFilename): New procedure.
3519         (GetDumpLangGimpleFilename): New procedure function.
3520         (SetDumpLangGimpleFilename): New procedure.
3521         (SetM2DumpFilter): New procedure.
3522         (GetM2DumpFilter): New procedure function.
3523         (GetDumpLangGimple): New procedure function.
3524         * gm2-compiler/M2Options.mod (GetDumpLangDeclFilename): New
3525         procedure function.
3526         (SetDumpLangDeclFilename): New procedure.
3527         (GetDumpLangQuadFilename): New procedure function.
3528         (SetDumpLangQuadFilename): New procedure.
3529         (GetDumpLangGimpleFilename): New procedure function.
3530         (SetDumpLangGimpleFilename): New procedure.
3531         (SetM2DumpFilter): New procedure.
3532         (GetM2DumpFilter): New procedure function.
3533         (GetDumpLangGimple): New procedure function.
3534         * gm2-compiler/M2Quads.def (DumpQuadruples): New procedure.
3535         * gm2-compiler/M2Quads.mod (DumpUntil): New procedure.
3536         (GetCtorInit): New procedure function.
3537         (GetCtorFini): New procedure function.
3538         (DumpQuadrupleFilter): New procedure function.
3539         (DumpQuadrupleAll): New procedure.
3540         (DisplayQuadList): Remove procedure.
3541         (DumpQuadruples): New procedure.
3542         (DisplayQuadRange): Rewrite.
3543         (DisplayQuad): Ditto.
3544         (DisplayProcedureAttributes): Ditto.
3545         (WriteOperator): Ditto.
3546         (WriteMode): Ditto.
3547         * gm2-compiler/M2Scope.mod (ForeachScopeBlockDo2): Replace
3548         DisplayQuadruples with TraceQuadruples.
3549         (ForeachScopeBlockDo3): Replace DisplayQuadruples with
3550         TraceQuadruples.
3551         * gm2-compiler/SymbolConversion.def (Gcc2Mod): New procedure function.
3552         * gm2-compiler/SymbolConversion.mod: New procedure function.
3553         * gm2-gcc/m2misc.cc (m2misc_DebugTree): New function.
3554         (m2misc_DebugTreeChain): New function.
3555         * gm2-gcc/m2options.h (M2Options_GetDumpLangDeclFilename): New
3556         prototype.
3557         (M2Options_SetDumpLangDeclFilename): New prototype.
3558         (M2Options_GetDumpLangQuadFilename): New prototype.
3559         (M2Options_SetDumpLangQuadFilename): New prototype.
3560         (M2Options_GetDumpLangGimpleFilename): New prototype.
3561         (M2Options_SetDumpLangGimpleFilename): New prototype.
3562         (M2Options_GetDumpLangGimple): New prototype.
3563         (M2Options_SetM2DumpFilter): New prototype.
3564         (M2Options_GetM2DumpFilter): New prototype.
3565         * m2pp.cc: Move to...
3566         * gm2-gcc/m2pp.cc: ...here.
3567         * m2pp.h: Move to...
3568         * gm2-gcc/m2pp.h: ...here.
3569         * gm2-gcc/m2statement.cc (m2statement_BuildEndFunctionCode): Call
3570         m2pp_dump_gimple.
3571         * gm2-lang.cc (ENABLE_QUAD_DUMP_ALL): New define.
3572         (gm2_langhook_init_options): Add switch cases for proposed new
3573         command line options.
3574         * gm2-libs/DynamicStrings.def (ReverseIndex): New procedure
3575         function.
3576         * gm2-libs/DynamicStrings.mod: New procedure function.
3577         * gm2-compiler/M2LangDump.def: New file.
3578         * gm2-compiler/M2LangDump.mod: New file.
3579         * gm2-gcc/m2langdump.h: New file.
3580         * gm2-gcc/m2pp.def: New file.
3582 2024-03-21  Gaius Mulley  <gaiusmod2@gmail.com>
3584         PR modula2/114418
3585         * gm2-compiler/PCSymBuild.mod (PushConstFunctionType): Check
3586         func against NulSym and issue an error.
3588 2024-03-18  Gaius Mulley  <gaiusmod2@gmail.com>
3590         PR modula2/114380
3591         * gm2-compiler/SymbolTable.mod (GetLowestType): Do not
3592         skip over a set type, but return sym.
3594 2024-03-17  Gaius Mulley  <gaiusmod2@gmail.com>
3596         PR modula2/114296
3597         * gm2-compiler/M2ALU.mod (ElementsSolved): Add tokenno parameter.
3598         Add constant checks and generate error messages.
3599         (EvalSetValues): Pass tokenno parameter to ElementsSolved.
3600         * gm2-compiler/M2LexBuf.mod (stop): New procedure.
3601         (MakeVirtualTok): Call stop if caret = BadTokenNo.
3602         * gm2-compiler/M2Quads.def (BuildNulExpression): Add tokpos
3603         parameter.
3604         (BuildSetStart): Ditto.
3605         (BuildEmptySet): Ditto.
3606         (BuildConstructorEnd): Add startpos parameter.
3607         (BuildTypeForConstructor): Add tokpos parameter.
3608         * gm2-compiler/M2Quads.mod (BuildNulExpression): Add tokpos
3609         parameter and push tokpos to the quad stack.
3610         (BuildSetStart): Add tokpos parameter and push tokpos.
3611         (BuildSetEnd): Rewrite.
3612         (BuildEmptySet): Add tokpos parameter and push tokpos with
3613         the set type.
3614         (BuildConstructorStart): Pop typepos.
3615         (BuildConstructorEnd): Add startpos parameter.
3616         Create valtok from startpos and cbratokpos.
3617         (BuildTypeForConstructor): Add tokpos parameter.
3618         * gm2-compiler/M2Range.def (InitAssignmentRangeCheck): Rename
3619         d to des and e to expr.
3620         Add destok and exprtok parameters.
3621         * gm2-compiler/M2Range.mod (InitAssignmentRangeCheck): Rename
3622         d to des and e to expr.
3623         Add destok and exprtok parameters.
3624         Save destok and exprtok into range record.
3625         (FoldAssignment): Pass exprtok to TryDeclareConstant.
3626         * gm2-compiler/P3Build.bnf (ComponentValue): Rewrite.
3627         (Constructor): Rewrite.
3628         (ConstSetOrQualidentOrFunction): Rewrite.
3629         (SetOrQualidentOrFunction): Rewrite.
3630         * gm2-compiler/PCBuild.bnf (ConstSetOrQualidentOrFunction): Rewrite.
3631         (SetOrQualidentOrFunction): Rewrite.
3632         * gm2-compiler/PHBuild.bnf (Constructor): Rewrite.
3633         (ConstSetOrQualidentOrFunction): Rewrite.
3635 2024-03-14  Gaius Mulley  <gaiusmod2@gmail.com>
3637         PR modula2/114294
3638         * gm2-compiler/M2Quads.mod (BuildConstHighFromSym):
3639         Call PutConst to assign the type Cardinal in the result
3640         constant.
3642 2024-03-14  Gaius Mulley  <gaiusmod2@gmail.com>
3644         PR modula2/114333
3645         * gm2-compiler/M2GenGCC.mod (CodeStatement): Remove op1, op2 and
3646         op3 parameters to CodeIfLess, CodeIfLessEqu, CodeIfGreEqu, CodeIfGre,
3647         CodeIfIn, CodeIfNotIn.
3648         (CodeIfLess): Rewrite.
3649         (PerformCodeIfLess): New procedure.
3650         (CodeIfLess): Rewrite.
3651         (PerformCodeIfLess): New procedure.
3652         (CodeIfLessEqu): Rewrite.
3653         (PerformCodeIfLessEqu): New procedure.
3654         (CodeIfGreEqu): Rewrite.
3655         (PerformCodeIfGreEqu): New procedure.
3656         (CodeIfGre): Rewrite.
3657         (PerformCodeIfGre): New procedure.
3658         (CodeIfIn): Rewrite.
3659         (PerformCodeIfIn): New procedure.
3660         (CodeIfNotIn): Rewrite.
3661         (PerformCodeIfNotIn): New procedure.
3663 2024-03-14  Gaius Mulley  <gaiusmod2@gmail.com>
3665         PR modula2/114333
3666         * gm2-compiler/M2Check.mod (checkUnbounded): New procedure
3667         function.
3668         (checkArrayTypeEquivalence): Extend checking to cover unbounded
3669         arrays, arrays and constants.
3670         (IsTyped): Simplified the expression and corrected a test for
3671         IsConstructor.
3672         (checkTypeKindViolation): New procedure function.
3673         (doCheckPair): Call checkTypeKindViolation.
3674         * gm2-compiler/M2GenGCC.mod (CodeStatement): Remove parameters
3675         to CodeEqu and CodeNotEqu.
3676         (PerformCodeIfEqu): New procedure.
3677         (CodeIfEqu): Rewrite.
3678         (PerformCodeIfNotEqu): New procedure.
3679         (CodeIfNotEqu): Rewrite.
3680         * gm2-compiler/M2Quads.mod (BuildRelOpFromBoolean): Correct
3681         comment.
3683 2024-03-11  Gaius Mulley  <gaiusmod2@gmail.com>
3685         PR modula2/114295
3686         * gm2-compiler/M2Batch.mod (MakeProgramSource): Call PutDeclared
3687         if the module is known.
3688         (MakeDefinitionSource): Ditto.
3689         (MakeImplementationSource): Ditto.
3690         * gm2-compiler/M2Comp.mod (ExamineHeader): New procedure.
3691         (ExamineCompilationUnit): Rewrite.
3692         (PeepInto): Rewrite.
3693         * gm2-compiler/M2Error.mod (NewError): Remove default call to
3694         GetTokenNo.
3695         * gm2-compiler/M2Quads.mod (callRequestDependant): Push tokno with
3696         Adr.
3697         (BuildStringAdrParam): Ditto.
3698         (doBuildBinaryOp): Push OperatorPos on the bool stack.
3699         (BuildRelOp): Ditto.
3700         * gm2-compiler/P2Build.bnf (SetType): Pass set token pos to
3701         BuildSetType.
3702         (PointerType): Pass pointer token pos to BuildPointerType.
3703         * gm2-compiler/P2SymBuild.def (BuildPointerType): Add parameter
3704         pointerpos.
3705         (BuildSetType): Add parameter setpos.
3706         * gm2-compiler/P2SymBuild.mod (BuildPointerType): Add parameter
3707         pointerpos.  Build combined token and use it when creating a
3708         pointer type.
3709         (BuildSetType): Add parameter setpos.  Build combined token and
3710         use it when creating a set type.
3711         * gm2-compiler/SymbolTable.mod (DebugUnknownToken): New constant.
3712         (CheckTok): New procedure function.
3713         (MakeProcedure): Call CheckTok.
3714         (MakeRecord): Ditto.
3715         (MakeVarient): Ditto.
3716         (MakeEnumeration): Ditto.
3717         (MakeHiddenType): Ditto.
3718         (MakeConstant): Ditto.
3719         (MakeConstStringCnul): Ditto.
3720         (MakeSubrange): Ditto.
3721         (MakeTemporary): Ditto.
3722         (MakeVariableForParam): Ditto.
3723         (MakeParameterHeapVar): Ditto.
3724         (MakePointer): Ditto.
3725         (MakeSet): Ditto.
3726         (MakeUnbounded): Ditto.
3727         (MakeProcType): Ditto.
3729 2024-03-08  Gaius Mulley  <gaiusmod2@gmail.com>
3731         * gm2-compiler/M2Quads.mod (Init): Use InitIndexTuned with
3732         default size 65K.
3733         * gm2-compiler/SymbolConversion.mod (Init): Ditto.
3734         * gm2-compiler/SymbolTable.mod (BEGIN): Ditto.
3735         * mc-boot/GM2Dependent.cc: Rebuild.
3736         * mc-boot/GM2Dependent.h: Rebuild.
3737         * mc-boot/GM2RTS.cc: Rebuild.
3738         * pge-boot/GIndexing.cc: Rebuild.
3739         * pge-boot/GIndexing.h: Rebuild.
3740         * pge-boot/GM2Dependent.cc: Rebuild.
3741         * pge-boot/GM2Dependent.h: Rebuild.
3742         * pge-boot/GM2RTS.cc: Rebuild.
3744 2024-03-07  Gaius Mulley  <gaiusmod2@gmail.com>
3746         PR modula2/109969
3747         * gm2-compiler/M2LexBuf.def (TokenToLineNo): Rename parameter.
3748         (TokenToColumnNo): Rename parameter.
3749         (TokenToLocation): Rename parameter.
3750         (FindFileNameFromToken): Rename parameter.
3751         (DumpTokens): Rewrite comment.
3752         * gm2-compiler/M2LexBuf.mod: Rewrite.
3753         * gm2-compiler/P0SyntaxCheck.bnf (CheckInsertCandidate):
3754         DumpTokens before and after inserting recovery token.
3755         * gm2-gcc/m2builtins.cc (do_target_support_exists): Add
3756         bf_c99_compl case.
3757         * gm2-libs/Indexing.def (InitIndexTuned): New procedure
3758         function.
3759         (IsEmpty): New procedure function.
3760         * gm2-libs/Indexing.mod (InitIndexTuned): New procedure
3761         function.
3762         (IsEmpty): New procedure function.
3763         (Index): New field GrowFactor.
3764         (PutIndice): Use GrowFactor to extend dynamic array.
3766 2024-03-04  Gaius Mulley  <gaiusmod2@gmail.com>
3768         PR modula2/114227
3769         * gm2-libs-iso/M2RTS.mod (ProcedureChain): Remove.
3770         (ProcedureList): Remove.
3771         (ExecuteReverse): Remove.
3772         (ExecuteTerminationProcedures): Rewrite.
3773         (ExecuteInitialProcedures): Rewrite.
3774         (AppendProc): Remove.
3775         (InstallTerminationProcedure): Rewrite.
3776         (InstallInitialProcedure): Rewrite.
3777         (InitProcList): Remove.
3778         * gm2-libs/M2Dependent.def (InstallTerminationProcedure):
3779         New procedure.
3780         (ExecuteTerminationProcedures): New procedure.
3781         (InstallInitialProcedure): New procedure.
3782         (ExecuteInitialProcedures): New procedure.
3783         * gm2-libs/M2Dependent.mod (ProcedureChain): New type.
3784         (ProcedureList): New type.
3785         (ExecuteReverse): New procedure.
3786         (ExecuteTerminationProcedures): New procedure.
3787         (ExecuteInitialProcedures): New procedure.
3788         (AppendProc): New procedure.
3789         (InstallTerminationProcedure): New procedure.
3790         (InstallInitialProcedure): New procedure.
3791         (InitProcList): New procedure.
3792         * gm2-libs/M2RTS.mod (ProcedureChain): Remove.
3793         (ProcedureList): Remove.
3794         (ExecuteReverse): Remove.
3795         (ExecuteTerminationProcedures): Rewrite.
3796         (ExecuteInitialProcedures): Rewrite.
3797         (AppendProc): Remove.
3798         (InstallTerminationProcedure): Rewrite.
3799         (InstallInitialProcedure): Rewrite.
3800         (InitProcList): Remove.
3802 2024-02-25  Gaius Mulley  <gaiusmod2@gmail.com>
3804         PR modula2/113749
3805         * Make-lang.in (BUILD-PGE-O): Add m2/pge-boot/Gwrapc.o.
3806         * gm2-libs-ch/wrapc.c (wrapc_SeekSet): New function.
3807         (wrapc_SeekEnd): Ditto.
3808         (wrapc_ReadOnly): Ditto.
3809         (wrapc_WriteOnly): Ditto.
3810         * gm2-libs/FIO.mod (SEEK_SET): Remove.
3811         (SEEK_END): Remove.
3812         (UNIXREADONLY): Remove.
3813         (UNIXWRITEONLY): Remove.
3814         (ConnectToUnix): Replace UNIXWRITEONLY with a call to WriteOnly.
3815         Replace UNIXREADONLY with a call to ReadOnly.
3816         (SetPositionFromBeginning): Replace SEEK_SET with a call to
3817         SeekSet.
3818         (SetPositionFromEnd): Replace SEEK_END with a call to
3819         SeekEnd.
3820         * gm2-libs/wrapc.def (SeekSet): New procedure function.
3821         (SeekEnd): New procedure function.
3822         (ReadOnly): New procedure function.
3823         (WriteOnly): New procedure function.
3824         * mc-boot-ch/Glibc.c (BUILD_MC_LIBC_TRACE): Undef.
3825         (check_init): New function.
3826         (tracedb): Ditto.
3827         (tracedb_open): Ditto.
3828         (tracedb_result): Ditto.
3829         (libc_read): Ditto.
3830         (libc_write): Ditto.
3831         (libc_close): Ditto.
3832         (libc_creat): Ditto.
3833         (libc_open): Ditto.
3834         (libc_lseek): Ditto.
3835         * mc-boot-ch/Gwrapc.c (wrapc_SeekSet): New function.
3836         (wrapc_SeekEnd): Ditto.
3837         (wrapc_ReadOnly): Ditto.
3838         (wrapc_WriteOnly): Ditto.
3839         * mc-boot/GDynamicStrings.cc: Rebuilt.
3840         * mc-boot/GFIO.cc: Ditto.
3841         * mc-boot/GIndexing.cc: Ditto.
3842         * mc-boot/GM2Dependent.cc: Ditto.
3843         * mc-boot/GM2EXCEPTION.cc: Ditto.
3844         * mc-boot/GPushBackInput.cc: Ditto.
3845         * mc-boot/GRTExceptions.cc: Ditto.
3846         * mc-boot/GRTint.cc: Ditto.
3847         * mc-boot/GSArgs.cc: Ditto.
3848         * mc-boot/GStdIO.cc: Ditto.
3849         * mc-boot/GStringConvert.cc: Ditto.
3850         * mc-boot/GSysStorage.cc: Ditto.
3851         * mc-boot/Gdecl.cc: Ditto.
3852         * mc-boot/Gkeyc.cc: Ditto.
3853         * mc-boot/Glibc.h: Ditto.
3854         * mc-boot/GmcComment.cc: Ditto.
3855         * mc-boot/GmcComp.cc: Ditto.
3856         * mc-boot/GmcDebug.cc: Ditto.
3857         * mc-boot/GmcMetaError.cc: Ditto.
3858         * mc-boot/GmcStack.cc: Ditto.
3859         * mc-boot/GmcStream.cc: Ditto.
3860         * mc-boot/GnameKey.cc: Ditto.
3861         * mc-boot/GsymbolKey.cc: Ditto.
3862         * mc-boot/Gvarargs.cc: Ditto.
3863         * mc-boot/Gwrapc.h: Ditto.
3864         * mc/decl.mod (getSymName): Add pointerref clause.
3865         * mc/mcStream.mod (copy): Check for an error after every read.
3866         * mc/varargs.mod (copy): Rewrite pointer arithmetic using INC to
3867         avoid type incompatibility.
3868         * pge-boot/GDynamicStrings.cc: Rebuilt.
3869         * pge-boot/GDynamicStrings.h: Ditto.
3870         * pge-boot/GFIO.cc: Ditto.
3871         * pge-boot/GFIO.h: Ditto.
3872         * pge-boot/GIO.cc: Ditto.
3873         * pge-boot/GIndexing.cc: Ditto.
3874         * pge-boot/GM2Dependent.cc: Ditto.
3875         * pge-boot/GM2EXCEPTION.cc: Ditto.
3876         * pge-boot/GNameKey.cc: Ditto.
3877         * pge-boot/GPushBackInput.cc: Ditto.
3878         * pge-boot/GRTExceptions.cc: Ditto.
3879         * pge-boot/GStdIO.cc: Ditto.
3880         * pge-boot/GSymbolKey.cc: Ditto.
3881         * pge-boot/GSysStorage.cc: Ditto.
3882         * pge-boot/Glibc.h: Ditto.
3883         * pge-boot/Gwrapc.cc: Ditto.
3884         * pge-boot/Gwrapc.h: Ditto.
3886 2024-02-22  Gaius Mulley  <gaiusmod2@gmail.com>
3888         PR modula2/114055
3889         * gm2-compiler/M2Check.mod (Import): IsConstLitInternal and
3890         IsConstLit.
3891         (isInternal): New procedure function.
3892         (doCheck): Test for isInternal in either operand and early
3893         return true.
3894         * gm2-compiler/M2Quads.mod (PushOne): Rewrite with extra
3895         parameter internal.
3896         (BuildPseudoBy): Add TRUE parameter to PushOne call.
3897         (BuildIncProcedure): Add FALSE parameter to PushOne call.
3898         (BuildDecProcedure): Add FALSE parameter to PushOne call.
3899         * gm2-compiler/M2Range.mod (ForLoopBeginTypeCompatible):
3900         Uncomment code and tidy up error string.
3901         * gm2-compiler/SymbolTable.def (PutConstLitInternal):
3902         New procedure.
3903         (IsConstLitInternal): New procedure function.
3904         * gm2-compiler/SymbolTable.mod (PutConstLitInternal):
3905         New procedure.
3906         (IsConstLitInternal): New procedure function.
3907         (SymConstLit): New field IsInternal.
3908         (CreateConstLit): Initialize IsInternal to FALSE.
3910 2024-02-21  Gaius Mulley  <gaiusmod2@gmail.com>
3912         PR modula2/114026
3913         * gm2-compiler/M2GenGCC.mod (Import): Remove DisplayQuadruples.
3914         Remove DisplayQuadList.
3915         (MixTypesBinary): Replace check with overflowCheck.
3916         New variable typeChecking.
3917         Use GenQuadOTypetok to retrieve typeChecking.
3918         Use typeChecking to suppress error message.
3919         * gm2-compiler/M2LexBuf.def (MakeVirtual2Tok): New procedure
3920         function.
3921         * gm2-compiler/M2LexBuf.mod (MakeVirtualTok): Improve comment.
3922         (MakeVirtual2Tok): New procedure function.
3923         * gm2-compiler/M2Quads.def (GetQuadOTypetok): New procedure.
3924         * gm2-compiler/M2Quads.mod (QuadFrame): New field CheckType.
3925         (PutQuadO): Rewrite using PutQuadOType.
3926         (PutQuadOType): New procedure.
3927         (GetQuadOTypetok): New procedure.
3928         (BuildPseudoBy): Rewrite.
3929         (BuildForToByDo): Remove type checking.
3930         Add parameters e2, e2tok, BySym, bytok to
3931         InitForLoopBeginRange.
3932         Push the RangeId.
3933         (BuildEndFor): Pop the RangeId.
3934         Use GenQuadOTypetok to generate AddOp without type checking.
3935         Call PutRangeForIncrement with the RangeId and IncQuad.
3936         (GenQuadOtok): Rewrite using GenQuadOTypetok.
3937         (GenQuadOTypetok): New procedure.
3938         * gm2-compiler/M2Range.def (InitForLoopBeginRangeCheck):
3939         Rename d as des, e as expr.
3940         Add expr1, expr1tok, expr2, expr2tok, byconst, byconsttok
3941         parameters.
3942         (PutRangeForIncrement): New procedure.
3943         * gm2-compiler/M2Range.mod (Import): MakeVirtual2Tok.
3944         (Range): Add expr2, byconst, destok, exprtok, expr2tok,
3945         incrementquad.
3946         (InitRange): Initialize expr2 to NulSym.
3947         Initialize byconst to NulSym.
3948         Initialize tokenNo, destok, exprtok, expr2tok, byconst to
3949         UnknownTokenNo.
3950         Initialize incrementquad to 0.
3951         (PutRangeForIncrement): New procedure.
3952         (PutRangeDesExpr2): New procedure.
3953         (InitForLoopBeginRangeCheck): Rewrite.
3954         (ForLoopBeginTypeCompatible): New procedure function.
3955         (CodeForLoopBegin): Call ForLoopBeginTypeCompatible and
3956         only code the for loop assignment if all the type checks
3957         succeed.
3959 2024-02-19  Gaius Mulley  <gaiusmod2@gmail.com>
3961         PR modula2/113889
3962         * gm2-compiler/M2ALU.mod (StringFitsArray): Add tokeno parameter
3963         to GetStringLength.
3964         (InitialiseArrayOfCharWithString): Add tokeno parameter to
3965         GetStringLength.
3966         (CheckGetCharFromString): Add tokeno parameter to GetStringLength.
3967         * gm2-compiler/M2Const.mod (constResolveViaMeta): Replace
3968         PutConstString with PutConstStringKnown.
3969         * gm2-compiler/M2GCCDeclare.mod (DeclareCharConstant): Add tokenno
3970         parameter and add assert.  Use tokenno to generate location.
3971         (DeclareStringConstant): Add tokenno and add asserts.
3972         Add tokenno parameter to calls to GetStringLength.
3973         (PromoteToString): Add assert and add tokenno parameter to
3974         GetStringLength.
3975         (PromoteToCString): Add assert and add tokenno parameter to
3976         GetStringLength.
3977         (DeclareConstString): New procedure function.
3978         (TryDeclareConst): Remove size local variable.
3979         Check IsConstStringKnown.
3980         Call DeclareConstString.
3981         (PrintString): New procedure.
3982         (PrintVerboseFromList): Call PrintString.
3983         (CheckResolveSubrange): Check IsConstStringKnown before creating
3984         subrange for char or issuing an error.
3985         * gm2-compiler/M2GenGCC.mod (ResolveConstantExpressions): Add
3986         StringLengthOp, StringConvertM2nulOp, StringConvertCnulOp case
3987         clauses.
3988         (FindSize): Add assert IsConstStringKnown.
3989         (StringToChar): New variable tokenno.
3990         Add tokenno parameter to GetStringLength.
3991         (FoldStringLength): New procedure.
3992         (FoldStringConvertM2nul): New procedure.
3993         (FoldStringConvertCnul): New procedure.
3994         (CodeAddr): Add tokenno parameter.
3995         Replace CurrentQuadToken with tokenno.
3996         Add tokenno parameter to GetStringLength.
3997         (PrepareCopyString): Rewrite.
3998         (IsConstStrKnown): New procedure function.
3999         (FoldAdd): Detect conststring op2 and op3 which are known and
4000         concat.  Place result into op1.
4001         (FoldStandardFunction): Pass tokenno as a parameter to
4002         GetStringLength.
4003         (CodeXIndr): Rewrite comment.
4004         Rename op1 to left, op3 to right.
4005         Pass rightpos to GetStringLength.
4006         * gm2-compiler/M2Quads.def (QuadrupleOp): Add
4007         StringConvertCnulOp, StringConvertM2nulOp and StringLengthOp.
4008         * gm2-compiler/M2Quads.mod (import): Remove MakeConstLitString.
4009         Add CopyConstString and PutConstStringKnown.
4010         (IsInitialisingConst): Add StringConvertCnulOp,
4011         StringConvertM2nulOp and StringLengthOp.
4012         (callRequestDependant): Replace MakeConstLitString with
4013         MakeConstString.
4014         (DeferMakeConstStringCnul): New procedure function.
4015         (DeferMakeConstStringM2nul): New procedure function.
4016         (CheckParameter): Add early return if the string const is unknown.
4017         (DescribeType): Add token parameter to GetStringLength.
4018         Check for IsConstStringKnown.
4019         (ManipulateParameters): Use DeferMakeConstStringCnul and
4020         DeferMakeConstStringM2nul.
4021         (MakeLengthConst): Remove and replace with...
4022         (DeferMakeLengthConst): ... this.
4023         (doBuildBinaryOp): Create ConstString and set it to contents
4024         unknown.
4025         Check IsConstStringKnown before generating error message.
4026         (WriteQuad): Add StringConvertCnulOp, StringConvertM2nulOp and
4027         StringLengthOp.
4028         (WriteOperator): Add StringConvertCnulOp, StringConvertM2nulOp and
4029         StringLengthOp.
4030         * gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Add
4031         StringConvertCnulOp, StringConvertM2nulOp and StringLengthOp.
4032         * gm2-compiler/NameKey.mod (LengthKey): Allow NulName to return 0.
4033         * gm2-compiler/P2SymBuild.mod (BuildString): Replace
4034         MakeConstLitString with MakeConstString.
4035         (DetermineType): Replace PutConstString with PutConstStringKnown.
4036         * gm2-compiler/SymbolTable.def (MakeConstVar): Tidy up comment.
4037         (MakeConstLitString): Remove.
4038         (MakeConstString): New procedure function.
4039         (MakeConstStringCnul): New procedure function.
4040         (MakeConstStringM2nul): New procedure function.
4041         (PutConstStringKnown): New procedure.
4042         (CopyConstString): New procedure.
4043         (IsConstStringKnown): New procedure function.
4044         (IsConstStringM2): New procedure function.
4045         (IsConstStringC): New procedure function.
4046         (IsConstStringM2nul): New procedure function.
4047         (IsConstStringCnul): New procedure function.
4048         (GetStringLength): Add token parameter.
4049         (PutConstString): Remove.
4050         (GetConstStringM2): Remove.
4051         (GetConstStringC): Remove.
4052         (GetConstStringM2nul): Remove.
4053         (GetConstStringCnul): Remove.
4054         (MakeConstStringC): Remove.
4055         * gm2-compiler/SymbolTable.mod (SymConstString): Remove
4056         M2Variant, NulM2Variant, CVariant, NulCVariant.
4057         Add Known.
4058         (CheckAnonymous): Replace $$ with __anon.
4059         (IsNameAnonymous): Replace $$ with __anon.
4060         (MakeConstVar): Detect whether the name is nul and treat as
4061         a temporary constant.
4062         (MakeConstLitString): Remove.
4063         (BackFillString): Remove.
4064         (InitConstString): Rewrite.
4065         (GetConstStringM2): Remove.
4066         (GetConstStringC): Remove.
4067         (GetConstStringContent): New procedure function.
4068         (GetConstStringM2nul): Remove.
4069         (GetConstStringCnul): Remove.
4070         (MakeConstStringCnul): Rewrite.
4071         (MakeConstStringM2nul): Rewrite.
4072         (MakeConstStringC): Remove.
4073         (MakeConstString): Rewrite.
4074         (PutConstStringKnown): New procedure.
4075         (CopyConstString): New procedure.
4076         (PutConstString): Remove.
4077         (IsConstStringKnown): New procedure function.
4078         (IsConstStringM2): New procedure function.
4079         (IsConstStringC): Rewrite.
4080         (IsConstStringM2nul): Rewrite.
4081         (IsConstStringCnul): Rewrite.
4082         (GetConstStringKind): New procedure function.
4083         (GetString): Check Known.
4084         (GetStringLength): Add token parameter and check Known.
4086 2024-02-10  Gaius Mulley  <gaiusmod2@gmail.com>
4088         PR modula2/113848
4089         * gm2-libs/SArgs.mod (GetArg): Re-write address arithmetic
4090         to avoid (void *) computation.
4092 2024-02-03  Gaius Mulley  <gaiusmod2@gmail.com>
4094         PR modula2/113730
4095         * gm2-compiler/M2Base.mod (IsUserType): New procedure function.
4096         (MixTypes): Use IsUserType instead of IsType before calling MixTypes.
4097         * gm2-compiler/M2GenGCC.mod (GetTypeMode): Remove and import from
4098         SymbolTable.
4099         (CodeBinaryCheck): Replace call to MixTypes with MixTypesBinary.
4100         (CodeBinary): Replace call to MixTypes with MixTypesBinary.
4101         (CodeIfLess): Replace MixTypes with ComparisonMixTypes.
4102         (CodeIfGre): Replace MixTypes with ComparisonMixTypes.
4103         (CodeIfLessEqu): Replace MixTypes with ComparisonMixTypes.
4104         (CodeIfGreEqu): Replace MixTypes with ComparisonMixTypes.
4105         (CodeIfEqu): Replace MixTypes with ComparisonMixTypes.
4106         (CodeIfNotEqu): Replace MixTypes with ComparisonMixTypes.
4107         (ComparisonMixTypes): New procedure function.
4108         * gm2-compiler/M2Quads.mod (BuildEndFor): Replace GenQuadO
4109         with GenQuadOtok and pass tokenpos for the operands to the AddOp
4110         and XIndrOp.
4111         (CheckRangeIncDec): Check etype against NulSym and dtype for a
4112         pointer and set etype to Address.
4113         (BuildAddAdrFunction): New variable opa.  Convert operand to an
4114         address and save result in opa.  Replace GenQuad with GenQuadOtok.
4115         (BuildSubAdrFunction): New variable opa.  Convert operand to an
4116         address and save result in opa.  Replace GenQuad with GenQuadOtok.
4117         (BuildDiffAdrFunction): New variable opa.  Convert operand to an
4118         address and save result in opa.  Replace GenQuad with GenQuadOtok.
4119         (calculateMultipicand): Replace GenQuadO with GenQuadOtok.
4120         (ConvertToAddress): New procedure function.
4121         (BuildDynamicArray): Convert index to address before adding to
4122         the base.
4123         * gm2-compiler/SymbolTable.def (GetTypeMode): New procedure function.
4124         * gm2-compiler/SymbolTable.mod (GetTypeMode): New procedure
4125         function implemented (moved from M2GenGCC.mod).
4126         * gm2-libs/SArgs.mod (GetArg): Replace cast to PtrToChar with ADDRESS.
4128 2024-02-01  Gaius Mulley  <gaiusmod2@gmail.com>
4130         PR modula2/111627
4131         PR modula2/112506
4132         * gm2-compiler/M2Comp.mod (Pass0CheckMod): Test IsDefImp before
4133         checking IsDefinitionForC.
4135 2024-01-31  Gaius Mulley  <gaiusmod2@gmail.com>
4137         * gm2-compiler/M2Comp.mod (Pass0CheckMod): Tidy up comment.
4138         * gm2-compiler/P1Build.bnf (PossiblyExportIdent): Replace
4139         PushTF with PushTFtok.
4141 2024-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
4143         * gm2-compiler/M2Check.mod (dumpIndice): New procedure.
4144         (dumpIndex): New procedure.
4145         (dumptInfo): New procedure.
4146         (buildError4): Add comment and pass formal and actual to
4147         MetaError4.  Improve text describing error.
4148         (buildError2): Generate different error descriptions for
4149         the three error kinds.
4150         (checkConstMeta): Add block comment.  Add more meta checks
4151         and call doCheckPair to complete string const checking.
4152         Add tinfo parameter.
4153         (checkConstEquivalence): Add tinfo parameter.
4154         * gm2-compiler/M2GCCDeclare.mod (PrintVerboseFromList):
4155         Print the length of a const string.
4156         * gm2-compiler/M2GenGCC.mod (CodeParam): Remove parameters
4157         op1, op2 and op3.
4158         (doParam): Add paramtok parameter.  Use paramtok instead rather
4159         than CurrentQuadToken.
4160         (CodeParam): Rewrite.
4161         * gm2-compiler/M2Quads.mod (CheckProcedureParameters):
4162         Add comments explaining that const strings are not checked
4163         in M2Quads.mod.
4164         (FailParameter): Use MetaErrorT2 with tokpos rather than
4165         MetaError2.
4166         (doBuildBinaryOp): Assign OldPos and OperatorPos before the
4167         IF block.
4168         * gm2-compiler/SymbolTable.mod (PutConstString): Add call to
4169         InitWhereDeclaredTok.
4171 2024-01-25  Gaius Mulley  <gaiusmod2@gmail.com>
4173         * gm2-libs/libc.def (lseek): Change the second parameter
4174         type to CSSIZE_T and make the return value optional.
4176 2024-01-24  Gaius Mulley  <gaiusmod2@gmail.com>
4178         PR modula2/113559
4179         * gm2-libs/FIO.mod (SetPositionFromBeginning): Convert pos into
4180         CSSIZE_T during call to lseek.
4181         (SetPositionFromEnd): Convert pos into CSSIZE_T during call to
4182         lseek.
4184 2024-01-23  H.J. Lu  <hjl.tools@gmail.com>
4186         PR bootstrap/113554
4187         * mc/mc.flex (alloca): Don't redefine.
4188         (handleDate): Replace (long *)0 with (time_t *)0 when calling
4189         time.
4191 2024-01-19  Gaius Mulley  <gaiusmod2@gmail.com>
4193         * gm2-compiler/M2BasicBlock.mod (InitBasicBlocks): Rename
4194         ForeachScopeBlockDo to ForeachScopeBlockDo3.
4195         * gm2-compiler/M2Code.mod: Import ForeachScopeBlockDo2.
4196         (OptimizeScopeBlock): Call ForeachScopeBlockDo3 for
4197         procedures with three parameters and ForeachScopeBlockDo2
4198         for two parameters.
4199         (CodeBlock): Ditto.
4200         * gm2-compiler/M2GCCDeclare.mod (DeclareTypesConstantsProcedures):
4201         Rename ForeachScopeBlockDo to ForeachScopeBlockDo3.
4202         * gm2-compiler/M2GenGCC.def (ConvertQuadsToTree): Remove Scope
4203         parameter.
4204         * gm2-compiler/M2GenGCC.mod (ConvertQuadsToTree): Remove Scope
4205         parameter.
4206         (MaybeDebugBuiltinMemcpy): Remove parameter tok.
4207         (MaybeDebugBuiltinMemset): Remove.
4208         (MakeCopyUse): Remove tokenno from call to
4209         MaybeDebugBuiltinMemcpy.
4210         (PerformFoldBecomes): Remove desloc and exprloc.
4211         (checkArrayElements): Remove location.  Remove virtpos
4212         as a parameter to MaybeDebugBuiltinMemcpy.
4213         (NoWalkProcedure): Add attribute unused.
4214         (CheckElementSetTypes): Remove parameter p.
4215         Remove CurrentQuadToken in call to MaybeDebugBuiltinMemcpy.
4216         Remove NoWalkProcedure from call to CheckElementSetTypes.
4217         Remove tokenno from call to MaybeDebugBuiltinMemcpy.
4218         * gm2-compiler/M2Optimize.mod (RemoveProcedures): Replace
4219         two parameter indirect procedure iterator with
4220         ForeachScopeBlockDo2.
4221         * gm2-compiler/M2SSA.mod: Remove ForeachScopeBlockDo.
4222         * gm2-compiler/M2Scope.def (ForeachScopeBlockDo2): New
4223         declaration.
4224         (ForeachScopeBlockDo): Rename ...
4225         (ForeachScopeBlockDo3): ... to this.
4226         (ScopeProcedure2): New declaration.
4227         * gm2-compiler/M2Scope.mod (ForeachScopeBlockDo2): New
4228         procedure.
4229         (ForeachScopeBlockDo): Rename ...
4230         (ForeachScopeBlockDo3): ... to this.
4232 2024-01-18  Gaius Mulley  <gaiusmod2@gmail.com>
4234         PR modula2/111956
4235         * Make-lang.in (host_mc_longreal): Remove.
4236         * configure: Regenerate.
4237         * configure.ac (M2C_LONGREAL_FLOAT128): Remove.
4238         (M2C_LONGREAL_PPC64LE): Remove.
4239         * gm2-compiler/M2Options.def (SetIBMLongDouble): New procedure.
4240         (GetIBMLongDouble): New procedure function.
4241         (SetIEEELongDouble): New procedure.
4242         (GetIEEELongDouble): New procedure function.
4243         * gm2-compiler/M2Options.mod (SetIBMLongDouble): New procedure.
4244         (GetIBMLongDouble): New procedure function.
4245         (SetIEEELongDouble): New procedure.
4246         (GetIEEELongDouble): New procedure function.
4247         (InitializeLongDoubleFlags): New procedure called during
4248         module block initialization.
4249         * gm2-gcc/m2configure.cc: Remove duplicate includes.
4250         (m2configure_M2CLongRealFloat128): Remove.
4251         (m2configure_M2CLongRealIBM128): Remove.
4252         (m2configure_M2CLongRealLongDouble): Remove.
4253         (m2configure_M2CLongRealLongDoublePPC64LE): Remove.
4254         (m2configure_TargetIEEEQuadDefault): New function.
4255         * gm2-gcc/m2configure.def (M2CLongRealFloat128): Remove.
4256         (M2CLongRealIBM128): Remove.
4257         (M2CLongRealLongDouble): Remove.
4258         (M2CLongRealLongDoublePPC64LE): Remove.
4259         (TargetIEEEQuadDefault): New function.
4260         * gm2-gcc/m2configure.h (m2configure_M2CLongRealFloat128): Remove.
4261         (m2configure_M2CLongRealIBM128): Remove.
4262         (m2configure_M2CLongRealLongDouble): Remove.
4263         (m2configure_M2CLongRealLongDoublePPC64LE): Remove.
4264         (m2configure_TargetIEEEQuadDefault): New function.
4265         * gm2-gcc/m2options.h (M2Options_SetIBMLongDouble): New prototype.
4266         (M2Options_GetIBMLongDouble): New prototype.
4267         (M2Options_SetIEEELongDouble): New prototype.
4268         (M2Options_GetIEEELongDouble): New prototype.
4269         * gm2-gcc/m2type.cc (build_m2_long_real_node): Re-implement using
4270         results of M2Options_GetIBMLongDouble and M2Options_GetIEEELongDouble.
4271         * gm2-lang.cc (gm2_langhook_handle_option): Add case
4272         OPT_mabi_ibmlongdouble and call M2Options_SetIBMLongDouble.
4273         Add case OPT_mabi_ieeelongdouble and call M2Options_SetIEEELongDouble.
4274         * gm2config.aci.in: Regenerate.
4275         * gm2spec.cc (lang_specific_driver): Remove block defined by
4276         M2C_LONGREAL_PPC64LE.
4277         Remove case OPT_mabi_ibmlongdouble.
4278         Remove case OPT_mabi_ieeelongdouble.
4280 2024-01-11  Gaius Mulley  <gaiusmod2@gmail.com>
4282         PR modula2/112946
4283         * gm2-compiler/M2GenGCC.mod (IsExpressionCompatible): Import.
4284         (ExpressionTypeCompatible): Import.
4285         (CodeStatement): Remove op1, op2, op3 parameters from CodeSetOr,
4286         CodeSetAnd, CodeSetSymmetricDifference, CodeSetLogicalDifference.
4287         (checkArrayElements): Rename op1 to des and op3 to expr.
4288         Use despos and exprpos instead of CurrentQuadToken.
4289         (checkRecordTypes): Rename op1 to des and op2 to expr.
4290         Use virtpos instead of CurrentQuadToken.
4291         (checkIncorrectMeta): Ditto.
4292         (checkBecomes): Rename op1 to des and op3 to expr.
4293         Use virtpos instead of CurrentQuadToken.
4294         (NoWalkProcedure): New procedure stub.
4295         (CheckBinaryExpressionTypes): New procedure function.
4296         (CheckElementSetTypes): New procedure function.
4297         (CodeBinarySet): Re-write.
4298         (FoldBinarySet): Re-write.
4299         (CodeSetOr): Remove parameters op1, op2 and op3.
4300         (CodeSetAnd): Ditto.
4301         (CodeSetLogicalDifference): Ditto.
4302         (CodeSetSymmetricDifference): Ditto.
4303         (CodeIfIn): Call CheckBinaryExpressionTypes and
4304         CheckElementSetTypes.
4305         * gm2-compiler/M2Quads.mod (BuildRotateFunction): Correct
4306         parameters to MakeVirtualTok to reflect parameter block
4307         passed to Rotate.
4309 2024-01-09  Gaius Mulley  <gaiusmod2@gmail.com>
4311         PR modula2/112920
4312         * gm2-compiler/M2GCCDeclare.mod (Group): New declaration.
4313         Import MakeSubrange, MakeConstVar, MakeConstLit and DivTrunc.
4314         (FreeGroup): New declaration.
4315         (GlobalGroup): New declaration.
4316         (ToBeSolvedByQuads): Remove.
4317         (NilTypedArrays): Remove.
4318         (PartiallyDeclared): Remove.
4319         (HeldByAlignment): Remove.
4320         (FinishedAlignment): Remove.
4321         (ToDoList): Remove.
4322         (DebugSet): Re-format.
4323         (DebugNumber): Re-format.
4324         (DebugSetNumbers): Reference sets using GlobalGroup.
4325         (AddSymToWatch): Re-format.
4326         (WatchIncludeList): Reference sets using GlobalGroup.
4327         (WatchRemoveList): Reference sets using GlobalGroup.
4328         (NewGroup): New procedure.
4329         (DisposeGroup): New procedure.
4330         (InitGroup): New procedure.
4331         (KillGroup): New procedure.
4332         (DupGroup): New procedure.
4333         (EqualGroup): New procedure.
4334         (LookupSet): New procedure.
4335         (CanDeclareTypePartially): Reference sets using GlobalGroup.
4336         (CompletelyResolved): Reference sets using GlobalGroup.
4337         (IsNilTypedArrays): Reference sets using GlobalGroup.
4338         (IsFullyDeclared): Reference sets using GlobalGroup.
4339         (IsPartiallyDeclared): Reference sets using GlobalGroup.
4340         (IsPartiallyOrFullyDeclared): Reference sets using GlobalGroup.
4341         (DeclareTypeConstFully): Reference sets using GlobalGroup.
4342         (bodyl): Remove.
4343         (Body): Use bodyt and to lookup the required set.
4344         (ForeachTryDeclare): Remove parameter l.  Lookup set instead.
4345         (DeclareOutstandingTypes): Add new rules setarraynul and setfully.
4346         Reference sets using GlobalGroup.
4347         (ActivateWatch): New procedure.
4348         (DeclareTypesConstantsProceduresInRange): Re-written to check
4349         group change.
4350         (DeclareTypesConstantsProcedures): Re-written to check
4351         group change.
4352         (DeclareBoolean): Reference sets using GlobalGroup.
4353         (DeclarePackedBoolean): Ditto.
4354         (DeclareDefaultConstants): Ditto.
4355         (FreeGroup): Initialized.
4356         (GlobalGroup): Ditto.
4357         * gm2-compiler/Sets.def (EqualSet): New procedure function.
4358         Remove export qualified list of identifiers.
4359         * gm2-compiler/Sets.mod (EqualSet): New procedure function.
4361 2024-01-04  David Malcolm  <dmalcolm@redhat.com>
4363         * lang.opt.urls: New file, autogenerated by
4364         regenerate-opt-urls.py.
4366 2023-12-15  Gaius Mulley  <gaiusmod2@gmail.com>
4368         PR modula2/112946
4369         * gm2-compiler/M2Check.mod (checkConstMeta): New procedure
4370         function.
4371         (checkConstEquivalence): New procedure function.
4372         (doCheckPair): Add call to checkConstEquivalence.
4373         * gm2-compiler/M2GenGCC.mod (ResolveConstantExpressions): Call
4374         FoldBecomes with reduced parameters.
4375         (FoldBecomes): Re-write.
4376         (TryDeclareConst): New procedure.
4377         (RemoveQuads): New procedure.
4378         (DeclaredOperandsBecomes): New procedure function.
4379         (TypeCheckBecomes): New procedure function.
4380         (PerformFoldBecomes): New procedure.
4381         * gm2-compiler/M2Range.mod (FoldAssignment): Call
4382         AssignmentTypeCompatible to check des expr compatibility.
4383         * gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Remove
4384         parameter lst.
4385         (FilterCheckReadBeforeInitQuad): Remove parameter lst.
4386         (CheckReadBeforeInitFirstBasicBlock): Remove parameter lst.
4387         Call FilterCheckReadBeforeInitQuad without lst.
4389 2023-12-13  Gaius Mulley  <gaiusmod2@gmail.com>
4391         PR modula2/112921
4392         * gm2-libs-iso/ConvStringShort.def: New file.
4393         * gm2-libs-iso/ConvStringShort.mod: New file.
4394         * gm2-libs-iso/ShortConv.def: New file.
4395         * gm2-libs-iso/ShortConv.mod: New file.
4396         * gm2-libs-iso/ShortMath.def: New file.
4397         * gm2-libs-iso/ShortMath.mod: New file.
4398         * gm2-libs-iso/ShortStr.def: New file.
4399         * gm2-libs-iso/ShortStr.mod: New file.
4401 2023-12-12  Gaius Mulley  <gaiusmod2@gmail.com>
4403         PR modula2/112984
4404         * gm2-libs-coroutines/SYSTEM.mod: Remove redundant import of memcpy.
4405         * gm2-libs-iso/ClientSocket.mod: Remove redundant import of IOConsts.
4406         * gm2-libs-iso/IOChan.mod: Remove redundant import of IOConsts.
4407         * gm2-libs-iso/IOLink.mod: Remove redundant import of IOChan and SYSTEM.
4408         * gm2-libs-iso/IOResult.mod: Remove redundant import of IOChan.
4409         * gm2-libs-iso/LongIO.mod: Remove redundant import of writeString.
4410         * gm2-libs-iso/LongWholeIO.mod: Remove redundant import of IOChan.
4411         * gm2-libs-iso/M2RTS.mod: Remove redundant import of ADDRESS.
4412         * gm2-libs-iso/MemStream.mod: Remove redundant import of ADDRESS.
4413         * gm2-libs-iso/RTdata.mod: Remove redundant import of DeviceTablePtr.
4414         * gm2-libs-iso/RTfio.mod: Remove redundant import of DeviceTablePtr.
4415         * gm2-libs-iso/RTgen.mod: Remove redundant import of DeviceTablePtr.
4416         * gm2-libs-iso/RealIO.mod: Remove redundant import of writeString.
4417         * gm2-libs-iso/RndFile.mod: Remove redundant import of SYSTEM.
4418         * gm2-libs-iso/SYSTEM.mod: Remove redundant import of memcpy.
4419         * gm2-libs-iso/ShortWholeIO.mod: Remove redundant import of IOConsts.
4420         * gm2-libs-iso/TextIO.mod: Remove redundant import of IOChan.
4421         * gm2-libs-iso/TextUtil.mod: Remove redundant import of IOChan.
4422         * gm2-libs-iso/WholeIO.mod: Remove redundant import of IOChan.
4423         * gm2-libs-log/BitByteOps.mod: Remove redundant import of BYTE.
4424         * gm2-libs-log/FileSystem.mod: Remove redundant import of BYTE and ADDRESS.
4425         * gm2-libs-log/InOut.mod: Remove redundant import of String.
4426         * gm2-libs-log/RealConversions.mod: Remove redundant import of StringToLongreal.
4427         * gm2-libs/FIO.mod: Remove redundant import of SIZE.
4428         * gm2-libs/FormatStrings.mod: Remove redundant import of String
4429         and ConCatChar.
4430         * gm2-libs/IO.mod: Remove redundant import of SIZE.
4431         * gm2-libs/Indexing.mod: Remove redundant import of ADDRESS.
4432         * gm2-libs/M2Dependent.mod: Remove redundant import of SIZE.
4433         * gm2-libs/M2RTS.mod: Remove redundant import of ADDRESS.
4434         * gm2-libs/OptLib.mod: Remove redundant import of DynamicStrings.
4435         * gm2-libs/SYSTEM.mod: Remove redundant import of memcpy.
4436         * gm2-libs/StringConvert.mod: Remove redundant import of String.
4438 2023-12-07  Gaius Mulley  <gaiusmod2@gmail.com>
4440         PR modula2/112893
4441         * gm2-compiler/M2Base.mod (Ass): Extend array to include proc row
4442         and column.  Allow PIM to assign cardinal variables to address
4443         variables.
4444         (Expr): Ditto.
4445         (Comp): Ditto.
4446         * gm2-compiler/M2Check.mod (getSType): New procedure function.
4447         Replace all occurances of GetSType with getSType.
4448         * gm2-compiler/M2GenGCC.mod (CodeParam): Rewrite format specifier
4449         error message.
4450         * gm2-compiler/M2Quads.mod (CheckProcTypeAndProcedure): Add tokno
4451         parameter.
4452         * gm2-compiler/M2Range.def (InitTypesParameterCheck): Add tokno
4453         parameter.
4454         (InitParameterRangeCheck): Add tokno parameter.
4455         Remove EXPORT QUALIFIED list.
4456         (InitParameterRangeCheck): Add tokno parameter.
4457         * gm2-compiler/M2Range.mod (InitTypesParameterCheck): Add tokno
4458         parameter and pass tokno to PutRangeParam.
4459         (InitParameterRangeCheck): Add tokno parameter and pass tokno to
4460         PutRangeParam.
4461         (PutRangeParam): Add tokno parameter and assign to tokenNo.
4462         (FoldTypeParam): Rewrite format string.
4464 2023-12-06  Thomas Schwinge  <thomas@codesourcery.com>
4466         * lang.opt (-isysroot): New.
4468 2023-12-05  Gaius Mulley  <gaiusmod2@gmail.com>
4470         PR modula2/112865
4471         * gm2-compiler/M2Quads.mod (BuildReFunction): Use
4472         GetDType to retrieve the type of the operand when
4473         converting the complex type to its scalar equivalent.
4474         (BuildImFunction): Use GetDType to retrieve the type of the
4475         operand when converting the complex type to its scalar
4476         equivalent.
4478 2023-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4480         * mc/mc.flex [__GNUC__]: Define alloca as __builtin_alloca.
4481         (handleDate): Use strchr instead of index.
4483 2023-12-04  Gaius Mulley  <gaiusmod2@gmail.com>
4485         PR modula2/112825
4486         * tools-src/makeSystem: Change all occurrences of -c to -S.
4488 2023-11-01  Gaius Mulley  <gaiusmod2@gmail.com>
4490         PR modula2/102989
4491         * gm2-compiler/SymbolTable.mod (OverflowZType): Import from m2expr.
4492         (ConstantStringExceedsZType): Remove import.
4493         (GetConstLitType): Replace ConstantStringExceedsZType with OverflowZType.
4494         * gm2-gcc/m2decl.cc (m2decl_ConstantStringExceedsZType): Remove.
4495         (m2decl_BuildConstLiteralNumber): Re-write.
4496         * gm2-gcc/m2decl.def (ConstantStringExceedsZType): Remove.
4497         * gm2-gcc/m2decl.h (m2decl_ConstantStringExceedsZType): Remove.
4498         * gm2-gcc/m2expr.cc (m2expr_StrToWideInt): Rewrite to check overflow.
4499         (m2expr_OverflowZType): New function.
4500         (ToWideInt): New function.
4501         * gm2-gcc/m2expr.def (OverflowZType): New procedure function declaration.
4502         * gm2-gcc/m2expr.h (m2expr_OverflowZType): New prototype.
4504 2023-10-27  Gaius Mulley  <gaiusmod2@gmail.com>
4506         PR modula2/111530
4507         * gm2-libs-ch/cgetopt.c (cgetopt_cgetopt_long): Re-format.
4508         (cgetopt_cgetopt_long_only): Re-format.
4509         (cgetopt_SetOption):  Re-format and assign flag to NULL
4510         if name is also NULL.
4511         * gm2-libs/GetOpt.def (AddLongOption): Add index parameter
4512         and change flag to be a VAR parameter rather than a pointer.
4513         (GetOptLong): Re-format.
4514         (GetOpt): Correct comment.
4515         * gm2-libs/GetOpt.mod: Re-write to rely on cgetopt rather
4516         than implement long option creation in GetOpt.
4517         * gm2-libs/cgetopt.def (SetOption): has_arg type is INTEGER.
4519 2023-10-25  Gaius Mulley  <gaiusmod2@gmail.com>
4521         PR modula2/111955
4522         * gm2-gcc/m2builtins.cc (gm2_isnan_node): New tree.
4523         (DoBuiltinIsnan): New function.
4524         (m2builtins_BuiltInIsnan): New function.
4525         (m2builtins_init): Initialize gm2_isnan_node.
4526         (list_of_builtins): Add define for __builtin_isnan.
4527         * gm2-libs-ch/wrapc.c (wrapc_isnan): New function.
4528         (wrapc_isnanf): New function.
4529         (wrapc_isnanl): New function.
4530         * gm2-libs/Builtins.def (isnanf): New procedure function.
4531         (isnan): New procedure function.
4532         (isnanl): New procedure function.
4533         * gm2-libs/Builtins.mod:
4534         * gm2-libs/wrapc.def (isnan): New function.
4535         (isnanf): New function.
4536         (isnanl): New function.
4538 2023-10-24  Gaius Mulley  <gaiusmod2@gmail.com>
4540         * gm2-libs/M2Dependent.mod (InitDependencyList): New
4541         procedure.
4542         (CreateModule): Call InitDependencyList to initialize
4543         all fields of DependencyList.
4545 2023-10-24  Gaius Mulley  <gaiusmod2@gmail.com>
4547         * gm2-libs/M2Dependent.mod (CreateModule): Initialize all
4548         dependency fields for DependencyList.
4550 2023-10-17  Gaius Mulley  <gaiusmod2@gmail.com>
4552         PR modula2/111756
4553         * Make-lang.in (CM2DEP): New define conditionally set if
4554         ($(CXXDEPMODE),depmode=gcc3).
4555         (GM2_1): Use $(CM2DEP).
4556         (m2/gm2-gcc/%.o): Ensure $(@D)/$(DEPDIR) is created.
4557         Add $(CM2DEP) to the $(COMPILER) command and use $(POSTCOMPILE).
4558         (m2/gm2-gcc/m2configure.o): Ditto.
4559         (m2/gm2-lang.o): Ditto.
4560         (m2/m2pp.o): Ditto.
4561         (m2/gm2-gcc/rtegraph.o): Ditto.
4562         (m2/mc-boot/$(SRC_PREFIX)%.o): Ditto.
4563         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
4564         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
4565         (m2/mc-boot/main.o): Ditto.
4566         (mcflex.o): Ditto.
4567         (m2/gm2-libs-boot/M2RTS.o): Ditto.
4568         (m2/gm2-libs-boot/%.o): Ditto.
4569         (m2/gm2-libs-boot/%.o): Ditto.
4570         (m2/gm2-libs-boot/RTcodummy.o): Ditto.
4571         (m2/gm2-libs-boot/RTintdummy.o): Ditto.
4572         (m2/gm2-libs-boot/wrapc.o): Ditto.
4573         (m2/gm2-libs-boot/UnixArgs.o): Ditto.
4574         (m2/gm2-libs-boot/choosetemp.o): Ditto.
4575         (m2/gm2-libs-boot/errno.o): Ditto.
4576         (m2/gm2-libs-boot/dtoa.o): Ditto.
4577         (m2/gm2-libs-boot/ldtoa.o): Ditto.
4578         (m2/gm2-libs-boot/termios.o): Ditto.
4579         (m2/gm2-libs-boot/SysExceptions.o): Ditto.
4580         (m2/gm2-libs-boot/SysStorage.o): Ditto.
4581         (m2/gm2-compiler-boot/M2GCCDeclare.o): Ditto.
4582         (m2/gm2-compiler-boot/M2Error.o): Ditto.
4583         (m2/gm2-compiler-boot/%.o): Ditto.
4584         (m2/gm2-compiler-boot/%.o): Ditto.
4585         (m2/gm2-compiler-boot/m2flex.o): Ditto.
4586         (m2/gm2-compiler/%.o): Ditto.
4587         (m2/gm2-compiler/m2flex.o): Ditto.
4588         (m2/gm2-libs-iso/%.o): Ditto.
4589         (m2/gm2-libs/%.o): Ditto.
4590         (m2/gm2-libs/%.o): Ditto.
4591         (m2/gm2-libs/choosetemp.o): Ditto.
4592         (m2/boot-bin/mklink$(exeext)): Ditto.
4593         (m2/pge-boot/%.o): Ditto.
4594         (m2/pge-boot/%.o): Ditto.
4595         (m2/gm2-compiler/%.o): Ensure $(@D)/$(DEPDIR) is created and use
4596         $(POSTCOMPILE).
4597         (m2/gm2-compiler/%.o): Ditto.
4598         (m2/gm2-libs-iso/%.o): Ditto.
4599         (m2/gm2-libs/%.o): Ditto.
4600         * README: Purge out of date info.
4601         * gm2-compiler/M2Comp.mod (MakeSaveTempsFileNameExt): Import.
4602         (OnExitDelete): Import.
4603         (GetModuleDefImportStatementList): Import.
4604         (GetModuleModImportStatementList): Import.
4605         (GetImportModule): Import.
4606         (IsImportStatement): Import.
4607         (IsImport): Import.
4608         (GetImportStatementList): Import.
4609         (File): Import.
4610         (Close): Import.
4611         (EOF): Import.
4612         (IsNoError): Import.
4613         (WriteLine): Import.
4614         (WriteChar): Import.
4615         (FlushOutErr): Import.
4616         (WriteS): Import.
4617         (OpenToRead): Import.
4618         (OpenToWrite): Import.
4619         (ReadS): Import.
4620         (WriteS): Import.
4621         (GetM): Import.
4622         (GetMM): Import.
4623         (GetDepTarget): Import.
4624         (GetMF): Import.
4625         (GetMP): Import.
4626         (GetObj): Import.
4627         (GetMD): Import.
4628         (GetMMD): Import.
4629         (GenerateDefDependency): New procedure.
4630         (GenerateDependenciesFromImport): New procedure.
4631         (GenerateDependenciesFromList): New procedure.
4632         (GenerateDependencies): New procedure.
4633         (Compile): Re-write.
4634         (compile): Re-format.
4635         (CreateFileStem): New procedure function.
4636         (DoPass0): Re-write.
4637         (IsLibrary): New procedure function.
4638         (IsUnique): New procedure function.
4639         (Append): New procedure.
4640         (MergeDep): New procedure.
4641         (GetRuleTarget): New procedure function.
4642         (ReadDepContents): New procedure function.
4643         (WriteDep): New procedure.
4644         (WritePhonyDep): New procedure.
4645         (WriteDepContents): New procedure.
4646         (CreateDepFilename): New procedure function.
4647         (Pass0CheckDef): New procedure function.
4648         (Pass0CheckMod): New procedure function.
4649         (DoPass0): Re-write.
4650         (DepContent): New variable.
4651         (DepOutput): New variable.
4652         (BaseName): New procedure function.
4653         * gm2-compiler/M2GCCDeclare.mod (PrintTerse): Handle IsImport.
4654         Replace IsGnuAsmVolatile with IsGnuAsm.
4655         * gm2-compiler/M2Options.def (EXPORT QUALIFIED): Remove list.
4656         (SetM): New procedure.
4657         (GetM): New procedure function.
4658         (SetMM): New procedure.
4659         (GetMM): New procedure function.
4660         (SetMF): New procedure.
4661         (GetMF): New procedure function.
4662         (SetPPOnly): New procedure.
4663         (GetB): New procedure function.
4664         (SetMD): New procedure.
4665         (GetMD): New procedure function.
4666         (SetMMD): New procedure.
4667         (GetMMD): New procedure function.
4668         (SetMQ): New procedure.
4669         (SetMT): New procedure.
4670         (GetMT): New procedure function.
4671         (GetDepTarget): New procedure function.
4672         (SetMP): New procedure.
4673         (GetMP): New procedure function.
4674         (SetObj): New procedure.
4675         (SetSaveTempsDir): New procedure.
4676         * gm2-compiler/M2Options.mod (SetM): New procedure.
4677         (GetM): New procedure function.
4678         (SetMM): New procedure.
4679         (GetMM): New procedure function.
4680         (SetMF): New procedure.
4681         (GetMF): New procedure function.
4682         (SetPPOnly): New procedure.
4683         (GetB): New procedure function.
4684         (SetMD): New procedure.
4685         (GetMD): New procedure function.
4686         (SetMMD): New procedure.
4687         (GetMMD): New procedure function.
4688         (SetMQ): New procedure.
4689         (SetMT): New procedure.
4690         (GetMT): New procedure function.
4691         (GetDepTarget): New procedure function.
4692         (SetMP): New procedure.
4693         (GetMP): New procedure function.
4694         (SetObj): New procedure.
4695         (SetSaveTempsDir): New procedure.
4696         * gm2-compiler/M2Preprocess.def (PreprocessModule): New parameters
4697         topSource and outputDep.  Re-write.
4698         (MakeSaveTempsFileNameExt): New procedure function.
4699         (OnExitDelete): New procedure function.
4700         * gm2-compiler/M2Preprocess.mod (GetM): Import.
4701         (GetMM): Import.
4702         (OnExitDelete): Add debugging message.
4703         (RemoveFile): Add debugging message.
4704         (BaseName): Remove.
4705         (BuildCommandLineExecute): New procedure function.
4706         * gm2-compiler/M2Search.def (SetDefExtension): Remove unnecessary
4707         spacing.
4708         * gm2-compiler/SymbolTable.mod (GetSymName): Handle ImportSym and
4709         ImportStatementSym.
4710         * gm2-gcc/m2options.h (M2Options_SetMD): New function.
4711         (M2Options_GetMD): New function.
4712         (M2Options_SetMMD): New function.
4713         (M2Options_GetMMD): New function.
4714         (M2Options_SetM): New function.
4715         (M2Options_GetM): New function.
4716         (M2Options_SetMM): New function.
4717         (M2Options_GetMM): New function.
4718         (M2Options_GetMQ): New function.
4719         (M2Options_SetMF): New function.
4720         (M2Options_GetMF): New function.
4721         (M2Options_SetMT): New function.
4722         (M2Options_SetMP): New function.
4723         (M2Options_GetMP): New function.
4724         (M2Options_GetDepTarget): New function.
4725         * gm2-lang.cc (gm2_langhook_init): Correct comment case.
4726         (gm2_langhook_init_options): Add case OPT_M and
4727         OPT_MM.
4728         (gm2_langhook_post_options): Add case OPT_MF, OPT_MT,
4729         OPT_MD and OPT_MMD.
4730         * lang-specs.h (M2CPP): Pass though MF option.
4731         (MDMMD): New define.  Add MDMMD to "@modula-2".
4733 2023-10-15  Gaius Mulley  <gaiusmod2@gmail.com>
4735         * Make-lang.in (m2.tags): New rule.
4737 2023-10-11  Gaius Mulley  <gaiusmod2@gmail.com>
4739         * gm2-compiler/M2GCCDeclare.mod (DeclareSubrange): Check
4740         the base type of the subrange against the ZTYPE and call
4741         DeclareSubrangeNarrow if necessary.
4742         (DeclareSubrangeNarrow): New procedure function.
4744 2023-10-11  Gaius Mulley  <gaiusmod2@gmail.com>
4746         PR modula2/111675
4747         * gm2-compiler/M2CaseList.mod (appendTree): Replace
4748         InitStringCharStar with InitString.
4749         * gm2-compiler/M2GCCDeclare.mod: Import AreConstantsEqual.
4750         (DeclareSubrange): Add zero alignment test and call
4751         BuildSmallestTypeRange if necessary.
4752         (WalkSubrangeDependants): Walk the align expression.
4753         (IsSubrangeDependants): Test the align expression.
4754         * gm2-compiler/M2Quads.mod (BuildStringAdrParam): Correct end name.
4755         * gm2-compiler/P2SymBuild.mod (BuildTypeAlignment): Allow subranges
4756         to be zero aligned (packed).
4757         * gm2-compiler/SymbolTable.mod (Subrange): Add Align field.
4758         (MakeSubrange): Set Align to NulSym.
4759         (PutAlignment): Assign Subrange.Align to align.
4760         (GetAlignment): Return Subrange.Align.
4761         * gm2-gcc/m2expr.cc (noBitsRequired): Rewrite.
4762         (calcNbits): Rename ...
4763         (m2expr_calcNbits): ... to this and test for negative values.
4764         (m2expr_BuildTBitSize): Replace calcNBits with m2expr_calcNbits.
4765         * gm2-gcc/m2expr.def (calcNbits): Export.
4766         * gm2-gcc/m2expr.h (m2expr_calcNbits): New prototype.
4767         * gm2-gcc/m2type.cc (noBitsRequired): Remove.
4768         (m2type_BuildSmallestTypeRange): Call m2expr_calcNbits.
4769         (m2type_BuildSubrangeType): Create range_type from
4770         build_range_type (type, lowval, highval).
4772 2023-09-29  Gaius Mulley  <gaiusmod2@gmail.com>
4774         * gm2-compiler/M2Quads.mod (EndBuildFor): Improve
4775         block comments.
4776         * gm2-libs-iso/SysClock.mod (ExtractDate): Replace
4777         testDays with yearOfDays.  New local variable monthOfDays.
4779 2023-09-26  Gaius Mulley  <gaiusmod2@gmail.com>
4781         PR modula2/111510
4782         * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Minor spacing changes.
4783         (BuildTrashTreeFromInterface): Minor spacing changes.
4784         * gm2-compiler/M2Options.mod (GetRuntimeModuleOverride): Call
4785         string to generate a nul terminated C style string.
4786         * gm2-compiler/M2Quads.mod (BuildStringAdrParam): New procedure.
4787         (BuildM2InitFunction): Replace inline parameter generation with
4788         calls to BuildStringAdrParam.
4790 2023-09-19  Gaius Mulley  <gaiusmod2@gmail.com>
4792         * Make-lang.in (host_mc_longreal): Detect hosting on powerpc64le
4793         and if so use __float128 for longreal in mc.
4794         (MC_ARGS): Append host_mc_longreal.
4795         * config-make.in (TEST_TARGET_CPU_DEFAULT): New variable.
4796         (TEST_HOST_CPU_DEFAULT): New variable.
4797         * configure: Regenerate.
4798         * configure.ac (M2C_LONGREAL_FLOAT128): New define set if target
4799         is powerpc64le.
4800         (M2C_LONGREAL_PPC64LE): New define set if target is powerpc64le.
4801         * gm2-compiler/M2GCCDeclare.mod: Correct comment case.
4802         * gm2-compiler/M2GenGCC.mod (MaybeDebugBuiltinAlloca): Call
4803         SetLastFunction for the builtin function call.
4804         (MaybeDebugBuiltinMemcpy): Call SetLastFunction for the builtin
4805         function call.
4806         (MaybeDebugBuiltinMemset): New procedure function.
4807         (MakeCopyUse): Use GNU formatting.
4808         (UseBuiltin): Rewrite to check BuiltinExists.
4809         (CodeDirectCall): Rewrite to check BuiltinExists and call
4810         SetLastFunction.
4811         (CodeMakeAdr): Re-format.
4812         * gm2-compiler/M2Options.def (SetDebugBuiltins): New procedure.
4813         * gm2-compiler/M2Options.mod (SetUninitVariableChecking): Allow
4814         "cond" to switch UninitVariableConditionalChecking separately.
4815         (SetDebugBuiltins): New procedure.
4816         * gm2-compiler/M2Quads.def (BuildFunctionCall): Add parameter
4817         ConstExpr.
4818         * gm2-compiler/M2Quads.mod (BuildRealProcedureCall): Add parameter
4819         to BuildRealFuncProcCall.
4820         (BuildRealFuncProcCall): Add ConstExpr parameter.  Pass ConstExpr
4821         to BuildFunctionCall.
4822         (BuildFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
4823         BuildRealFunctionCall.
4824         (BuildConstFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
4825         BuildFunctionCall.
4826         (BuildRealFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
4827         BuildRealFuncProcCall.
4828         * gm2-compiler/P3Build.bnf (SetOrDesignatorOrFunction): Pass FALSE
4829         to BuildFunctionCall.
4830         (AssignmentOrProcedureCall): Pass FALSE to BuildFunctionCall.
4831         * gm2-compiler/SymbolTable.def (IsProcedureBuiltinAvailable): New
4832         procedure function.
4833         * gm2-compiler/SymbolTable.mod (CanUseBuiltin): New procedure
4834         function.
4835         (IsProcedureBuiltinAvailable): New procedure function.
4836         * gm2-gcc/m2builtins.cc (DEBUGGING): Undef.
4837         (bf_category): New enum type.
4838         (struct builtin_function_entry): New field function_avail.
4839         (m2builtins_BuiltInMemCopy): Rename from ...
4840         (m2builtins_BuiltinMemCopy): ... this.
4841         (DoBuiltinMemSet): New function.
4842         (m2builtins_BuiltinMemSet): New function.
4843         (do_target_support_exists): New function.
4844         (target_support_exists): New function.
4845         (m2builtins_BuiltinExists): Return true or false.
4846         (m2builtins_BuildBuiltinTree): Rename local variables.
4847         Replace long_double_type_node with GetM2LongRealType.
4848         (m2builtins_init): Use GetM2LongRealType rather than
4849         long_double_type_node.
4850         * gm2-gcc/m2builtins.def (BuiltInMemCopy): Rename to ...
4851         (BuiltinMemCopy): ... this.
4852         (BuiltinMemSet): New procedure function.
4853         * gm2-gcc/m2builtins.h (m2builtins_BuiltInMemCopy): Rename to ...
4854         (m2builtins_BuiltinMemCopy): ... this.
4855         (m2builtins_BuiltinMemSet): New procedure function.
4856         * gm2-gcc/m2configure.cc (m2configure_M2CLongRealFloat128): New
4857         procedure function.
4858         (m2configure_M2CLongRealIBM128): New procedure function.
4859         (m2configure_M2CLongRealLongDouble): New procedure function.
4860         (m2configure_M2CLongRealLongDoublePPC64LE): New procedure function.
4861         * gm2-gcc/m2configure.def (M2CLongRealFloat128): New procedure function.
4862         (M2CLongRealIBM128): New procedure function.
4863         (M2CLongRealLongDouble): New procedure function.
4864         (M2CLongRealLongDoublePPC64LE): New procedure function.
4865         * gm2-gcc/m2configure.h (m2configure_FullPathCPP): New procedure function.
4866         (m2configure_M2CLongRealFloat128): New procedure function.
4867         (m2configure_M2CLongRealIBM128): New procedure function.
4868         (m2configure_M2CLongRealLongDouble): New procedure function.
4869         (m2configure_M2CLongRealLongDoublePPC64LE): New procedure function.
4870         * gm2-gcc/m2convert.cc (m2convert_BuildConvert): Use convert_loc.
4871         * gm2-gcc/m2options.h (M2Options_SetDebugBuiltins): New function.
4872         * gm2-gcc/m2statement.cc (m2statement_BuildAssignmentTree): Set
4873         TREE_USED to true.
4874         (m2statement_BuildGoto):Set TREE_USED to true.
4875         (m2statement_BuildParam): Set TREE_USED to true.
4876         (m2statement_BuildBuiltinCallTree): New function.
4877         (m2statement_BuildFunctValue): Set TREE_USED to true.
4878         * gm2-gcc/m2statement.def (BuildBuiltinCallTree): New procedure function.
4879         * gm2-gcc/m2statement.h (m2statement_BuildBuiltinCallTree): New
4880         procedure function.
4881         * gm2-gcc/m2treelib.cc (m2treelib_DoCall0): Remove spacing.
4882         (m2treelib_DoCall1): Remove spacing.
4883         (m2treelib_DoCall2): Remove spacing.
4884         (m2treelib_DoCall3): Remove spacing.
4885         (add_stmt): Rename parameter.
4886         * gm2-gcc/m2type.cc (build_set_type): Remove spacing.
4887         (build_m2_specific_size_type): Remove spacing.
4888         (finish_build_pointer_type): Remove spacing.
4889         (m2type_BuildVariableArrayAndDeclare): Remove spacing.
4890         (build_m2_short_real_node): Remove spacing.
4891         (build_m2_real_node): Remove spacing.
4892         (build_m2_long_real_node): Use float128_type_node if
4893         M2CLongRealFloat128 is set.
4894         (build_m2_ztype_node): Remove spacing.
4895         (build_m2_long_int_node): Remove spacing.
4896         (build_m2_long_card_node): Remove spacing.
4897         (build_m2_short_int_node): Remove spacing.
4898         (build_m2_short_card_node): Remove spacing.
4899         (build_m2_iso_loc_node): Remove spacing.
4900         (m2type_SameRealType): New function.
4901         (m2type_InitBaseTypes): Create m2_c_type_node using
4902         m2_long_complex_type_node.
4903         (m2type_SetAlignment): Tidy up comment.
4904         * gm2-gcc/m2type.def (SameRealType):  New procedure function.
4905         * gm2-gcc/m2type.h (m2type_SameRealType): New procedure function.
4906         * gm2-lang.cc (gm2_langhook_type_for_mode): Build long complex
4907         node from m2 language specific long double node.
4908         * gm2-libs-log/RealConversions.mod (IsNan): New procedure
4909         function.
4910         (doPowerOfTen): Re-implement.
4911         * gm2-libs/Builtins.mod: Add newline.
4912         * gm2-libs/DynamicStrings.def (ReplaceChar): New procedure function.
4913         * gm2-libs/DynamicStrings.mod (ReplaceChar): New procedure function.
4914         * gm2config.aci.in (M2C_LONGREAL_FLOAT128): New config value.
4915         (M2C_LONGREAL_PPC64LE): New config value.
4916         * gm2spec.cc (lang_specific_driver): New local variable
4917         need_default_mabi set to default value depending upon
4918         M2C_LONGREAL_PPC64LE and M2C_LONGREAL_FLOAT128.
4919         * lang.opt (Wcase-enum): Moved to correct section.
4920         * m2pp.cc (m2pp_real_type): New function.
4921         (m2pp_type): Call m2pp_real_type.
4922         (m2pp_print_mode): New function.
4923         (m2pp_simple_type): Call m2pp_simple_type.
4924         (m2pp_float): New function.
4925         (m2pp_expression): Call m2pp_float.
4926         * mc-boot/GDynamicStrings.cc: Rebuild.
4927         * mc-boot/GDynamicStrings.h: Rebuild.
4928         * mc-boot/GFIO.cc: Rebuild.
4929         * mc-boot/GFIO.h: Rebuild.
4930         * mc-boot/GIO.cc: Rebuild.
4931         * mc-boot/GRTint.cc: Rebuild.
4932         * mc-boot/Gdecl.cc: Rebuild.
4933         * mc-boot/GmcOptions.cc: Rebuild.
4934         * mc-boot/GmcOptions.h: Rebuild.
4935         * mc/decl.mod: Rebuild.
4936         * mc/mcOptions.def (getCRealType): New procedure function.
4937         (getCLongRealType): New procedure function.
4938         (getCShortRealType): New procedure function.
4939         * mc/mcOptions.mod (getCRealType): New procedure function.
4940         (getCLongRealType): New procedure function.
4941         (getCShortRealType): New procedure function.
4943 2023-09-14  Gaius Mulley  <gaiusmod2@gmail.com>
4945         * gm2-compiler/M2CaseList.mod (NewRanges): Add block
4946         comment.
4947         (NewSet): Add block comment.
4948         (DisplayRanges): Add block comment.
4949         (IncludeElement): Add block comment.
4950         (IncludeElements): Add block comment.
4951         (appendString): Add block comment.
4952         (appendEnum): Add block comment.
4953         (appendTree): Add block comment.
4954         (SubrangeErrors): Add block comment.
4956 2023-09-14  Gaius Mulley  <gaiusmod2@gmail.com>
4958         * gm2-compiler/M2CaseList.mod (appendString): New procedure.
4959         (appendEnum): Re-implement.
4960         (NoOfSetElements): New procedure function.
4961         (isPrintableChar): New procedure function.
4962         (appendTree): New procedure.
4963         (SubrangeErrors): New procedure.
4964         (EmitMissingRangeErrors): Call SubrangeErrors if appropriate.
4965         * gm2-compiler/M2SymInit.mod (SetFieldInitializedNo): Avoid
4966         using a temporary variable once.
4967         (IsLocalVar): Comment out.
4968         (RecordContainsVarient): Remove fieldtype.
4969         (GenerateNoteFlow): Remove lst parameter.
4970         (CheckDeferredRecordAccess): Remove lst parameter.
4971         (CheckUnary): Remove lst parameter.  Remove procSym.
4972         (CheckBinary): Remove lst parameter.  Remove procSym.
4973         (CheckIndrX): Remove lst parameter.  Remove procSym.
4974         (CheckXIndr): Remove bblst and procSym parameters.
4975         (CheckRecordField): Remove procSym, op1tok, op2tok and op2.
4976         (CheckBecomes): Remove procSym and bblst.
4977         (CheckComparison): Remove procSym and bblst.
4978         (CheckAddr): Remove procSym parameter.
4979         * gm2-gcc/m2expr.cc (m2expr_CSTIntToString): New function.
4980         (m2expr_CSTIntToChar): New function.
4981         * gm2-gcc/m2expr.def (CSTIntToString): New procedure function
4982         declaration.
4983         (CSTIntToChar): New procedure function declaration.
4984         * gm2-gcc/m2expr.h (m2expr_CSTIntToChar): New prototype.
4985         (m2expr_CSTIntToString): New prototype.
4987 2023-09-13  Gaius Mulley  <gaiusmod2@gmail.com>
4989         * Make-lang.in (GM2_FLAGS): Add -Wcase-enum.
4990         (GM2_ISO_FLAGS): Add -Wcase-enum.
4991         * gm2-compiler/M2CaseList.mod (EnumerateErrors): Issue
4992         singular or plural start text prior to the enum list.
4993         Remove unused parameter tokenno.
4994         (EmitMissingRangeErrors): New procedure.
4995         (MissingCaseBounds): Call EmitMissingRangeErrors.
4996         (MissingCaseStatementBounds): Call EmitMissingRangeErrors.
4997         * gm2-libs-iso/TextIO.mod: Fix spacing.
4999 2023-09-12  Gaius Mulley  <gaiusmod2@gmail.com>
5001         * gm2-compiler/M2CaseList.def (PushCase): Rename parameters
5002         r to rec and v to va.  Add expr parameter.
5003         (MissingCaseStatementBounds): New procedure function.
5004         * gm2-compiler/M2CaseList.mod (RangePair): Add expression.
5005         (PushCase): Rename parameters r to rec and v to va.  Add
5006         expr parameter.
5007         (RemoveRange): New procedure function.
5008         (SubBitRange): Detect the case when the range in the set matches
5009         lo..hi.
5010         (CheckLowHigh): New procedure.
5011         (ExcludeCaseRanges): Rename parameter c to cd.  Rename local
5012         variables q to cl and r to rp.
5013         (High): Remove.
5014         (Low): Remove.
5015         (DoEnumValues): Remove.
5016         (IncludeElement): New procedure.
5017         (IncludeElements): New procedure.
5018         (ErrorRangeEnum): New procedure.
5019         (ErrorRange): Remove.
5020         (ErrorRanges): Remove.
5021         (appendEnum): New procedure.
5022         (appendStr): New procedure.
5023         (EnumerateErrors): New procedure.
5024         (MissingCaseBounds): Re-implement.
5025         (InRangeList): Remove.
5026         (MissingCaseStatementBounds): New procedure function.
5027         (checkTypes): Re-format.
5028         (inRange): Re-format.
5029         (TypeCaseBounds): Re-format.
5030         * gm2-compiler/M2Error.mod (GetAnnounceScope): Add noscope to
5031         case label list.
5032         * gm2-compiler/M2GCCDeclare.mod: Replace ForeachFieldEnumerationDo
5033         with ForeachLocalSymDo.
5034         * gm2-compiler/M2Options.def (SetCaseEnumChecking): New procedure.
5035         (CaseEnumChecking): New variable.
5036         * gm2-compiler/M2Options.mod (SetCaseEnumChecking): New procedure.
5037         (Module initialization): set CaseEnumChecking to FALSE.
5038         * gm2-compiler/M2Quads.def (QuadOperator): Alphabetically ordered.
5039         * gm2-compiler/M2Quads.mod (IsBackReferenceConditional): Add else
5040         clause.
5041         (BuildCaseStart): Pass selector expression to InitCaseBounds.
5042         (CheckUninitializedVariablesAreUsed): Remove.
5043         (IsInlineWithinBlock): Remove.
5044         (AsmStatementsInBlock): Remove.
5045         (CheckVariablesInBlock): Remove commented code.
5046         (BeginVarient): Pass NulSym to InitCaseBounds.
5047         * gm2-compiler/M2Range.mod (FoldCaseBounds): New local variable
5048         errorGenerated.  Add call to MissingCaseStatementBounds.
5049         * gm2-compiler/P3Build.bnf (CaseEndStatement): Call ElseCase.
5050         * gm2-compiler/PCSymBuild.mod (InitDesExpr): Add else clause.
5051         (InitFunction): Add else clause.
5052         (InitConvert): Add else clause.
5053         (InitLeaf): Add else clause.
5054         (InitBinary): Add else clause.
5055         (InitUnary): Add else clause.
5056         * gm2-compiler/SymbolTable.def (GetNth): Re-write comment.
5057         (ForeachFieldEnumerationDo): Re-write comment stating alphabetical
5058         traversal.
5059         * gm2-compiler/SymbolTable.mod (GetNth): Re-write comment.
5060         Add case label for EnumerationSym and call GetItemFromList.
5061         (ForeachFieldEnumerationDo): Re-write comment stating alphabetical
5062         traversal.
5063         (SymEnumeration): Add ListOfFields used for declaration order.
5064         (MakeEnumeration): Initialize ListOfFields.
5065         (PutFieldEnumeration): Include Field in ListOfFields.
5066         * gm2-gcc/m2options.h (M2Options_SetCaseEnumChecking): New
5067         function.
5068         * gm2-lang.cc (gm2_langhook_handle_option): Add
5069         OPT_Wcase_enum case and call M2Options_SetCaseEnumChecking.
5070         * lang.opt (Wcase-enum): Add.
5072 2023-09-11  Gaius Mulley  <gaiusmod2@gmail.com>
5074         PR modula2/111330
5075         * gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Add
5076         case labels LogicalDiffOp, DummyOp, OptParamOp and
5077         InitAddressOp.
5079 2023-08-20  Gaius Mulley  <gaiusmod2@gmail.com>
5081         PR modula2/111085
5082         * gm2-libs/Builtins.def (nexttoward): Alter the second
5083         parameter to LONGREAL.
5084         (nexttowardf): Alter the second parameter to LONGREAL.
5085         * gm2-libs/Builtins.mod (nexttoward): Alter the second
5086         parameter to LONGREAL.
5087         (nexttowardf): Alter the second parameter to LONGREAL.
5088         * gm2-libs/cbuiltin.def (nexttoward): Alter the second
5089         parameter to LONGREAL.
5090         (nexttowardf): Alter the second parameter to LONGREAL.
5092 2023-08-13  Iain Sandoe  <iain@sandoe.co.uk>
5094         * Make-lang.in: Update suffix spellings to use 'soext'.
5095         Add libc to the plugin link.
5097 2023-08-12  Gaius Mulley  <gaiusmod2@gmail.com>
5099         PR modula2/110779
5100         * gm2-libs-iso/SysClock.mod (EpochTime): New procedure.
5101         (GetClock): Call EpochTime if the C time functions are
5102         unavailable.
5103         * gm2-libs-iso/wrapclock.def (istimezone): New function
5104         definition.
5106 2023-08-12  Gaius Mulley  <gaiusmod2@gmail.com>
5108         PR modula2/108119
5109         * Make-lang.in (M2RTE_PLUGIN_SO): Assigned to
5110         plugin/m2rte$(exeext).so if enable_plugin is yes.
5111         (m2.all.cross): Replace plugin/m2rte$(soext) with
5112         $(M2RTE_PLUGIN_SO).
5113         (m2.all.encap): Replace plugin/m2rte$(soext) with
5114         $(M2RTE_PLUGIN_SO).
5115         (m2.install-plugin): Add dummy rule when enable_plugin
5116         is not yes.
5117         (plugin/m2rte$(exeext).so): Add dummy rule when enable_plugin
5118         is not yes.
5119         (m2/stage2/cc1gm2$(exeext)): Replace plugin/m2rte$(soext) with
5120         $(M2RTE_PLUGIN_SO).
5121         (m2/stage1/cc1gm2$(exeext)): Replace plugin/m2rte$(soext) with
5122         $(M2RTE_PLUGIN_SO).
5123         * gm2spec.cc (lang_specific_driver): Set need_plugin to false
5124         by default.
5126 2023-08-09  Gaius Mulley  <gaiusmod2@gmail.com>
5128         PR modula2/110779
5129         * gm2-libs-iso/SysClock.mod (GetClock): Test GetTimespec
5130         return value.
5131         (SetClock): Test SetTimespec return value.
5132         * gm2-libs-iso/wrapclock.def (GetTimespec): Add integer
5133         return type.
5134         (SetTimespec): Add integer return type.
5136 2023-08-05  Gaius Mulley  <gaiusmod2@gmail.com>
5138         PR modula2/110779
5139         * gm2-libs-iso/SysClock.mod: Re-implement using wrapclock.
5140         * gm2-libs-iso/wrapclock.def: New file.
5142 2023-08-01  Gaius Mulley  <gaiusmod2@gmail.com>
5144         PR modula2/110161
5145         * gm2-compiler/M2Check.mod (checkProcTypeEquivalence): New
5146         procedure function.
5147         (checkTypeKindEquivalence): Call checkProcTypeEquivalence
5148         if either left or right is a proc type.
5149         * gm2-compiler/M2Quads.mod (BuildRelOp): Create
5150         combinedTok prior to creating the range check quadruple.
5151         Use combinedTok when creating the range check quadruple.
5153 2023-08-01  Gaius Mulley  <gaiusmod2@gmail.com>
5155         PR modula2/110865
5156         * gm2-compiler/M2Quads.mod (BuildDesignatorArray):
5157         Rename t as type and d as dim.  New variable result.
5158         Allow constants of an array type to be indexed.
5160 2023-07-25  Gaius Mulley  <gaiusmod2@gmail.com>
5162         PR modula2/110174
5163         * gm2-compiler/M2GCCDeclare.def (PromoteToCString): New procedure
5164         function.
5165         * gm2-compiler/M2GCCDeclare.mod (PromoteToCString): New procedure
5166         function.
5167         * gm2-compiler/M2GenGCC.mod (BuildTreeFromInterface): Call
5168         skip_const_decl before chaining the parameter value.
5169         Use PromoteToCString to ensure the string is nul terminated.
5170         (CodeInline): Remove all parameters and replace with quad.
5171         Use GetQuadOtok to get operand token numbers.
5172         Remove call to DeclareConstant and replace it with PromoteToCString.
5173         * gm2-compiler/M2Quads.def (BuildInline): Rename into ...
5174         (BuildAsm): ... this.
5175         * gm2-compiler/M2Quads.mod: (BuildInline): Rename into ...
5176         (BuildAsm): ... this.
5177         (BuildAsmElement): Add debugging.
5178         * gm2-compiler/P1Build.bnf: Remove import of BuildInline.
5179         * gm2-compiler/P2Build.bnf: Remove import of BuildInline.
5180         * gm2-compiler/P3Build.bnf: Remove import of BuildInline and
5181         import BuildAsm.
5182         * gm2-compiler/PHBuild.bnf: Remove import of BuildInline.
5183         * gm2-libs-iso/SysClock.mod (foo): Remove.
5184         * gm2-libs/FIO.mod (BufferedRead): Rename parameter a to dest.
5185         Rename variable t to src.
5186         * m2pp.cc (pf): Correct block comment.
5187         (pe): Correct block comment.
5188         (m2pp_asm_expr): New function.
5189         (m2pp_statement): Call m2pp_asm_expr.
5191 2023-07-22  Gaius Mulley  <gaiusmod2@gmail.com>
5193         PR modula2/110631
5194         * gm2-libs/FIO.def (ReadAny): Correct comment as
5195         HIGH (a) + 1 is number of bytes.
5196         (WriteAny): Correct comment as HIGH (a) + 1 is number of
5197         bytes.
5198         * gm2-libs/FIO.mod (ReadAny): Correct comment as
5199         HIGH (a) + 1 is number of bytes.  Also pass HIGH (a) + 1
5200         to BufferedRead.
5201         (WriteAny): Correct comment as HIGH (a) + 1 is number of
5202         bytes.  Also pass HIGH (a) + 1 to BufferedWrite.
5203         (BufferedWrite): Rename parameter a to src, rename variable
5204         t to dest.  Correct parameter order to memcpy.
5206 2023-07-20  Gaius Mulley  <gaiusmod2@gmail.com>
5208         * gm2-compiler/M2SymInit.mod (IsExempt): Remove parameter exemption.
5209         (CheckIndrX): Call SetupLAlias between lhs and content.
5210         (trashParam): Re-write.
5211         (SetVarLRInitialized): Indicate shadow and heap are initialized.
5212         Call SetupIndr between shadow and heap.
5213         * gm2-compiler/P2SymBuild.mod: Import
5214         PutProcedureParameterHeapVars.
5215         (EndBuildProcedure): Call PutProcedureParameterHeapVars.
5216         * gm2-compiler/SymbolTable.def (GetParameterHeapVar): New
5217         procedure function.
5218         (PutProcedureParameterHeapVars): New procedure function.
5219         * gm2-compiler/SymbolTable.mod (MakeParameterHeapVar): New
5220         procedure function.
5221         (GetParameterHeapVar): New procedure function.
5222         (PuttParameterHeapVar): New procedure function.
5223         (PutProcedureParameterHeapVars): New procedure.
5224         (VarParam): HeapVar new record field.
5225         (PutVarParam): HeapVar assigned to NulSym.
5227 2023-07-19  Gaius Mulley  <gaiusmod2@gmail.com>
5229         PR modula2/110284
5230         * Make-lang.in (m2_OBJS): Add m2/gm2-gcc/rtegraph.o and
5231         m2/gm2-compiler-boot/m2flex.o.
5232         (c-family/m2pp.o): Remove.
5233         * Make-maintainer.in (c-family/m2pp.o): Add.
5235 2023-07-19  Gaius Mulley  <gaiusmod2@gmail.com>
5237         * gm2-compiler/M2Quads.mod (BuildDifAdrFunction): Removed
5238         unnecessary in error message.  Use vartok for location.
5239         (BuildOddFunction): Use optok for location.
5240         (BuildAbsFunction): Use vartok for location.  Bugfix set vartok.
5241         (BuildCapFunction): Use optok for location.
5242         (BuildOrdFunction): Use optok for location and correct format
5243         specifier.
5244         (BuildShiftFunction): Use vartok for location.
5245         (BuildRotateFunction): Use vartok for location.
5246         (BuildTruncFunction): Use vartok for location.
5247         (BuildFloatFunction): Use vartok for location.
5248         (BuildReFunction): Use vartok for location.
5249         (BuildImFunction): Use vartok for location.
5250         * gm2-compiler/M2SymInit.mod (trashParam): Remove commented code.
5252 2023-07-19  Gaius Mulley  <gaiusmod2@gmail.com>
5254         * gm2-compiler/M2Quads.mod (BuildRealFuncProcCall): Set the trash
5255         parameter value to NIL if DEALLOCATE is detected.
5256         * gm2-compiler/M2SymInit.mod (CheckDeferredRecordAccess): Pass
5257         tok to SetVarInitialized.  Pass tok to GetVarComponentInitialized.
5258         (ComponentFindVar): Add tok parameter.  Check aliased pointer
5259         against Nil and generate warning if necessary.
5260         (deRefComponent): Add tok and sym parameters and pass them to
5261         getContent.
5262         (SetVarComponentInitialized): Add tok parameter.  Pass tok to
5263         ComponentFindVar.  Pass tok and sym to deRefComponent.
5264         (GetVarComponentInitialized): Add tok parameter.  Pass tok to
5265         ComponentFindVar.  Pass tok to deRefComponent.
5266         (SetVarInitialized): Add tok parameter.  Pass tok to
5267         SetVarComponentInitialized.
5268         (doGetVarInitialized): Add tok parameter.  Pass tok to
5269         GetVarComponentInitialized.
5270         (CheckXIndr): Pass lhs and lhstok to getContent.
5271         (CheckIndrX): Pass rhs and rhstok to getContent.
5272         (CheckBecomes): Pass destok to ComponentFindVar.  Pass des and
5273         destok to deRefComponent.
5274         (CheckAddr): Pass contenttok to GetVarInitialized.  Pass ptrtok
5275         to SetVarInitialized.
5276         (CheckReadBeforeInitQuad): Pass op1tok to SetVarInitialized for
5277         op1 cases and op3tok for op3 cases.
5278         (trashParam): Get operand tokens.  Pass op3tok to
5279         SetVarInitialized.  Pass op3 and op3tok to getContent.
5280         Alias ptr to NIL if procedure is DEALLOCATE.  Pass op3tok to
5281         SetVarInitialized.
5282         (IsDeallocate): New procedure function.
5283         (DetectTrash): Use IsDeallocate.
5284         (SetupLAlias): Allow exp to be Nil.
5285         (getContent): Generate warning message if ptr is Nil.
5287 2023-07-18  Gaius Mulley  <gaiusmod2@gmail.com>
5289         * Make-lang.in: Minor formatting change.
5290         * gm2-compiler/M2GCCDeclare.mod
5291         (DeclareUnboundedProcedureParameters): Rename local variables.
5292         (WalkUnboundedProcedureParameters): Rename local variables.
5293         (DoVariableDeclaration): Avoid declaration of a variable if
5294         it is on the heap (used by static analysis only).
5295         * gm2-compiler/M2GenGCC.mod: Formatting.
5296         * gm2-compiler/M2Quads.def (GetQuadTrash): New procedure function.
5297         * gm2-compiler/M2Quads.mod (GetQuadTrash): New procedure function.
5298         (QuadFrame): Add Trash field.
5299         (BuildRealFuncProcCall): Detect ALLOCATE and DEALLOCATE and create
5300         a heap variable for parameter 1 saving it as the trashed variable
5301         for static analysis.
5302         (GenQuadOTrash): New procedure.
5303         (DisplayQuadRange): Bugfix.  Write the scope number.
5304         * gm2-compiler/M2SymInit.mod: Rewritten to separate LValue
5305         equivalence from LValue to RValue pairings.  Comprehensive
5306         detection of variant record implemented.  Allow dereferencing
5307         of pointers through LValue/RValue chains.
5308         * gm2-compiler/SymbolTable.def (PutVarHeap): New procedure.
5309         (IsVarHeap): New procedure function.
5310         (ForeachParamSymDo): New procedure.
5311         * gm2-compiler/SymbolTable.mod (PutVarHeap): New procedure.
5312         (IsVarHeap): New procedure function.
5313         (ForeachParamSymDo): New procedure.
5314         (MakeVariableForParam): Reformatted.
5315         (CheckForUnknownInModule): Reformatted.
5316         (SymVar): Add field Heap.
5317         (MakeVar): Assign Heap to FALSE.
5319 2023-07-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5321         * Make-lang.in (m2/boot-bin/mklink$(exeext)): Add $(LDFLAGS).
5323 2023-07-11  Gaius Mulley  <gaiusmod2@gmail.com>
5325         * gm2-compiler/M2BasicBlock.def (InitBasicBlocksFromRange): New
5326         parameter ScopeSym.
5327         * gm2-compiler/M2BasicBlock.mod (ConvertQuads2BasicBlock): New
5328         parameter ScopeSym.
5329         (InitBasicBlocksFromRange): New parameter ScopeSym.  Call
5330         ConvertQuads2BasicBlock with ScopeSym.
5331         (DisplayBasicBlocks): Uncomment.
5332         * gm2-compiler/M2Code.mod: Replace VariableAnalysis with
5333         ScopeBlockVariableAnalysis.
5334         (InitialDeclareAndOptiomize): Add parameter scope.
5335         (SecondDeclareAndOptimize): Add parameter scope.
5336         * gm2-compiler/M2GCCDeclare.mod (DeclareConstructor): Add scope
5337         parameter to DeclareTypesConstantsProceduresInRange.
5338         (DeclareTypesConstantsProceduresInRange): New parameter scope.
5339         Pass scope to DisplayQuadRange.  Reformatted.
5340         * gm2-compiler/M2GenGCC.def (ConvertQuadsToTree): New parameter
5341         scope.
5342         * gm2-compiler/M2GenGCC.mod (ConvertQuadsToTree): New parameter
5343         scope.
5344         * gm2-compiler/M2Optimize.mod (KnownReachable): New parameter
5345         scope.
5346         * gm2-compiler/M2Options.def (SetUninitVariableChecking): Add
5347         arg parameter.
5348         * gm2-compiler/M2Options.mod (SetUninitVariableChecking): Add
5349         arg parameter and set boolean UninitVariableChecking and
5350         UninitVariableConditionalChecking.
5351         (UninitVariableConditionalChecking): New boolean set to FALSE.
5352         * gm2-compiler/M2Quads.def (IsGoto): New procedure function.
5353         (DisplayQuadRange): Add scope parameter.
5354         (LoopAnalysis): Add scope parameter.
5355         * gm2-compiler/M2Quads.mod: Import PutVarArrayRef.
5356         (IsGoto): New procedure function.
5357         (LoopAnalysis): Add scope parameter and use MetaErrorT1 instead
5358         of WarnStringAt.
5359         (BuildStaticArray): Call PutVarArrayRef.
5360         (BuildDynamicArray): Call PutVarArrayRef.
5361         (DisplayQuadRange): Add scope parameter.
5362         (GetM2OperatorDesc): Add relational condition cases.
5363         * gm2-compiler/M2Scope.def (ScopeProcedure): Add parameter.
5364         * gm2-compiler/M2Scope.mod (DisplayScope): Pass scopeSym to
5365         DisplayQuadRange.
5366         (ForeachScopeBlockDo): Pass scopeSym to p.
5367         * gm2-compiler/M2SymInit.def (VariableAnalysis): Rename to ...
5368         (ScopeBlockVariableAnalysis): ... this.
5369         * gm2-compiler/M2SymInit.mod (ScopeBlockVariableAnalysis): Add
5370         scope parameter.
5371         (bbEntry): New pointer to record.
5372         (bbArray): New array.
5373         (bbFreeList): New variable.
5374         (errorList): New list.
5375         (IssueConditional): New procedure.
5376         (GenerateNoteFlow): New procedure.
5377         (IssueWarning): New procedure.
5378         (IsUniqueWarning): New procedure.
5379         (CheckDeferredRecordAccess): Re-implement.
5380         (CheckBinary): Add warning and lst parameters.
5381         (CheckUnary): Add warning and lst parameters.
5382         (CheckXIndr): Add warning and lst parameters.
5383         (CheckIndrX): Add warning and lst parameters.
5384         (CheckBecomes): Add warning and lst parameters.
5385         (CheckComparison): Add warning and lst parameters.
5386         (CheckReadBeforeInitQuad): Add warning and lst parameters to all
5387         Check procedures.  Add all case quadruple clauses.
5388         (FilterCheckReadBeforeInitQuad): Add warning and lst parameters.
5389         (CheckReadBeforeInitFirstBasicBlock): Add warning and lst parameters.
5390         (bbArrayKill): New procedure.
5391         (DumpBBEntry): New procedure.
5392         (DumpBBArray): New procedure.
5393         (DumpBBSequence): New procedure.
5394         (TestBBSequence): New procedure.
5395         (CreateBBPermultations): New procedure.
5396         (ScopeBlockVariableAnalysis): New procedure.
5397         (GetOp3): New procedure.
5398         (GenerateCFG): New procedure.
5399         (NewEntry): New procedure.
5400         (AppendEntry): New procedure.
5401         (init): Initialize bbFreeList and errorList.
5402         * gm2-compiler/SymbolTable.def (PutVarArrayRef): New procedure.
5403         (IsVarArrayRef): New procedure function.
5404         * gm2-compiler/SymbolTable.mod (SymVar): ArrayRef new field.
5405         (MakeVar): Set ArrayRef to FALSE.
5406         (PutVarArrayRef): New procedure.
5407         (IsVarArrayRef): New procedure function.
5408         * gm2-gcc/init.cc (_M2_M2SymInit_init): New prototype.
5409         (init_PerCompilationInit): Add call to _M2_M2SymInit_init.
5410         * gm2-gcc/m2options.h (M2Options_SetUninitVariableChecking):
5411         New definition.
5412         * gm2-lang.cc (gm2_langhook_handle_option): Add new case
5413         OPT_Wuninit_variable_checking_.
5414         * lang.opt: Wuninit-variable-checking= new entry.
5416 2023-07-03  Gaius Mulley  <gaiusmod2@gmail.com>
5418         PR modula2/110125
5419         * Make-lang.in (GM2-COMP-BOOT-DEFS): Add M2SymInit.def.
5420         (GM2-COMP-BOOT-MODS): Add M2SymInit.mod.
5421         * gm2-compiler/M2BasicBlock.mod: Formatting changes.
5422         * gm2-compiler/M2Code.mod: Remove import of VariableAnalysis from
5423         M2Quads.  Import VariableAnalysis from M2SymInit.mod.
5424         * gm2-compiler/M2GCCDeclare.mod (PrintVerboseFromList):
5425         Add debugging print for a component.
5426         (TypeConstFullyDeclared): Call RememberType for every type.
5427         * gm2-compiler/M2GenGCC.mod (CodeReturnValue): Add parameter to
5428         GetQuadOtok.
5429         (CodeBecomes): Add parameter to GetQuadOtok.
5430         (CodeXIndr): Add parameter to GetQuadOtok.
5431         * gm2-compiler/M2Optimize.mod (ReduceBranch): Reformat and
5432         preserve operand token positions when reducing the branch
5433         quadruples.
5434         (ReduceGoto): Reformat.
5435         (FoldMultipleGoto): Reformat.
5436         (KnownReachable): Reformat.
5437         * gm2-compiler/M2Options.def (UninitVariableChecking): New
5438         variable declared and exported.
5439         (SetUninitVariableChecking): New procedure.
5440         * gm2-compiler/M2Options.mod (SetWall): Set
5441         UninitVariableChecking.
5442         (SetUninitVariableChecking): New procedure.
5443         * gm2-compiler/M2Quads.def (PutQuadOtok): Exported and declared.
5444         (VariableAnalysis): Removed.
5445         * gm2-compiler/M2Quads.mod (PutQuadOtok): New procedure.
5446         (doVal): Reformatted.
5447         (MarkAsWrite): Reformatted.
5448         (MarkArrayAsWritten): Reformatted.
5449         (doIndrX): Use PutQuadOtok.
5450         (MakeRightValue): Use GenQuadOtok.
5451         (MakeLeftValue): Use GenQuadOtok.
5452         (CheckReadBeforeInitialized): Remove.
5453         (IsNeverAltered): Reformat.
5454         (DebugLocation): New procedure.
5455         (BuildDesignatorPointer): Use GenQuadO to preserve operand token
5456         position.
5457         (BuildRelOp): Use GenQuadOtok ditto.
5458         * gm2-compiler/SymbolTable.def (VarCheckReadInit): New procedure.
5459         (VarInitState): New procedure.
5460         (PutVarInitialized): New procedure.
5461         (PutVarFieldInitialized): New procedure function.
5462         (GetVarFieldInitialized): New procedure function.
5463         (PrintInitialized): New procedure.
5464         * gm2-compiler/SymbolTable.mod (VarCheckReadInit): New procedure.
5465         (VarInitState): New procedure.
5466         (PutVarInitialized): New procedure.
5467         (PutVarFieldInitialized): New procedure function.
5468         (GetVarFieldInitialized): New procedure function.
5469         (PrintInitialized): New procedure.
5470         (LRInitDesc): New type.
5471         (SymVar): InitState new field.
5472         (MakeVar): Initialize InitState.
5473         * gm2-gcc/m2options.h (M2Options_SetUninitVariableChecking):
5474         New function declaration.
5475         * gm2-lang.cc (gm2_langhook_handle_option): Detect
5476         OPT_Wuninit_variable_checking and call SetUninitVariableChecking.
5477         * lang.opt: Add Wuninit-variable-checking.
5478         * gm2-compiler/M2SymInit.def: New file.
5479         * gm2-compiler/M2SymInit.mod: New file.
5481 2023-06-30  Iain Sandoe  <iain@sandoe.co.uk>
5483         PR testsuite/108835
5484         * gm2-libs/RTint.mod: Do not use NIL timeout setting on select,
5485         test failures sequentially, finishing on the first success.
5487 2023-06-18  Gaius Mulley  <gaiusmod2@gmail.com>
5489         PR modula2/110284
5490         * Make-lang.in (m2_OBJS): Assign $(GM2_C_OBJS).
5491         (GM2_C_OBJS): Remove m2/stor-layout.o.
5492         (m2/stor-layout.o): Remove rule.
5493         * gm2-gcc/gcc-consolidation.h (rtl.h): Remove include.
5494         (df.h): Remove include.
5495         (except.h): Remove include.
5497 2023-06-15  Marek Polacek  <polacek@redhat.com>
5499         * Make-lang.in: New var, GM2_PICFLAGS.  Use it.
5501 2023-06-13  Gaius Mulley  <gaiusmod2@gmail.com>
5503         * Make-lang.in (check-format-error): New rule.
5504         * gm2-compiler/M2MetaError.mod (op): Add calls InternalError if
5505         digits are detected.
5506         * gm2-compiler/M2Quads.mod (BuildForToByDo): Bugfix to format
5507         specifier.
5508         (BuildLengthFunction): Bugfix to format specifiers.
5509         (BuildOddFunction): Bugfix to format specifiers.
5510         (BuildAbsFunction): Bugfix to format specifiers.
5511         (BuildCapFunction): Bugfix to format specifiers.
5512         (BuildChrFunction): Bugfix to format specifiers.
5513         (BuildOrdFunction): Bugfix to format specifiers.
5514         (BuildMakeAdrFunction): Bugfix to format specifiers.
5515         (BuildSizeFunction): Bugfix to format specifiers.
5516         (BuildBitSizeFunction): Bugfix to format specifiers.
5517         * tools-src/checkmeta.py: New file.
5519 2023-06-12  Gaius Mulley  <gaiusmod2@gmail.com>
5521         PR modula2/110189
5522         * gm2-compiler/M2Quads.mod (BuildAbsFunction): Replace abort
5523         format specifier.
5524         (BuildValFunction): Replace abort format specifier.
5525         (BuildCastFunction): Replace abort format specifier.
5526         (BuildMinFunction): Replace abort format specifier.
5527         (BuildMaxFunction): Replace abort format specifier.
5528         (BuildTruncFunction): Replace abort format specifier.
5529         * gm2-compiler/P3Build.bnf (Pass1): Remove.
5530         (Pass2): Remove.
5531         (Pass3): Remove.
5532         (Expect): Add Pass1.
5533         (AsmStatement): Remove Pass3.
5534         (AsmOperands): Remove Pass3.
5535         (AsmOperandSpec): Remove Pass3.
5536         (AsmInputElement): Remove Pass3.
5537         (AsmOutputElement): Remove Pass3.
5538         (AsmTrashList): Remove Pass3.
5540 2023-06-12  Gaius Mulley  <gaiusmod2@gmail.com>
5542         PR modula2/110126
5543         * gm2-compiler/M2Quads.def (BuildAsmElement): Remove
5544         trash parameter.
5545         (BuildAsmTrash): New procedure.
5546         * gm2-compiler/M2Quads.mod (BuildAsmTrash): New procedure.
5547         (BuildAsmElement): Remove trash parameter.
5548         * gm2-compiler/P3Build.bnf (AsmTrashList): Rewrite.
5550 2023-06-08  Gaius Mulley  <gaiusmod2@gmail.com>
5552         PR modula2/110126
5553         * gm2-compiler/M2GenGCC.mod (BuildTreeFromInterface): Remove
5554         tokenno parameter.  Use object tok instead of tokenno.
5555         (BuildTrashTreeFromInterface): Use object tok instead of
5556         GetDeclaredMod.
5557         (CodeInline): Remove tokenno from parameter list to BuildTreeFromInterface.
5558         * gm2-compiler/M2Quads.def (BuildAsmElement): Exported and
5559         defined.
5560         * gm2-compiler/M2Quads.mod (BuildOptimizeOff): Reformatted.
5561         (BuildInline): Reformatted.
5562         (BuildLineNo): Reformatted.
5563         (UseLineNote): Reformatted.
5564         (BuildAsmElement): New procedure.
5565         * gm2-compiler/P0SyntaxCheck.bnf (AsmOperands): Use
5566         ConstExpression instead of string.
5567         (AsmElement): Use ConstExpression instead of string.
5568         (TrashList): Use ConstExpression instead of string.
5569         * gm2-compiler/P1Build.bnf (AsmOperands): Use
5570         ConstExpression instead of string.
5571         (AsmElement): Use ConstExpression instead of string.
5572         (TrashList): Use ConstExpression instead of string.
5573         * gm2-compiler/P2Build.bnf (AsmOperands): Use
5574         ConstExpression instead of string.
5575         (AsmElement): Use ConstExpression instead of string.
5576         (TrashList): Use ConstExpression instead of string.
5577         * gm2-compiler/P3Build.bnf (AsmOperands): Rewrite.
5578         (AsmOperandSpec): Rewrite.
5579         (AsmOutputList): New rule.
5580         (AsmInputList): New rule.
5581         (TrashList): Rewrite.
5582         * gm2-compiler/PCBuild.bnf (AsmOperands): Use
5583         ConstExpression instead of string.
5584         (AsmElement): Use ConstExpression instead of string.
5585         (TrashList): Use ConstExpression instead of string.
5586         * gm2-compiler/PHBuild.bnf (AsmOperands): Use
5587         ConstExpression instead of string.
5588         (AsmElement): Use ConstExpression instead of string.
5589         (TrashList): Use ConstExpression instead of string.
5590         * gm2-compiler/SymbolTable.def (PutRegInterface):
5591         Rewrite interface.
5592         (GetRegInterface): Rewrite interface.
5593         * gm2-compiler/SymbolTable.mod (SetFirstUsed): New procedure.
5594         (PutFirstUsed): New procedure.
5595         (PutRegInterface): Rewrite.
5596         (GetRegInterface): Rewrite.
5598 2023-06-07  Jakub Jelinek  <jakub@redhat.com>
5600         * Make-lang.in: Build $(generated_files) before building
5601         all $(GM2_C_OBJS).
5603 2023-06-07  Gaius Mulley  <gaiusmod2@gmail.com>
5605         PR modula2/110019
5606         * gm2-compiler/SymbolKey.mod (SearchAndDo): Reformatted.
5607         (ForeachNodeDo): Reformatted.
5608         * gm2-compiler/SymbolTable.mod (AddListify): Join list
5609         with "," or "and" if more than one word is in the list.
5610         * m2.flex: Remove -1 from atoi(yytext) line number.
5612 2023-06-03  Gaius Mulley  <gaiusmod2@gmail.com>
5614         PR modula2/110003
5615         * gm2-compiler/P2SymBuild.mod (GetParameterShadowVar): Import.
5616         (CheckFormalParameterSection): Call PutDeclared for the shadow
5617         variable associated with the parameter.
5619 2023-05-24  Gaius Mulley  <gaiusmod2@gmail.com>
5621         PR modula2/109952
5622         * Make-maintainer.in: Change header to include emacs file mode.
5623         * gm2-compiler/M2GenGCC.mod (BuildHighFromChar): Check whether
5624         operand is a constant string and is nul terminated then return one.
5625         * gm2-compiler/PCSymBuild.mod (WalkFunction): Add default return
5626         TRUE.  Static analysis missing return path fix.
5627         * gm2-libs/IO.mod (Init): Rewrite to help static analysis.
5628         * target-independent/m2/gm2-libs.texi: Rebuild.
5630 2023-05-19  Gaius Mulley  <gaiusmod2@gmail.com>
5632         PR modula2/109908
5633         * gm2-libs-iso/Strings.mod (Delete): Re-implement.
5635 2023-05-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
5637         * gm2-gcc/m2builtins.cc (doradix): Use _P defines from tree.h.
5638         (doplaces): Ditto.
5639         (doexponentmin): Ditto.
5640         (doexponentmax): Ditto.
5641         (dolarge): Ditto.
5642         (dosmall): Ditto.
5643         (dogUnderflow): Ditto.
5644         * gm2-gcc/m2convert.cc (unsafe_conversion_p): Ditto.
5645         * gm2-gcc/m2expr.cc (m2expr_build_unary_op_check): Ditto.
5646         (m2expr_build_binary_op_check): Ditto.
5647         * gm2-gcc/m2tree.cc (m2tree_is_var): Ditto.
5648         * gm2-gcc/m2treelib.cc (build_modify_expr): Ditto.
5649         * gm2-gcc/m2type.cc (gm2_finish_decl): Ditto.
5650         * m2pp.cc (hextree): Ditto.
5651         (m2pp_call_expr): Ditto.
5653 2023-05-17  Gaius Mulley  <gaiusmod2@gmail.com>
5655         * gm2-libs-iso/LongWholeIO.mod (WriteInt): Only request a
5656         sign if the value is < 0.
5657         * gm2-libs-iso/ShortWholeIO.mod (WriteInt): Only request a
5658         sign if the value is < 0.
5659         * gm2-libs-iso/WholeIO.mod (WriteInt): Only request a sign
5660         if the value is < 0.
5661         * gm2-libs-iso/WholeStr.mod (WriteInt): Only request a sign
5662         if the value is < 0.
5664 2023-05-16  Gaius Mulley  <gaiusmod2@gmail.com>
5666         PR modula2/109879
5667         * gm2-libs-iso/LongIO.mod (ReadReal): Call SkipSpaces.
5668         * gm2-libs-iso/LongWholeIO.mod (ReadInt): Call SkipSpaces.
5669         (ReadCard): Call SkipSpaces.
5670         * gm2-libs-iso/RealIO.mod (ReadReal): Call SkipSpaces.
5671         * gm2-libs-iso/ShortWholeIO.mod: (ReadInt): Call SkipSpaces.
5672         (ReadCard): Call SkipSpaces.
5673         * gm2-libs-iso/TextIO.mod: Import SkipSpaces.
5674         * gm2-libs-iso/WholeIO.mod (ReadInt): Call SkipSpaces.
5675         (ReadCard): Call SkipSpaces.
5676         * gm2-libs-iso/TextUtil.def: New file.
5677         * gm2-libs-iso/TextUtil.mod: New file.
5679 2023-05-16  Gaius Mulley  <gaiusmod2@gmail.com>
5681         PR modula2/108344
5682         * gm2-libs-coroutines/TimerHandler.mod (EnableLED): New constant.
5683         (Timer): Test EnableLED before switching on the scroll LED.
5685 2023-05-12  Gaius Mulley  <gaiusmod2@gmail.com>
5687         PR modula2/109830
5688         * gm2-libs-iso/SeqFile.mod (newCid): New parameter toAppend
5689         used to select FIO.OpenForRandom.
5690         (OpenRead): Pass extra parameter to newCid.
5691         (OpenWrite): Pass extra parameter to newCid.
5692         (OpenAppend): Pass extra parameter to newCid.
5694 2023-05-11  Gaius Mulley  <gaiusmod2@gmail.com>
5696         PR modula2/109810
5697         * gm2-compiler/M2ALU.mod (ConvertConstToType): Use
5698         PrepareCopyString in place of DoCopyString.
5699         * gm2-compiler/M2GenGCC.def (DoCopyString): Rename to ...
5700         (PrepareCopyString): ... this.
5701         * gm2-compiler/M2GenGCC.mod (CodeStatement): Call CodeReturnValue
5702         with a single parameter.  Call CodeXIndr with a single parameter.
5703         (CodeReturnValue): Remove parameters and replace with a single
5704         quadno.  Reimplement using PrepareCopyString.  Issue error
5705         if the string exceeds designator space.
5706         (DoCopyString): Reimplement and rename to ...
5707         (PrepareCopyString): ... this.
5708         (CodeXIndr): Remove parameters and replace with a single
5709         quadno.  Reimplement using PrepareCopyString.  Issue error
5710         if the string exceeds designator space.
5711         (CodeBecomes): Remove parameters and replace with a single
5712         quadno.  Reimplement using PrepareCopyString.  Issue error
5713         if the string exceeds designator space.
5714         * gm2-compiler/M2Quads.def (BuildReturn): Rename parameter to
5715         tokreturn.
5716         * gm2-compiler/M2Quads.mod (BuildReturn): Rename parameter to
5717         tokreturn.  Rename tokno to tokcombined.
5719 2023-05-09  Gaius Mulley  <gaiusmod2@gmail.com>
5721         PR modula2/109779
5722         * gm2-libs-iso/RTgen.mod (doLook): Remove old.
5723         Remove re-assignment of result.
5724         * gm2-libs-iso/TextIO.mod (CanRead): Rename into ...
5725         (CharAvailable): ... this.
5726         (DumpState): New procedure.
5727         (SetResult): Rename as SetNul.
5728         (WasGoodChar): Rename into ...
5729         (EofOrEoln): ... this.
5730         (SkipLine): Skip over the newline.
5731         (ReadString): Flip THEN ELSE statements after testing for
5732         EofOrEoln.
5733         (ReadRestLine): Flip THEN ELSE statements after testing for
5734         EofOrEoln.
5736 2023-05-04  Gaius Mulley  <gaiusmod2@gmail.com>
5738         PR modula2/109729
5739         * gm2-compiler/M2GenGCC.mod (CodeStatement): Detect
5740         ArithAddOp and call CodeAddChecked.
5741         (ResolveConstantExpressions): Detect ArithAddOp and call
5742         FoldArithAdd.
5743         (FoldArithAdd): New procedure.
5744         (FoldAdd): Refactor to use FoldArithAdd.
5745         * gm2-compiler/M2Quads.def (QuadOperator): Add ArithAddOp.
5746         * gm2-compiler/M2Quads.mod: Remove commented imports.
5747         (QuadFrame): Changed comments to use GNU coding standards.
5748         (ArithPlusTok): New global variable.
5749         (BuildForToByDo): Use ArithPlusTok instead of PlusTok.
5750         (MakeOp): Detect ArithPlusTok and return ArithAddOp.
5751         (WriteQuad): Add ArithAddOp clause.
5752         (WriteOperator): Add ArithAddOp clause.
5753         (Init): Initialize ArithPlusTok.
5755 2023-05-04  Gaius Mulley  <gaiusmod2@gmail.com>
5757         PR modula2/109675
5758         * Make-lang.in (MC-LIB-DEFS): Remove M2LINK.def.
5759         (BUILD-PGE-O): Remove GM2LINK.o.
5760         * Make-maintainer.in (PPG-DEFS): New define.
5761         (PPG-LIB-DEFS): Remove M2LINK.def.
5762         (BUILD-BOOT-PPG-H): Add PPGDEF .h files.
5763         (m2/ppg$(exeext)): Remove M2LINK.o
5764         (PGE-DEPS): New define.
5765         (m2/pg$(exeext)): Remove M2LINK.o.
5766         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Add -Im2/gm2-pge-boot.
5767         (m2/pge$(exeext)): Remove M2LINK.o.
5768         (pge-maintainer): Re-implement.
5769         (pge-libs-push): Re-implement.
5770         (m2/m2obj3/cc1gm2$(exeext)): Remove M2LINK.o.
5771         * gm2-libs/DynamicStrings.mod (writeAddress): Re-implement
5772         using snprintf.
5773         * gm2-libs/M2Dependent.mod: Remove commented out imports.
5774         * mc-boot/GDynamicStrings.cc: Rebuild.
5775         * mc-boot/GFIO.cc: Rebuild.
5776         * mc-boot/GFormatStrings.cc: Rebuild.
5777         * mc-boot/GM2Dependent.cc: Rebuild.
5778         * mc-boot/GM2Dependent.h: Rebuild.
5779         * mc-boot/GM2RTS.cc: Rebuild.
5780         * mc-boot/GM2RTS.h: Rebuild.
5781         * mc-boot/GRTExceptions.cc: Rebuild.
5782         * mc-boot/GRTint.cc: Rebuild.
5783         * mc-boot/GSFIO.cc: Rebuild.
5784         * mc-boot/GStringConvert.cc: Rebuild.
5785         * mc-boot/Gdecl.cc: Rebuild.
5786         * pge-boot/GASCII.cc: Rebuild.
5787         * pge-boot/GASCII.h: Rebuild.
5788         * pge-boot/GArgs.cc: Rebuild.
5789         * pge-boot/GArgs.h: Rebuild.
5790         * pge-boot/GAssertion.cc: Rebuild.
5791         * pge-boot/GAssertion.h: Rebuild.
5792         * pge-boot/GBreak.h: Rebuild.
5793         * pge-boot/GCmdArgs.h: Rebuild.
5794         * pge-boot/GDebug.cc: Rebuild.
5795         * pge-boot/GDebug.h: Rebuild.
5796         * pge-boot/GDynamicStrings.cc: Rebuild.
5797         * pge-boot/GDynamicStrings.h: Rebuild.
5798         * pge-boot/GEnvironment.h: Rebuild.
5799         * pge-boot/GFIO.cc: Rebuild.
5800         * pge-boot/GFIO.h: Rebuild.
5801         * pge-boot/GFormatStrings.h:: Rebuild.
5802         * pge-boot/GFpuIO.h:: Rebuild.
5803         * pge-boot/GIO.cc: Rebuild.
5804         * pge-boot/GIO.h: Rebuild.
5805         * pge-boot/GIndexing.cc: Rebuild.
5806         * pge-boot/GIndexing.h: Rebuild.
5807         * pge-boot/GLists.cc: Rebuild.
5808         * pge-boot/GLists.h: Rebuild.
5809         * pge-boot/GM2Dependent.cc: Rebuild.
5810         * pge-boot/GM2Dependent.h: Rebuild.
5811         * pge-boot/GM2EXCEPTION.cc: Rebuild.
5812         * pge-boot/GM2EXCEPTION.h: Rebuild.
5813         * pge-boot/GM2RTS.cc: Rebuild.
5814         * pge-boot/GM2RTS.h: Rebuild.
5815         * pge-boot/GNameKey.cc: Rebuild.
5816         * pge-boot/GNameKey.h: Rebuild.
5817         * pge-boot/GNumberIO.cc: Rebuild.
5818         * pge-boot/GNumberIO.h: Rebuild.
5819         * pge-boot/GOutput.cc: Rebuild.
5820         * pge-boot/GOutput.h: Rebuild.
5821         * pge-boot/GPushBackInput.cc: Rebuild.
5822         * pge-boot/GPushBackInput.h: Rebuild.
5823         * pge-boot/GRTExceptions.cc: Rebuild.
5824         * pge-boot/GRTExceptions.h: Rebuild.
5825         * pge-boot/GSArgs.h: Rebuild.
5826         * pge-boot/GSEnvironment.h: Rebuild.
5827         * pge-boot/GSFIO.cc: Rebuild.
5828         * pge-boot/GSFIO.h: Rebuild.
5829         * pge-boot/GSYSTEM.h: Rebuild.
5830         * pge-boot/GScan.h: Rebuild.
5831         * pge-boot/GStdIO.cc: Rebuild.
5832         * pge-boot/GStdIO.h: Rebuild.
5833         * pge-boot/GStorage.cc: Rebuild.
5834         * pge-boot/GStorage.h: Rebuild.
5835         * pge-boot/GStrCase.cc: Rebuild.
5836         * pge-boot/GStrCase.h: Rebuild.
5837         * pge-boot/GStrIO.cc: Rebuild.
5838         * pge-boot/GStrIO.h: Rebuild.
5839         * pge-boot/GStrLib.cc: Rebuild.
5840         * pge-boot/GStrLib.h: Rebuild.
5841         * pge-boot/GStringConvert.h: Rebuild.
5842         * pge-boot/GSymbolKey.cc: Rebuild.
5843         * pge-boot/GSymbolKey.h: Rebuild.
5844         * pge-boot/GSysExceptions.h: Rebuild.
5845         * pge-boot/GSysStorage.cc: Rebuild.
5846         * pge-boot/GSysStorage.h: Rebuild.
5847         * pge-boot/GTimeString.h: Rebuild.
5848         * pge-boot/GUnixArgs.h: Rebuild.
5849         * pge-boot/Gbnflex.cc: Rebuild.
5850         * pge-boot/Gbnflex.h: Rebuild.
5851         * pge-boot/Gdtoa.h: Rebuild.
5852         * pge-boot/Gerrno.h: Rebuild.
5853         * pge-boot/Gldtoa.h: Rebuild.
5854         * pge-boot/Glibc.h: Rebuild.
5855         * pge-boot/Glibm.h: Rebuild.
5856         * pge-boot/Gpge.cc: Rebuild.
5857         * pge-boot/Gtermios.h: Rebuild.
5858         * pge-boot/Gwrapc.h: Rebuild.
5859         * mc-boot/GM2LINK.h: Removed.
5860         * pge-boot/GM2LINK.cc: Removed.
5861         * pge-boot/GM2LINK.h: Removed.
5863 2023-04-30  Gaius Mulley  <gaiusmod2@gmail.com>
5865         * gm2-compiler/SymbolTable.mod (ConstLitPoolEntry): New
5866         pointer to record.
5867         (ConstLitSym): New field RangeError.
5868         (ConstLitPoolTree): New SymbolTree representing name to
5869         index.
5870         (ConstLitArray): New dynamic array containing pointers
5871         to a ConstLitPoolEntry.
5872         (CreateConstLit): New procedure function.
5873         (LookupConstLitPoolEntry): New procedure function.
5874         (AddConstLitPoolEntry): New procedure function.
5875         (MakeConstLit): Re-implemented to check the constant lit
5876         pool before calling CreateConstLit.
5877         * m2.flex: Add ability to decode binary constant literals.
5879 2023-04-26  Gaius Mulley  <gaiusmod2@gmail.com>
5881         PR modula2/108121
5882         * gm2-compiler/M2ALU.mod (Less): Reformatted.
5883         * gm2-compiler/SymbolTable.mod (DetermineSizeOfConstant): Remove
5884         from import.
5885         (ConstantStringExceedsZType): Import.
5886         (GetConstLitType): Re-implement using ConstantStringExceedsZType.
5887         * gm2-gcc/m2decl.cc (m2decl_DetermineSizeOfConstant): Remove.
5888         (m2decl_ConstantStringExceedsZType): New function.
5889         (m2decl_BuildConstLiteralNumber): Re-implement.
5890         * gm2-gcc/m2decl.def (DetermineSizeOfConstant): Remove.
5891         (ConstantStringExceedsZType): New function.
5892         * gm2-gcc/m2decl.h (m2decl_DetermineSizeOfConstant): Remove.
5893         (m2decl_ConstantStringExceedsZType): New function.
5894         * gm2-gcc/m2expr.cc (append_digit): Remove.
5895         (m2expr_interpret_integer): Remove.
5896         (append_m2_digit): Remove.
5897         (m2expr_StrToWideInt): New function.
5898         (m2expr_interpret_m2_integer): Remove.
5899         * gm2-gcc/m2expr.def (CheckConstStrZtypeRange): New function.
5900         * gm2-gcc/m2expr.h (m2expr_StrToWideInt): New function.
5901         * gm2-gcc/m2type.cc (build_m2_word64_type_node): New function.
5902         (build_m2_ztype_node): New function.
5903         (m2type_InitBaseTypes): Call build_m2_ztype_node.
5904         * gm2-lang.cc (gm2_type_for_size): Re-write using early returns.
5906 2023-04-21  Arsen Arsenović  <arsen@aarsen.me>
5908         * Make-lang.in: Remove references to $(P).
5909         * Make-maintainer.in: Ditto.
5911 2023-04-21  Gaius Mulley  <gaiusmod2@gmail.com>
5913         PR modula2/109586
5914         * gm2-gcc/m2tree.cc (m2tree_IsAConstant): Add (TREE_CODE
5915         (t) == CONSTRUCTOR) to expression.
5917 2023-04-13  Gaius Mulley  <gaiusmod2@gmail.com>
5919         PR modula2/109488
5920         * lang.opt: Fix typo "maybe" to "may be".
5922 2023-04-13  Gaius Mulley  <gaiusmod2@gmail.com>
5924         * gm2-compiler/M2ALU.def (PopChar): New procedure function.
5925         * gm2-compiler/M2ALU.mod (PopChar): New procedure function.
5926         * gm2-compiler/M2GCCDeclare.mod (PromoteToString): Detect
5927         a single constant char and build a C string.
5928         * gm2-compiler/M2GenGCC.mod (IsConstStr): New procedure
5929         function.
5930         (GetStr): New procedure function.
5931         (FoldAdd): Use IsConstStr.
5932         * gm2-compiler/M2Quads.mod: Formatting changes.
5933         * gm2-gcc/m2expr.cc (m2expr_GetCstInteger): New function.
5934         * gm2-gcc/m2expr.def (GetCstInteger): New procedure function.
5935         * gm2-gcc/m2expr.h (m2expr_GetCstInteger): New prototype.
5937 2023-04-05  Gaius Mulley  <gaiusmod2@gmail.com>
5939         PR modula2/109423
5940         * gm2-compiler/M2Base.def (Unbounded): Remove.
5941         * gm2-compiler/M2Error.def (ErrorAbort0): Add noreturn
5942         attribute.
5943         * gm2-compiler/M2Quads.mod (BuildInclProcedure): Correct
5944         error format string.
5945         (BuildExceptProcedure): Correct error format string.
5946         (BuildAdrFunction): Call PutWriteQuad when taking the
5947         address of a variable.
5948         * gm2-libs-ch/SysExceptions.c (_M2_SysExceptions_init): Add
5949         parameters.
5950         * gm2-libs-ch/wrapc.c (_M2_wrapc_init): Add parameters.
5951         * gm2-libs/DynamicStrings.mod (DumpStringInfo): Remove t.
5952         (PopAllocationExemption): Remove f.
5953         * gm2-libs/FIO.mod (BufferedWrite): Remove result.
5954         * gm2-libs/FormatStrings.mod (Copy): Remove endpos and
5955         afterperc.
5956         (HandlePercent): Remove result.
5957         * gm2-libs/Indexing.mod (RemoveIndiceFromIndex): Remove k.
5958         * gm2-libs/M2Dependent.mod (CreateModule): Remove p0
5959         and p1.
5960         (DumpModuleData): Remove mptr.
5961         (ConstructModules): Remove nulp.
5962         * gm2-libs/RTExceptions.mod (PopHandler): Remove i.
5963         * gm2-libs/RTint.mod (Listen): Remove b4s, b4m, afs
5964         and afm.
5965         * gm2-libs/SFIO.mod (ReadS): Remove c.
5966         * gm2-libs/StringConvert.mod (doDecimalPlaces): Remove
5967         whole and fraction.
5969 2023-04-03  Gaius Mulley  <gaiusmod2@gmail.com>
5971         PR modula2/109388
5972         * gm2-compiler/M2GCCDeclare.mod (DoVariableDeclaration):
5973         Remove second parameter module.  Adjust all callers to
5974         remove the second parameter.
5975         * gm2-compiler/PHBuild.bnf (CheckAndInsert): Remove.
5976         (InStopSet): Remove.
5977         (PeepToken): Remove.
5978         (PushQualident): Remove.
5979         (SimpleDes): Remove.
5980         (ActualParameters): Remove.
5982 2023-04-02  Gaius Mulley  <gaiusmod2@gmail.com>
5984         PR modula2/109336
5985         * Make-lang.in (GM2_O): Set to -O0.
5986         (GM2_LIBS): Remove target libraries and replace with build libs.
5987         (BUILD-LIBS): New declaration.
5988         (m2/gm2-libs/libgm2.a): New rule.
5989         (m2/gm2-libs/%.o): New rule.
5990         (m2/gm2-libs/choosetemp.o): New rule.
5991         * gm2-compiler/M2ColorString.mod (append): Use ADR rather than
5992         implicit conversion.
5993         * gm2-compiler/M2Comp.mod (Compile): Add qprintf messages for when
5994         a source file is not found.  Improve comments and formatting.
5995         * gm2-libs-ch/cgetopt.c (cgetopt_cgetopt_long): Remove
5996         ansi-decl.h.  Add getopt.h.
5997         (cgetopt_cgetopt_long_only): Change cgetopt_ to getopt_.
5998         * gm2spec.cc (lang_specific_driver): Do not skip -fmod=.
5999         Remove comment.
6001 2023-03-29  Gaius Mulley  <gaiusmod2@gmail.com>
6003         PR modula2/109336
6004         PR modula2/109315
6005         * gm2-compiler/M2FileName.mod (CalculateFileName): Simplified by
6006         ensuring the extension contains the ".".
6007         (CalculateStemName): Re-formatted.
6008         (ExtractExtension): Re-formatted.
6009         (ExtractModule): Re-formatted.
6010         * gm2-compiler/M2Options.def (setdefextension): Add block comment.
6011         (setmodextension): Add block comment.  Re-formatted.
6012         * gm2-compiler/M2Options.mod (setdefextension): Add block comment.
6013         (setmodextension): Add block comment.  Re-formatted.
6014         * gm2-compiler/M2Search.mod (FindSourceDefFile): Use
6015         DefaultDefExt.
6016         (DefaultDefExt): New constant.
6017         (DefaultModExt): New constant.
6018         (FindSourceModFile): Use DefaultModExt.
6019         * gm2-gcc/m2decl.cc (m2decl_DeclareKnownVariable): Correct
6020         spelling.
6021         * gm2spec.cc (M2SOURCE): New constant.
6022         (LANGSPEC): New value.
6023         (MATHLIB): New value.
6024         (WITHLIBC): New value.
6025         (SKIPOPT): New value.
6026         (lang_specific_driver): Replace seen_module_extension bool with
6027         module_extension char *.  Detect -fmod= and remember extension.
6028         Use the extension to detect modula-2 source and mark it as such.
6030 2023-03-23  Gaius Mulley  <gaiusmod2@gmail.com>
6032         PR modula2/109264
6033         * gm2-compiler/M2Quads.mod (BuildConstFunctionCall): Comment
6034         out ErrorString in debugging block.
6035         (BuildConstructorStart): Replace Assert with a call to
6036         MetaErrorT3.  Import MetaErrorT3.
6037         * gm2-compiler/PCSymBuild.mod (buildConstFunction): Rename
6038         local variables.
6039         (WalkFunctionParam): Remove test for IsEnumeration when
6040         resolving MIN or MAX parameters.
6041         * gm2-compiler/PHBuild.bnf (BlockAssert): New procedure.
6042         (ErrorArrayat): New procedure.
6043         (Expect): Renamed parameter t to tok.
6044         (PushQualident): New rule.
6045         (ConstSetOrQualidentOrFunction): Force AutoOn.
6046         (TypeDeclaration): Add debugging assert.
6047         (SimpleType): Add debugging assert.
6048         (DefaultRecordAttributes): New rule (and bugfix).
6049         (FieldPragmaExpression): New rule (and bugfix).
6050         (PragmaConstExpression): New rule (and bugfix).
6051         (SetOrDesignatorOrFunction): Add debugging assert.
6052         (Block): Add debugging assert.
6053         * gm2-gcc/m2expr.cc (m2expr_ConstantExpressionWarning): int
6054         to bool.
6055         * gm2-gcc/m2expr.h (m2expr_TreeOverflow): int to bool.
6056         (m2expr_GetBooleanTrue): Remove.
6057         (m2expr_GetBooleanFalse): Remove.
6058         * gm2-gcc/m2options.h (M2Options_SetStatistics): Replace
6059         int with bool.
6061 2023-03-22  Gaius Mulley  <gaiusmod2@gmail.com>
6063         PR modula2/109248
6064         * Make-lang.in (m2/pge-boot/%.o): Add CFLAGS and CXXFLAGS for C
6065         and C++ compiles.
6066         * gm2spec.cc (add_m2_I_path): Indentation.
6067         (lang_specific_driver): New variable seen_pathname.
6068         Detect -fm2-pathname.  If not seen then push_back_Ipath (".").
6069         Change non iso library path to "m2cor,m2log,m2pim,m2iso".
6071 2023-03-22  Gaius Mulley  <gaiusmod2@gmail.com>
6073         PR modula2/107630
6074         * Make-lang.in (m2/stage2/cc1gm2$(exeext)): Remove
6075         m2/gm2-libs-boot/M2LINK.o.
6076         (m2/stage1/cc1gm2$(exeext)): Ditto.
6077         (GM2-LIBS-BOOT-DEFS): Remove M2LINK.def.
6078         (GM2-LIBS-DEFS): Ditto.
6079         (m2/mc-boot/$(SRC_PREFIX)%.o): Replace CXX_FLAGS with CXXFLAGS.
6080         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
6081         (m2/mc-boot/main.o): Ditto.
6082         (mcflex.o): Add $(CFLAGS).
6083         (m2/gm2-libs-boot/M2LINK.o): Remove rule.
6084         * gm2-compiler/M2GCCDeclare.def (DeclareM2linkGlobals): Remove.
6085         * gm2-compiler/M2GCCDeclare.mod: (M2LinkEntry): Remove.
6086         (M2LinkIndex): Remove.
6087         (DoVariableDeclaration): Remove initial and call to
6088         AddEntryM2Link.
6089         (AddEntryM2Link): Remove.
6090         (GetEntryM2Link): Remove.
6091         (DeclareM2linkGlobals): Remove.
6092         (DetectM2LinkInitial): Remove.
6093         (InitM2LinkModule): Remove.
6094         * gm2-compiler/M2GenGCC.mod (CodeFinallyEnd): Remove call to
6095         DeclareM2linkGlobals.
6096         * gm2-compiler/M2Quads.mod (BuildM2InitFunction): Add extra
6097         parameter containing runtime module override to ConstructModules.
6098         * gm2-compiler/M2Scaffold.mod: Update comment describing
6099         ConstructModules.
6100         * gm2-gcc/m2decl.cc (m2decl_DeclareM2linkForcedModuleInitOrder):
6101         Remove.
6102         * gm2-libs-iso/M2RTS.def (ConstructModules): Add overrideliborder
6103         parameter.
6104         * gm2-libs-iso/M2RTS.mod: Add overrideliborder parameter.
6105         * gm2-libs/M2Dependent.def (ConstructModules): Add overrideliborder
6106         parameter.
6107         * gm2-libs/M2Dependent.mod (ConstructModules): Add overrideliborder
6108         parameter.
6109         * gm2-libs/M2RTS.def (ConstructModules): Add overrideliborder parameter.
6110         * gm2-libs/M2RTS.mod (ConstructModules): Add overrideliborder
6111         parameter.
6112         * gm2-libs/M2LINK.def: Removed.
6114 2023-03-21  Gaius Mulley  <gaiusmod2@gmail.com>
6116         * Make-lang.in (m2/mc-boot/$(SRC_PREFIX)%.o): Add $(CXXFLAGS).
6117         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Add $(CXXFLAGS).
6118         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Add $(CXXFLAGS).
6119         (m2/mc-boot/main.o): Add $(CXXFLAGS).
6121 2023-03-19  Gaius Mulley  <gaiusmod2@gmail.com>
6123         * Make-maintainer.in (gm2.maintainer-clean): Remove.
6124         (gm2.maintainer-help): Add gm2.maintainer-tools,
6125         gm2.maintainer-doc.  Remove gm2.maintainer-clean.
6126         Change target-independent directory to target-independent/m2.
6127         * gm2-compiler/ppg.mod: Correct __FILE_ typo to __FILE__.
6128         * gm2-compiler/M2Options.def (SetAutoInit): Update comment.
6129         * gm2-compiler/M2Options.mod (SetAutoInit): Update comment.
6130         * gm2-gcc/m2color.cc (m2color_colorize_start): Rename name_len
6131         to _name_high.
6132         * gm2-gcc/m2color.def (colorize_start): change ARRAY OF CHAR to
6133         ADDRESS and add _name_high.
6134         * gm2-gcc/m2decl.cc (m2decl_BuildStartFunctionDeclaration): Change
6135         int to bool.
6136         * gm2-gcc/m2decl.h (m2decl_BuildStartFunctionDeclaration): Change
6137         int to bool.
6138         * gm2-gcc/m2expr.cc (m2expr_BuildBinarySetDo): Change int to bool.
6139         (m2expr_BuildIfConstInVar): Change int to bool.
6140         (m2expr_BuildIfNotConstInVar): Change int to bool.
6141         (m2expr_BuildIfVarInVar): Change int to bool.
6142         (m2expr_BuildIfNotVarInVar): Change int to bool.
6143         (m2expr_BuildForeachWordInSetDoIfExpr): Change int to bool.
6144         * gm2-gcc/m2expr.h (m2expr_BuildIfNotVarInVar): Change int to bool.
6145         (m2expr_BuildIfVarInVar): Change int to bool.
6146         (m2expr_BuildIfNotConstInVar): Change int to bool.
6147         (m2expr_BuildIfConstInVar): Change int to bool.
6148         * gm2-gcc/m2options.h (M2Options_SetAutoInit): Change int to bool.
6149         (M2Options_SetNilCheck): Change int to bool.
6150         (M2Options_SetReturnCheck): Change int to bool.
6151         (M2Options_SetCaseCheck): Change int to bool.
6152         (M2Options_SetCheckAll): Change int to bool.
6153         (M2Options_SetVerboseUnbounded): Change int to bool.
6154         (M2Options_SetUnboundedByReference): Change int to bool.
6155         (M2Options_SetOptimizing): Change int to bool.
6156         (M2Options_SetQuiet): Change int to bool.
6157         (M2Options_SetCpp): Change int to bool.
6158         (M2Options_SetM2g): Change int to bool.
6159         (M2Options_SetLowerCaseKeywords): Change int to bool.
6160         (M2Options_SetVerbose): Change int to bool.
6161         * gm2-gcc/m2treelib.cc (m2treelib_get_rvalue): Change int to bool.
6162         (m2treelib_get_field_no): Change int to bool.
6163         (m2treelib_get_set_value): Change int to bool.
6164         (m2treelib_get_set_address): Change int to bool.
6165         (m2treelib_get_set_address_if_var): Change int to bool.
6166         * gm2-gcc/m2treelib.def (get_set_address_if_var): Change int to bool.
6167         (get_set_address): Change int to bool.
6168         (get_set_value): Change int to bool.
6169         (get_field_no): Change int to bool.
6170         (get_rvalue): Change int to bool.
6171         * gm2-gcc/m2treelib.h (m2treelib_get_field_no): Change int to bool.
6172         (m2treelib_get_set_value): Change int to bool.
6173         (m2treelib_get_set_address): Change int to bool.
6174         (m2treelib_get_set_address_if_var): Change int to bool.
6175         * gm2-gcc/m2type.cc (m2type_BuildEndFunctionType): Change int to bool.
6176         * gm2-gcc/m2type.h (m2type_BuildEndFunctionType): Change int to bool.
6177         * gm2-libs-ch/dtoa.cc (dtoa_calcsign): Change int to bool.
6178         * gm2-libs-ch/ldtoa.cc (dtoa_calcsign): Change int to bool.
6179         (ldtoa_ldtoa): Change int to bool.
6180         * m2.flex (functionInfo): Change int to bool.
6181         (pushFunction): Change parameter from int to bool.
6182         * mc-boot/GDebug.cc (Debug_Halt): Rebuild.
6183         * mc-boot/GDebug.h (Debug_Halt): Rebuild.
6184         * mc-boot/GDynamicStrings.cc: Rebuild.
6185         * mc-boot/GDynamicStrings.h: Rebuild.
6186         * mc-boot/GFIO.cc: Rebuild.
6187         * mc-boot/GM2RTS.cc: Rebuild.
6188         * mc-boot/GM2RTS.h: Rebuild.
6189         * mc-boot/GPushBackInput.cc: Rebuild.
6190         * mc-boot/GRTExceptions.cc: Rebuild.
6191         * mc-boot/GRTint.cc: Rebuild.
6192         * mc-boot/GSysStorage.cc: Rebuild.
6193         * mc-boot/Gdecl.cc: Rebuild.
6194         * mc-boot/GsymbolKey.cc: Rebuild.
6195         * mc/symbolKey.mod: Rebuild.
6196         * target-independent/m2/Builtins.texi: Rebuild.
6197         * target-independent/m2/SYSTEM-iso.texi: Rebuild.
6198         * target-independent/m2/SYSTEM-pim.texi: Rebuild.
6199         * target-independent/m2/gm2-libs.texi: Rebuild.
6200         * tools-src/def2doc.py (PIM_Log): Change gm2-libs-pim to
6201         gm2-lib-log.
6203 2023-03-17  Gaius Mulley  <gaiusmod2@gmail.com>
6205         PR modula2/109032
6206         * gm2-gcc/m2expr.cc: Correct ? : order in comments.
6207         (m2expr_BuildDivM2): Improve comment.
6208         * lang.opt: Improve option descriptions.
6210 2023-03-17  Gaius Mulley  <gaiusmod2@gmail.com>
6212         PR modula2/109102
6213         * gm2-gcc/m2builtins.cc (ASSERT): Change format specifier to
6214         use %qs rather than quotes.
6216 2023-03-17  Gaius Mulley  <gaiusmod2@gmail.com>
6218         * gm2-compiler/M2AsmUtil.mod (SymNeedsModulePrefix):
6219         Re-implemented.
6220         * gm2-libs/SysStorage.mod (enableTrace): Disable tracing.
6222 2023-03-16  Gaius Mulley  <gaiusmod2@gmail.com>
6224         * gm2-compiler/SymbolKey.mod (PutSymKey): Halt parameters
6225         reordered.
6226         (DelSymKey): Ditto.
6227         * gm2-compiler/ppg.mod (GetEpsilon): Ditto.
6228         (GetReachEnd): Ditto.
6229         (GetFollow): Ditto.
6230         (CodeCondition): Ditto.
6231         (CodeThenDo): Ditto.
6232         (CodeEnd): Ditto.
6233         (RecoverCondition): Ditto.
6234         (ConditionIndent): Ditto.
6235         * gm2-libs-ch/m2rts.h (M2RTS_Halt): Ditto.
6236         * gm2-libs-coroutines/Executive.mod (Assert): Ditto.
6237         (Resume): Remove redundant comments.
6238         (Wait): Remove redundant comments.
6239         * gm2-libs-coroutines/SYSTEM.mod (TRANSFER): Halt parameters
6240         reordered.
6241         (IOTransferHandler): Ditto.
6242         (Finished): Ditto.
6243         (localInit): Ditto.
6244         * gm2-libs-coroutines/TimerHandler.mod (WaitOn): Halt parameters
6245         reordered.
6246         (Cancel): Ditto.
6247         (ReArmEvent): Ditto.
6248         (OnActiveQueue): Ditto.
6249         * gm2-libs-iso/COROUTINES.mod (NEWCOROUTINE): Ditto.
6250         (Transfer): Ditto.
6251         (IOTRANSFER): Ditto.
6252         * gm2-libs-iso/EXCEPTIONS.mod (RAISE): Correct Halt parameters.
6253         * gm2-libs-iso/M2RTS.def (Halt): Halt parameters reordered.
6254         (HaltC): Ditto.
6255         * gm2-libs-iso/M2RTS.mod: Ditto.
6256         * gm2-libs-iso/RTentity.mod (PutKey): Ditto.
6257         (DelKey): Ditto.
6258         (findChildAndParent): Ditto.
6259         (assert): Ditto.
6260         * gm2-libs-iso/Storage.mod (ALLOCATE): Add DebugTrace.
6261         Add UseMallocFree test.
6262         (DEALLOCATE): Add DebugTrace.  Add UseMallocFree test.
6263         (assert): Halt parameters reordered.
6264         * gm2-libs-log/Termbase.mod (Read): Ditto.
6265         (KeyPressed): Ditto.
6266         (Write): Ditto.
6267         (Init): Ditto.
6268         * gm2-libs/Debug.def (Halt): Halt parameters reordered.
6269         * gm2-libs/Debug.mod (Halt): Ditto.
6270         * gm2-libs/DynamicStrings.def (PopAllocation): Improve comment.
6271         * gm2-libs/DynamicStrings.mod (PopAllocation): Improve comment.
6272         Halt parameters reordered.
6273         * gm2-libs/M2RTS.def (Halt): Ditto.
6274         (HaltC): Ditto.
6275         * gm2-libs/M2RTS.mod (Halt): Ditto.
6276         (HaltC): Ditto.
6277         * gm2-libs/PushBackInput.mod (PutStr): Ditto.
6278         (PutString): Ditto.
6279         (PutCh): Ditto.
6280         * gm2-libs/RTExceptions.mod (GetBaseExceptionBlock): Ditto.
6281         * gm2-libs/RTint.mod (ReArmTimeVector): Ditto.
6282         (GetTimeVector): Ditto.
6283         (AttachVector): Ditto.
6284         (IncludeVector): Ditto.
6285         (Listen): Ditto.
6286         * gm2-libs/SysStorage.mod (ALLOCATE): Ditto.
6287         (DEALLOCATE): Ditto.
6288         (REALLOCATE): Ditto.
6289         * gm2-libs-coroutines/Debug.def: Removed.
6290         * gm2-libs-coroutines/Debug.mod: Removed.
6292 2023-03-16  Gaius Mulley  <gaiusmod2@gmail.com>
6294         * Make-lang.in: Rename target-independent to
6295         target-independent/m2.
6296         * target-independent/readme.txt: Update.
6297         * target-independent/m2/gm2-ebnf.texi: New file.
6298         * target-independent/m2/gpl_v3_without_node.texi: New file.
6299         * target-independent/Builtins.texi: Rename ...
6300         * target-independent/m2/Builtins.texi: ... to this.
6301         * target-independent/SYSTEM-iso.texi: Rename ...
6302         * target-independent/m2/SYSTEM-iso.texi: ... to this.
6303         * target-independent/SYSTEM-pim.texi: Rename ...
6304         * target-independent/m2/SYSTEM-pim.texi: ... to this.
6305         * target-independent/gm2-libs.texi: Rename ...
6306         * target-independent/m2/gm2-libs.texi: ... to this.
6308 2023-03-15  Gaius Mulley  <gaiusmod2@gmail.com>
6310         PR modula2/109125
6311         * gm2-libs-ch/dtoa.cc (dtoa_strtod): Replace int with bool.
6312         * gm2-libs-ch/ldtoa.cc (ldtoa_strtold): Replace int with bool.
6314 2023-03-14  Gaius Mulley  <gaiusmod2@gmail.com>
6316         PR modula2/109125
6317         * gm2-libs-ch/cgetopt.c (cgetopt_SetOption): Replace int
6318         for bool.
6319         * gm2-libs-ch/termios.c (doSetUnset): Replace int for bool.
6320         * gm2-libs/Builtins.mod (isfinitef): Correct typo in return
6321         statement.
6323 2023-03-13  Gaius Mulley  <gaiusmod2@gmail.com>
6325         PR modula2/109103
6326         * gm2-compiler/M2ALU.def (PushString): New parameter issueError.
6327         * gm2-compiler/M2ALU.mod (PushString): New parameter issueError.
6328         * gm2-compiler/SymbolTable.mod (PushString): New parameter issueError.
6329         * gm2-gcc/m2decl.cc (m2decl_DetermineSizeOfConstant): Pass
6330         location to interpret_m2_integer.
6331         (m2decl_BuildConstLiteralNumber): New parameter issueError.
6332         * gm2-gcc/m2expr.cc (m2expr_IsTrue): Replace int with bool.
6333         (m2expr_IsFalse): Replace int with bool.
6334         (m2expr_AreConstantsEqual): Replace int with bool.
6335         (m2expr_BuildBinaryForeachWordDo): Call m2linemap_internal_error_at.
6336         (append_digit): Ditto.
6337         (m2expr_interpret_integer): Add location parameter.
6338         (append_m2_digit): Call m2linemap_internal_error_at.
6339         (m2expr_interpret_m2_integer): Add location parameter.
6340         (m2expr_GetSizeOf): Replace sizeof with SIZE in error message.
6341         * gm2-gcc/m2expr.h (m2expr_AreRealOrComplexConstantsEqual):
6342         Replace int with bool.
6343         (m2expr_AreConstantsEqual): Ditto.
6344         (m2expr_IsFalse): Ditto.
6345         (m2expr_IsTrue): Ditto.
6346         (m2expr_interpret_integer): Add location parameter.
6347         (m2expr_interpret_m2_integer): Add location parameter.
6348         * gm2-gcc/m2linemap.cc (mformat_value): New function.
6349         (expand_format): New function.
6350         (expand_message): New function.
6351         (gm2_internal_error_at): New function.
6352         (m2linemap_internal_error_at): New function.
6353         * gm2-gcc/m2linemap.h (m2linemap_internal_error_at): New function.
6354         * gm2-gcc/m2options.h (M2Options_SetISO): Replace int with bool.
6355         (M2Options_SetPIM): Ditto.
6356         (M2Options_SetPIM2): Ditto.
6357         (M2Options_SetPIM3): Ditto.
6358         (M2Options_SetPIM4): Ditto.
6359         (M2Options_SetFloatValueCheck): Ditto.
6360         (M2Options_SetWholeValueCheck): Ditto.
6361         (M2Options_GetISO): Ditto.
6362         (M2Options_GetPIM): Ditto.
6363         (M2Options_GetPIM2): Ditto.
6364         (M2Options_GetPIM3): Ditto.
6365         (M2Options_GetPIM4): Ditto.
6366         (M2Options_GetPositiveModFloor): Ditto.
6367         (M2Options_GetFloatValueCheck): Ditto.
6368         (M2Options_GetWholeValueCheck): Ditto.
6369         (M2Options_Setc): Ditto.
6370         (M2Options_Getc): Ditto.
6371         (M2Options_SetPPOnly): Ditto.
6372         (M2Options_GetPPOnly): Ditto.
6373         (M2Options_SetUselist): Ditto.
6374         (M2Options_SetAutoInit): Ditto.
6375         (M2Options_SetPositiveModFloor): Ditto.
6376         (M2Options_SetNilCheck): Ditto.
6377         (M2Options_SetWholeDiv): Ditto.
6378         (M2Options_SetIndex): Ditto.
6379         (M2Options_SetRange): Ditto.
6380         (M2Options_SetReturnCheck): Ditto.
6381         (M2Options_SetCaseCheck): Ditto.
6382         (M2Options_SetCheckAll): Ditto.
6383         (M2Options_SetExceptions): Ditto.
6384         (M2Options_SetStyle): Ditto.
6385         (M2Options_SetPedantic): Ditto.
6386         (M2Options_SetPedanticParamNames): Ditto.
6387         (M2Options_SetPedanticCast): Ditto.
6388         (M2Options_SetExtendedOpaque): Ditto.
6389         (M2Options_SetVerboseUnbounded): Ditto.
6390         (M2Options_SetXCode): Ditto.
6391         (M2Options_SetCompilerDebugging): Ditto.
6392         (M2Options_SetQuadDebugging): Ditto.
6393         (M2Options_SetDebugTraceQuad): Ditto.
6394         (M2Options_SetDebugTraceAPI): Ditto.
6395         (M2Options_SetSources): Ditto.
6396         (M2Options_SetUnboundedByReference): Ditto.
6397         (M2Options_SetDumpSystemExports): Ditto.
6398         (M2Options_SetOptimizing): Ditto.
6399         (M2Options_SetQuiet): Ditto.
6400         (M2Options_SetCC1Quiet): Ditto.
6401         (M2Options_SetCpp): Ditto.
6402         (M2Options_SetSwig): Ditto.
6403         (M2Options_SetWholeProgram): Ditto.
6404         (M2Options_SetDebugFunctionLineNumbers): Ditto.
6405         (M2Options_SetGenerateStatementNote): Ditto.
6406         (M2Options_GetCpp): Ditto.
6407         (M2Options_GetM2g): Ditto.
6408         (M2Options_SetM2g): Ditto.
6409         (M2Options_SetLowerCaseKeywords): Ditto.
6410         (M2Options_SetVerbose): Ditto.
6411         (M2Options_SetUnusedVariableChecking): Ditto.
6412         (M2Options_SetUnusedParameterChecking): Ditto.
6413         (M2Options_SetStrictTypeChecking): Ditto.
6414         (M2Options_SetWall): Ditto.
6415         (M2Options_SetSaveTemps): Ditto.
6416         (M2Options_GetSaveTemps): Ditto.
6417         (M2Options_SetScaffoldStatic): Ditto.
6418         (M2Options_SetScaffoldDynamic): Ditto.
6419         (M2Options_SetScaffoldMain): Ditto.
6420         (M2Options_SetGenModuleList): Ditto.
6421         (M2Options_SetShared): Ditto.
6422         * gm2-libs-ch/M2LINK.c: Ditto.
6423         * gm2-libs-ch/m2rts.h (M2RTS_RequestDependant): Replace
6424         const char * with const void *.
6425         (M2RTS_RegisterModule): Ditto.
6426         (M2RTS_ConstructModules): Ditto.
6427         * gm2-gcc/m2decl.def (DetermineSizeOfConstant): New parameter
6428         issueError.
6429         * gm2-gcc/m2decl.h (DetermineSizeOfConstant): New parameter
6430         issueError.
6432 2023-03-12  Gaius Mulley  <gaiusmod2@gmail.com>
6434         PR modula2/109089
6435         * gm2-compiler/M2GCCDeclare.mod (DeclareKnownType): Import.
6436         * gm2-gcc/gcc-consolidation.h (stdbool.h): Include.
6437         * gm2-gcc/init.h (defined): Change block start.
6438         * gm2-gcc/m2block.cc: Change FALSE to false, change TRUE to true.
6439         * gm2-gcc/m2block.h: Change int to bool.
6440         * gm2-gcc/m2builtins.cc: Ditto.
6441         * gm2-gcc/m2builtins.h: Ditto.
6442         * gm2-gcc/m2convert.cc: Change FALSE to false, TRUE to true and
6443         int to bool.
6444         * gm2-gcc/m2convert.h: Change int to bool.
6445         * gm2-gcc/m2decl.cc: Change int to bool.
6446         * gm2-gcc/m2decl.h: Change int to bool.
6447         * gm2-gcc/m2expr.cc: Change FALSE to false, TRUE to true and
6448         int to bool.
6449         * gm2-gcc/m2expr.h: Change int to bool.
6450         * gm2-gcc/m2statement.cc: Change FALSE to false, TRUE to true and
6451         int to bool.
6452         * gm2-gcc/m2statement.h: Change int to bool.
6453         * gm2-gcc/m2top.cc: Change int to bool.
6454         * gm2-gcc/m2top.h: Change int to bool.
6455         * gm2-gcc/m2tree.cc: Change int to bool.
6456         * gm2-gcc/m2tree.h: Change int to bool.
6457         * gm2-gcc/m2type.cc: Change int to bool.
6458         * gm2-gcc/m2type.h: Change int to bool.
6459         * gm2-lang.cc (convert_loc): Call convert_to_integer for BOOLEAN_TYPE.
6460         * gm2-libs/Builtins.def (isfinitef): Change return value from
6461         BOOLEAN to INTEGER.
6462         (isfinite): Ditto.
6463         (isfinitel): Ditto.
6464         * gm2-libs/Builtins.mod (isfinitef): Change return value from
6465         BOOLEAN to INTEGER.
6466         (isfinite): Ditto.
6467         (isfinitel): Ditto.
6468         * mc-boot/GASCII.cc: Rebuild.
6469         * mc-boot/GASCII.h: Rebuild.
6470         * mc-boot/GArgs.cc: Rebuild.
6471         * mc-boot/GArgs.h: Rebuild.
6472         * mc-boot/GAssertion.cc: Rebuild.
6473         * mc-boot/GAssertion.h: Rebuild.
6474         * mc-boot/GBreak.cc: Rebuild.
6475         * mc-boot/GBreak.h: Rebuild.
6476         * mc-boot/GCOROUTINES.h: Rebuild.
6477         * mc-boot/GCmdArgs.cc: Rebuild.
6478         * mc-boot/GCmdArgs.h: Rebuild.
6479         * mc-boot/GDebug.cc: Rebuild.
6480         * mc-boot/GDebug.h: Rebuild.
6481         * mc-boot/GDynamicStrings.cc: Rebuild.
6482         * mc-boot/GDynamicStrings.h: Rebuild.
6483         * mc-boot/GEnvironment.cc: Rebuild.
6484         * mc-boot/GEnvironment.h: Rebuild.
6485         * mc-boot/GFIO.cc: Rebuild.
6486         * mc-boot/GFIO.h: Rebuild.
6487         * mc-boot/GFormatStrings.cc: Rebuild.
6488         * mc-boot/GFormatStrings.h: Rebuild.
6489         * mc-boot/GFpuIO.cc: Rebuild.
6490         * mc-boot/GFpuIO.h: Rebuild.
6491         * mc-boot/GIO.cc: Rebuild.
6492         * mc-boot/GIO.h: Rebuild.
6493         * mc-boot/GIndexing.cc: Rebuild.
6494         * mc-boot/GIndexing.h: Rebuild.
6495         * mc-boot/GM2Dependent.cc: Rebuild.
6496         * mc-boot/GM2Dependent.h: Rebuild.
6497         * mc-boot/GM2EXCEPTION.cc: Rebuild.
6498         * mc-boot/GM2EXCEPTION.h: Rebuild.
6499         * mc-boot/GM2LINK.h: Rebuild.
6500         * mc-boot/GM2RTS.cc: Rebuild.
6501         * mc-boot/GM2RTS.h: Rebuild.
6502         * mc-boot/GMemUtils.cc: Rebuild.
6503         * mc-boot/GMemUtils.h: Rebuild.
6504         * mc-boot/GNumberIO.cc: Rebuild.
6505         * mc-boot/GNumberIO.h: Rebuild.
6506         * mc-boot/GPushBackInput.cc: Rebuild.
6507         * mc-boot/GPushBackInput.h: Rebuild.
6508         * mc-boot/GRTExceptions.cc: Rebuild.
6509         * mc-boot/GRTExceptions.h: Rebuild.
6510         * mc-boot/GRTco.h: Rebuild.
6511         * mc-boot/GRTentity.h: Rebuild.
6512         * mc-boot/GRTint.cc: Rebuild.
6513         * mc-boot/GRTint.h: Rebuild.
6514         * mc-boot/GSArgs.cc: Rebuild.
6515         * mc-boot/GSArgs.h: Rebuild.
6516         * mc-boot/GSFIO.cc: Rebuild.
6517         * mc-boot/GSFIO.h: Rebuild.
6518         * mc-boot/GSYSTEM.h: Rebuild.
6519         * mc-boot/GSelective.h: Rebuild.
6520         * mc-boot/GStdIO.cc: Rebuild.
6521         * mc-boot/GStdIO.h: Rebuild.
6522         * mc-boot/GStorage.cc: Rebuild.
6523         * mc-boot/GStorage.h: Rebuild.
6524         * mc-boot/GStrCase.cc: Rebuild.
6525         * mc-boot/GStrCase.h: Rebuild.
6526         * mc-boot/GStrIO.cc: Rebuild.
6527         * mc-boot/GStrIO.h: Rebuild.
6528         * mc-boot/GStrLib.cc: Rebuild.
6529         * mc-boot/GStrLib.h: Rebuild.
6530         * mc-boot/GStringConvert.cc: Rebuild.
6531         * mc-boot/GStringConvert.h: Rebuild.
6532         * mc-boot/GSysExceptions.h: Rebuild.
6533         * mc-boot/GSysStorage.cc: Rebuild.
6534         * mc-boot/GSysStorage.h: Rebuild.
6535         * mc-boot/GTimeString.cc: Rebuild.
6536         * mc-boot/GTimeString.h: Rebuild.
6537         * mc-boot/GUnixArgs.h: Rebuild.
6538         * mc-boot/Galists.cc: Rebuild.
6539         * mc-boot/Galists.h: Rebuild.
6540         * mc-boot/Gdecl.cc: Rebuild.
6541         * mc-boot/Gdecl.h: Rebuild.
6542         * mc-boot/Gdtoa.h: Rebuild.
6543         * mc-boot/Gerrno.h: Rebuild.
6544         * mc-boot/Gkeyc.cc: Rebuild.
6545         * mc-boot/Gkeyc.h: Rebuild.
6546         * mc-boot/Gldtoa.h: Rebuild.
6547         * mc-boot/Glibc.h: Rebuild.
6548         * mc-boot/Glibm.h: Rebuild.
6549         * mc-boot/Glists.cc: Rebuild.
6550         * mc-boot/Glists.h: Rebuild.
6551         * mc-boot/GmcComment.cc: Rebuild.
6552         * mc-boot/GmcComment.h: Rebuild.
6553         * mc-boot/GmcComp.cc: Rebuild.
6554         * mc-boot/GmcComp.h: Rebuild.
6555         * mc-boot/GmcDebug.cc: Rebuild.
6556         * mc-boot/GmcDebug.h: Rebuild.
6557         * mc-boot/GmcError.cc: Rebuild.
6558         * mc-boot/GmcError.h: Rebuild.
6559         * mc-boot/GmcFileName.cc: Rebuild.
6560         * mc-boot/GmcFileName.h: Rebuild.
6561         * mc-boot/GmcLexBuf.cc: Rebuild.
6562         * mc-boot/GmcLexBuf.h: Rebuild.
6563         * mc-boot/GmcMetaError.cc: Rebuild.
6564         * mc-boot/GmcMetaError.h: Rebuild.
6565         * mc-boot/GmcOptions.cc: Rebuild.
6566         * mc-boot/GmcOptions.h: Rebuild.
6567         * mc-boot/GmcPreprocess.cc: Rebuild.
6568         * mc-boot/GmcPreprocess.h: Rebuild.
6569         * mc-boot/GmcPretty.cc: Rebuild.
6570         * mc-boot/GmcPretty.h: Rebuild.
6571         * mc-boot/GmcPrintf.cc: Rebuild.
6572         * mc-boot/GmcPrintf.h: Rebuild.
6573         * mc-boot/GmcQuiet.cc: Rebuild.
6574         * mc-boot/GmcQuiet.h: Rebuild.
6575         * mc-boot/GmcReserved.cc: Rebuild.
6576         * mc-boot/GmcReserved.h: Rebuild.
6577         * mc-boot/GmcSearch.cc: Rebuild.
6578         * mc-boot/GmcSearch.h: Rebuild.
6579         * mc-boot/GmcStack.cc: Rebuild.
6580         * mc-boot/GmcStack.h: Rebuild.
6581         * mc-boot/GmcStream.cc: Rebuild.
6582         * mc-boot/GmcStream.h: Rebuild.
6583         * mc-boot/Gmcflex.h: Rebuild.
6584         * mc-boot/Gmcp1.cc: Rebuild.
6585         * mc-boot/Gmcp1.h: Rebuild.
6586         * mc-boot/Gmcp2.cc: Rebuild.
6587         * mc-boot/Gmcp2.h: Rebuild.
6588         * mc-boot/Gmcp3.cc: Rebuild.
6589         * mc-boot/Gmcp3.h: Rebuild.
6590         * mc-boot/Gmcp4.cc: Rebuild.
6591         * mc-boot/Gmcp4.h: Rebuild.
6592         * mc-boot/Gmcp5.cc: Rebuild.
6593         * mc-boot/Gmcp5.h: Rebuild.
6594         * mc-boot/GnameKey.cc: Rebuild.
6595         * mc-boot/GnameKey.h: Rebuild.
6596         * mc-boot/GsymbolKey.cc: Rebuild.
6597         * mc-boot/GsymbolKey.h: Rebuild.
6598         * mc-boot/Gtermios.h: Rebuild.
6599         * mc-boot/Gtop.cc: Rebuild.
6600         * mc-boot/Gvarargs.cc: Rebuild.
6601         * mc-boot/Gvarargs.h: Rebuild.
6602         * mc-boot/Gwlists.cc: Rebuild.
6603         * mc-boot/Gwlists.h: Rebuild.
6604         * mc-boot/Gwrapc.h: Rebuild.
6605         * mc/decl.mod (doBoolC): New procedure.
6606         (doBaseC): Call doBoolC.
6607         * mc/keyc.mod: Import useBool.
6608         (genBool): New procedure.
6609         (genDefs): Call genBool.
6610         * mc/mcOptions.def (useBool): New procedure.
6611         * mc/mcOptions.mod (useBool): New procedure.
6612         (useBoolType): New variable.
6613         (optionIs): Assign useBoolType to TRUE.
6615 2023-03-04  Gaius Mulley  <gaiusmod2@gmail.com>
6617         * mc-boot-ch/GBuiltins.cc: New file.
6618         * mc-boot-ch/Gdtoa.cc: New file.
6619         * mc-boot-ch/Gerrno.cc: New file.
6620         * mc-boot-ch/Gldtoa.cc: New file.
6621         * mc-boot-ch/Gm2rtsdummy.cc: New file.
6622         * mc-boot/GASCII.cc: New file.
6623         * mc-boot/GArgs.cc: New file.
6624         * mc-boot/GAssertion.cc: New file.
6625         * mc-boot/GBreak.cc: New file.
6626         * mc-boot/GCmdArgs.cc: New file.
6627         * mc-boot/GDebug.cc: New file.
6628         * mc-boot/GDynamicStrings.cc: New file.
6629         * mc-boot/GEnvironment.cc: New file.
6630         * mc-boot/GFIO.cc: New file.
6631         * mc-boot/GFormatStrings.cc: New file.
6632         * mc-boot/GFpuIO.cc: New file.
6633         * mc-boot/GIO.cc: New file.
6634         * mc-boot/GIndexing.cc: New file.
6635         * mc-boot/GM2Dependent.cc: New file.
6636         * mc-boot/GM2EXCEPTION.cc: New file.
6637         * mc-boot/GM2RTS.cc: New file.
6638         * mc-boot/GMemUtils.cc: New file.
6639         * mc-boot/GNumberIO.cc: New file.
6640         * mc-boot/GPushBackInput.cc: New file.
6641         * mc-boot/GRTExceptions.cc: New file.
6642         * mc-boot/GRTint.cc: New file.
6643         * mc-boot/GSArgs.cc: New file.
6644         * mc-boot/GSFIO.cc: New file.
6645         * mc-boot/GStdIO.cc: New file.
6646         * mc-boot/GStorage.cc: New file.
6647         * mc-boot/GStrCase.cc: New file.
6648         * mc-boot/GStrIO.cc: New file.
6649         * mc-boot/GStrLib.cc: New file.
6650         * mc-boot/GStringConvert.cc: New file.
6651         * mc-boot/GSysStorage.cc: New file.
6652         * mc-boot/GTimeString.cc: New file.
6653         * mc-boot/Galists.cc: New file.
6654         * mc-boot/Gdecl.cc: New file.
6655         * mc-boot/Gkeyc.cc: New file.
6656         * mc-boot/Glists.cc: New file.
6657         * mc-boot/GmcComment.cc: New file.
6658         * mc-boot/GmcComp.cc: New file.
6659         * mc-boot/GmcDebug.cc: New file.
6660         * mc-boot/GmcError.cc: New file.
6661         * mc-boot/GmcFileName.cc: New file.
6662         * mc-boot/GmcLexBuf.cc: New file.
6663         * mc-boot/GmcMetaError.cc: New file.
6664         * mc-boot/GmcOptions.cc: New file.
6665         * mc-boot/GmcPreprocess.cc: New file.
6666         * mc-boot/GmcPretty.cc: New file.
6667         * mc-boot/GmcPrintf.cc: New file.
6668         * mc-boot/GmcQuiet.cc: New file.
6669         * mc-boot/GmcReserved.cc: New file.
6670         * mc-boot/GmcSearch.cc: New file.
6671         * mc-boot/GmcStack.cc: New file.
6672         * mc-boot/GmcStream.cc: New file.
6673         * mc-boot/Gmcp1.cc: New file.
6674         * mc-boot/Gmcp2.cc: New file.
6675         * mc-boot/Gmcp3.cc: New file.
6676         * mc-boot/Gmcp4.cc: New file.
6677         * mc-boot/Gmcp5.cc: New file.
6678         * mc-boot/GnameKey.cc: New file.
6679         * mc-boot/GsymbolKey.cc: New file.
6680         * mc-boot/Gtop.cc: New file.
6681         * mc-boot/Gvarargs.cc: New file.
6682         * mc-boot/Gwlists.cc: New file.
6683         * pge-boot/GASCII.cc: New file.
6684         * pge-boot/GArgs.cc: New file.
6685         * pge-boot/GAssertion.cc: New file.
6686         * pge-boot/GBuiltins.cc: New file.
6687         * pge-boot/GDebug.cc: New file.
6688         * pge-boot/GDynamicStrings.cc: New file.
6689         * pge-boot/GFIO.cc: New file.
6690         * pge-boot/GIO.cc: New file.
6691         * pge-boot/GIndexing.cc: New file.
6692         * pge-boot/GLists.cc: New file.
6693         * pge-boot/GM2Dependent.cc: New file.
6694         * pge-boot/GM2EXCEPTION.cc: New file.
6695         * pge-boot/GM2LINK.cc: New file.
6696         * pge-boot/GM2RTS.cc: New file.
6697         * pge-boot/GNameKey.cc: New file.
6698         * pge-boot/GNumberIO.cc: New file.
6699         * pge-boot/GOutput.cc: New file.
6700         * pge-boot/GPushBackInput.cc: New file.
6701         * pge-boot/GRTExceptions.cc: New file.
6702         * pge-boot/GRTco.cc: New file.
6703         * pge-boot/GSFIO.cc: New file.
6704         * pge-boot/GSYSTEM.cc: New file.
6705         * pge-boot/GSelective.cc: New file.
6706         * pge-boot/GStdIO.cc: New file.
6707         * pge-boot/GStorage.cc: New file.
6708         * pge-boot/GStrCase.cc: New file.
6709         * pge-boot/GStrIO.cc: New file.
6710         * pge-boot/GStrLib.cc: New file.
6711         * pge-boot/GSymbolKey.cc: New file.
6712         * pge-boot/GSysExceptions.cc: New file.
6713         * pge-boot/GSysStorage.cc: New file.
6714         * pge-boot/Gabort.cc: New file.
6715         * pge-boot/Gbnflex.cc: New file.
6716         * pge-boot/Gcbuiltin.cc: New file.
6717         * pge-boot/Gdtoa.cc: New file.
6718         * pge-boot/Gerrno.cc: New file.
6719         * pge-boot/Gldtoa.cc: New file.
6720         * pge-boot/Glibc.cc: New file.
6721         * pge-boot/Glibm.cc: New file.
6722         * pge-boot/Gmcrts.cc: New file.
6723         * pge-boot/Gpge.cc: New file.
6724         * pge-boot/Gwrapc.cc: New file.
6725         * pge-boot/main.cc: New file.
6726         * pge-boot/network.cc: New file.
6728 2023-03-04  Gaius Mulley  <gaiusmod2@gmail.com>
6730         * Make-lang.in (MC-LIB-BOOT-C): Rename to MC-LIB-BOOT-CC.
6731         (MC-BOOT-C): Rename to MC-BOOT-CC.
6732         (BUILD-MC-BOOT-C): Rename to BUILD-MC-BOOT-CC.
6733         (BUILD-MC-BOOT-AUTO-C): Rename to BUILD-MC-BOOT-AUTO-CC.
6734         (m2/mc-boot/$(SRC_PREFIX)%.o): Change source file extension to .cc.
6735         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
6736         * Make-maintainer.in (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): Change
6737         source file extension to .cc.
6738         (m2/gm2-ppg-boot/main.o): Ditto.
6739         (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): Ditto.
6740         to .cc.
6741         (m2/gm2-pg-boot/main.o): Ditto.
6742         (m2/gm2-pge-boot/$(SRC_PREFIX)ldtoa.o): Ditto.
6743         (m2/gm2-pge-boot/$(SRC_PREFIX)dtoa.o): Ditto.
6744         (m2/gm2-pge-boot/$(SRC_PREFIX)errno.o): Ditto.
6745         (m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.o): Ditto.
6746         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Ditto.
6747         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Ditto.
6748         (m2/gm2-pge-boot/$(SRC_PREFIX)pge.o): Ditto.
6749         (m2/gm2-pge-boot/main.o): Ditto.
6750         (mc-push): Ditto.
6751         (mc-clean): Ditto.
6752         (mc-stage2): Ditto.
6753         ((objdir)/m2/mc-boot-gen): Ditto.
6754         (m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Ditto.
6755         (m2/mc-boot-gen/$(SRC_PREFIX)%.c): Ditto.
6756         * mc-boot-ch/GBuiltins.c: Correct comment and rename.
6757         * mc-boot-ch/Gdtoa.c: Correct comment and rename.
6758         * mc-boot-ch/Gldtoa.c: Correct comment and rename
6759         * mc-boot-ch/Gtermios.cc: Rename from Gtermios.c.
6760         * mc-boot-ch/Gerrno.c: Rename.
6761         * mc-boot-ch/GRTco.c: Removed.
6762         * mc-boot/GASCII.c: Rename to mc-boot/GASCII.cc.
6763         * mc-boot/GArgs.c: Rename to mc-boot/GArgs.cc.
6764         * mc-boot/GAssertion.c: Rename to mc-boot/GAssertion.cc.
6765         * mc-boot/GBreak.c: Rename to mc-boot/GBreak.cc.
6766         * mc-boot/GCmdArgs.c: Rename to mc-boot/GCmdArgs.cc.
6767         * mc-boot/GDebug.c: Rename to mc-boot/GDebug.cc.
6768         * mc-boot/GDynamicStrings.c: Rename to mc-boot/GDynamicStrings.cc.
6769         * mc-boot/GEnvironment.c: Rename to mc-boot/GEnvironment.cc.
6770         * mc-boot/GFIO.c: Rename to mc-boot/GFIO.cc.
6771         * mc-boot/GFormatStrings.c: Rename to mc-boot/GFormatStrings.cc.
6772         * mc-boot/GFpuIO.c: Rename to mc-boot/GFpuIO.cc.
6773         * mc-boot/GIO.c: Rename to mc-boot/GIO.cc.
6774         * mc-boot/GIndexing.c: Rename to mc-boot/GIndexing.cc.
6775         * mc-boot/GM2Dependent.c: Rename to mc-boot/GM2Dependent.cc.
6776         * mc-boot/GM2EXCEPTION.c: Rename to mc-boot/GM2EXCEPTION.cc.
6777         * mc-boot/GM2RTS.c: Rename to mc-boot/GM2RTS.cc.
6778         * mc-boot/GMemUtils.c: Rename to mc-boot/GMemUtils.cc.
6779         * mc-boot/GNumberIO.c: Rename to mc-boot/GNumberIO.cc.
6780         * mc-boot/GPushBackInput.c: Rename to mc-boot/GPushBackInput.cc.
6781         * mc-boot/GRTExceptions.c: Rename to mc-boot/GRTExceptions.cc.
6782         * mc-boot/GRTint.c: Rename to mc-boot/GRTint.cc.
6783         * mc-boot/GSArgs.c: Rename to mc-boot/GSArgs.cc.
6784         * mc-boot/GSFIO.c: Rename to mc-boot/GSFIO.cc.
6785         * mc-boot/GStdIO.c: Rename to mc-boot/GStdIO.cc.
6786         * mc-boot/GStorage.c: Rename to mc-boot/GStorage.cc.
6787         * mc-boot/GStrCase.c: Rename to mc-boot/GStrCase.cc.
6788         * mc-boot/GStrIO.c: Rename to mc-boot/GStrIO.cc.
6789         * mc-boot/GStrLib.c: Rename to mc-boot/GStrLib.cc.
6790         * mc-boot/GStringConvert.c: Rename to mc-boot/GStringConvert.cc.
6791         * mc-boot/GSysStorage.c: Rename to mc-boot/GSysStorage.cc.
6792         * mc-boot/GTimeString.c: Rename to mc-boot/GTimeString.cc.
6793         * mc-boot/Galists.c: Rename to mc-boot/Galists.cc.
6794         * mc-boot/Gdecl.c: Rename to mc-boot/Gdecl.cc.
6795         * mc-boot/Gkeyc.c: Rename to mc-boot/Gkeyc.cc.
6796         * mc-boot/Glists.c: Rename to mc-boot/Glists.cc.
6797         * mc-boot/GmcComment.c: Rename to mc-boot/GmcComment.cc.
6798         * mc-boot/GmcComp.c: Rename to mc-boot/GmcComp.cc.
6799         * mc-boot/GmcDebug.c: Rename to mc-boot/GmcDebug.cc.
6800         * mc-boot/GmcError.c: Rename to mc-boot/GmcError.cc.
6801         * mc-boot/GmcFileName.c: Rename to mc-boot/GmcFileName.cc.
6802         * mc-boot/GmcLexBuf.c: Rename to mc-boot/GmcLexBuf.cc.
6803         * mc-boot/GmcMetaError.c: Rename to mc-boot/GmcMetaError.cc.
6804         * mc-boot/GmcOptions.c: Rename to mc-boot/GmcOptions.cc.
6805         * mc-boot/GmcPreprocess.c: Rename to mc-boot/GmcPreprocess.cc.
6806         * mc-boot/GmcPretty.c: Rename to mc-boot/GmcPretty.cc.
6807         * mc-boot/GmcPrintf.c: Rename to mc-boot/GmcPrintf.cc.
6808         * mc-boot/GmcQuiet.c: Rename to mc-boot/GmcQuiet.cc.
6809         * mc-boot/GmcReserved.c: Rename to mc-boot/GmcReserved.cc.
6810         * mc-boot/GmcSearch.c: Rename to mc-boot/GmcSearch.cc.
6811         * mc-boot/GmcStack.c: Rename to mc-boot/GmcStack.cc.
6812         * mc-boot/GmcStream.c: Rename to mc-boot/GmcStream.cc.
6813         * mc-boot/Gmcp1.c: Rename to mc-boot/Gmcp1.cc.
6814         * mc-boot/Gmcp2.c: Rename to mc-boot/Gmcp2.cc.
6815         * mc-boot/Gmcp3.c: Rename to mc-boot/Gmcp3.cc.
6816         * mc-boot/Gmcp4.c: Rename to mc-boot/Gmcp4.cc.
6817         * mc-boot/Gmcp5.c: Rename to mc-boot/Gmcp5.cc.
6818         * mc-boot/GnameKey.c: Rename to mc-boot/GnameKey.cc.
6819         * mc-boot/GsymbolKey.c: Rename to mc-boot/GsymbolKey.cc.
6820         * mc-boot/Gtop.c: Rename to mc-boot/Gtop.cc.
6821         * mc-boot/Gvarargs.c: Rename to mc-boot/Gvarargs.cc.
6822         * mc-boot/Gwlists.c: Rename to mc-boot/Gwlists.cc.
6823         * pge-boot/GASCII.c: Rename to pge-boot/GASCII.cc.
6824         * pge-boot/GArgs.c: Rename to pge-boot/GArgs.cc.
6825         * pge-boot/GAssertion.c: Rename to pge-boot/GAssertion.cc.
6826         * pge-boot/GBuiltins.c: Rename to pge-boot/GBuiltins.cc.
6827         * pge-boot/GDebug.c: Rename to pge-boot/GDebug.cc.
6828         * pge-boot/GDynamicStrings.c: Rename to pge-boot/GDynamicStrings.cc.
6829         * pge-boot/GFIO.c: Rename to pge-boot/GFIO.cc.
6830         * pge-boot/GIO.c: Rename to pge-boot/GIO.cc.
6831         * pge-boot/GIndexing.c: Rename to pge-boot/GIndexing.cc.
6832         * pge-boot/GLists.c: Rename to pge-boot/GLists.cc.
6833         * pge-boot/GM2Dependent.c: Rename to pge-boot/GM2Dependent.cc.
6834         * pge-boot/GM2EXCEPTION.c: Rename to pge-boot/GM2EXCEPTION.cc.
6835         * pge-boot/GM2LINK.c: Rename to pge-boot/GM2LINK.cc.
6836         * pge-boot/GM2RTS.c: Rename to pge-boot/GM2RTS.cc.
6837         * pge-boot/GNameKey.c: Rename to pge-boot/GNameKey.cc.
6838         * pge-boot/GNumberIO.c: Rename to pge-boot/GNumberIO.cc.
6839         * pge-boot/GOutput.c: Rename to pge-boot/GOutput.cc.
6840         * pge-boot/GPushBackInput.c: Rename to pge-boot/GPushBackInput.cc.
6841         * pge-boot/GRTExceptions.c: Rename to pge-boot/GRTExceptions.cc.
6842         * pge-boot/GRTco.c: Rename to pge-boot/GRTco.cc.
6843         * pge-boot/GSFIO.c: Rename to pge-boot/GSFIO.cc.
6844         * pge-boot/GSYSTEM.c: Rename to pge-boot/GSYSTEM.cc.
6845         * pge-boot/GSelective.c: Rename to pge-boot/GSelective.cc.
6846         * pge-boot/GStdIO.c: Rename to pge-boot/GStdIO.cc.
6847         * pge-boot/GStorage.c: Rename to pge-boot/GStorage.cc.
6848         * pge-boot/GStrCase.c: Rename to pge-boot/GStrCase.cc.
6849         * pge-boot/GStrIO.c: Rename to pge-boot/GStrIO.cc.
6850         * pge-boot/GStrLib.c: Rename to pge-boot/GStrLib.cc.
6851         * pge-boot/GSymbolKey.c: Rename to pge-boot/GSymbolKey.cc.
6852         * pge-boot/GSysExceptions.c: Rename to pge-boot/GSysExceptions.cc.
6853         * pge-boot/GSysStorage.c: Rename to pge-boot/GSysStorage.cc.
6854         * pge-boot/Gabort.c: Rename to pge-boot/Gabort.cc.
6855         * pge-boot/Gbnflex.c: Rename to pge-boot/Gbnflex.cc.
6856         * pge-boot/Gcbuiltin.c: Rename to pge-boot/Gcbuiltin.cc.
6857         * pge-boot/Gdtoa.c: Rename to pge-boot/Gdtoa.cc.
6858         * pge-boot/Gerrno.c: Rename to pge-boot/Gerrno.cc.
6859         * pge-boot/Gldtoa.c: Rename to pge-boot/Gldtoa.cc.
6860         * pge-boot/Glibc.c: Rename to pge-boot/Glibc.cc.
6861         * pge-boot/Glibm.c: Rename to pge-boot/Glibm.cc.
6862         * pge-boot/Gmcrts.c: Rename to pge-boot/Gmcrts.cc.
6863         * pge-boot/Gpge.c: Rename to pge-boot/Gpge.cc.
6864         * pge-boot/Gwrapc.c: Rename to pge-boot/Gwrapc.cc.
6865         * pge-boot/README: Correct description.
6866         * pge-boot/main.c: Rename to pge-boot/main.cc.
6867         * pge-boot/network.c: Rename to pge-boot/network.cc.
6869 2023-02-28  Gaius Mulley  <gaiusmod2@gmail.com>
6871         PR modula2/108956
6872         * Make-lang.in (m2/gm2-libs-boot/M2RTS.o): New specific rule to
6873         add the --suppress-noreturn option.
6874         * Make-maintainer.in (m2/gm2-ppg-boot/$(SRC_PREFIX)M2RTS.o): New
6875         specific rule to add the --suppress-noreturn option.
6876         (m2/gm2-pg-boot/$(SRC_PREFIX)M2RTS.o): New
6877         specific rule to add the --suppress-noreturn option.
6878         (m2/gm2-pg-boot/$(SRC_PREFIX)%.o): Add missing $(srcdir).
6879         (m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.o): New
6880         specific rule to add the --suppress-noreturn option.
6881         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Add missing $(srcdir).
6882         * gm2-libs-ch/UnixArgs.cc (LIBNAME): New define.
6883         (_M2_UnixArgs_ctor): Add LIBNAME parameter to RegisterModule.
6884         * gm2-libs-ch/dtoa.cc (LIBNAME): New define.
6885         (_M2_dtoa_ctor): Add LIBNAME parameter to RegisterModule.
6886         * gm2-libs-ch/ldtoa.cc (LIBNAME): New define.
6887         (_M2_ldtoa_ctor): Add LIBNAME parameter to RegisterModule.
6888         * pge-boot/m2rts.h (M2RTS_RegisterModule): Add libname
6889         parameter.
6890         * gm2-libs-ch/m2rts.h (M2RTS_RegisterModule): Add libname
6891         parameter.
6892         * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_ctor): Remove.
6893         * pge-boot/GUnixArgs.cc (LIBNAME): New define.
6894         (_M2_UnixArgs_ctor): Add LIBNAME parameter to RegisterModule.
6895         * gm2-libs/RTint.def (AttachVector): Rename parameter.
6896         * mc-boot/GDynamicStrings.c: Rebuilt.
6897         * mc-boot/GFIO.c: Rebuilt.
6898         * mc-boot/GIndexing.c: Rebuilt.
6899         * mc-boot/GM2EXCEPTION.c: Rebuilt.
6900         * mc-boot/GPushBackInput.c: Rebuilt.
6901         * mc-boot/GRTExceptions.c: Rebuilt.
6902         * mc-boot/GRTint.c: Rebuilt.
6903         * mc-boot/GRTint.h: Rebuilt.
6904         * mc-boot/GStdIO.c: Rebuilt.
6905         * mc-boot/GStringConvert.c: Rebuilt.
6906         * mc-boot/GSysStorage.c: Rebuilt.
6907         * mc-boot/Gdecl.c: Rebuilt.
6908         * mc-boot/Gkeyc.c: Rebuilt.
6909         * mc-boot/GmcComment.c: Rebuilt.
6910         * mc-boot/GmcComp.c: Rebuilt.
6911         * mc-boot/GmcDebug.c: Rebuilt.
6912         * mc-boot/GmcMetaError.c: Rebuilt.
6913         * mc-boot/GmcOptions.c: Rebuilt.
6914         * mc-boot/GmcOptions.h: Rebuilt.
6915         * mc-boot/GmcStack.c: Rebuilt.
6916         * mc-boot/GnameKey.c: Rebuilt.
6917         * mc-boot/GsymbolKey.c: Rebuilt.
6918         * mc/decl.mod:: Rebuilt.
6919         * mc/mcOptions.def: Rebuilt.
6920         * mc/mcOptions.mod:: Rebuilt.
6921         * pge-boot/GDynamicStrings.c: Rebuilt.
6922         * pge-boot/GFIO.c: Rebuilt.
6923         * pge-boot/GIndexing.c: Rebuilt.
6924         * pge-boot/GM2EXCEPTION.c: Rebuilt.
6925         * pge-boot/GM2RTS.c: Rebuilt.
6926         * pge-boot/GNameKey.c: Rebuilt.
6927         * pge-boot/GPushBackInput.c: Rebuilt.
6928         * pge-boot/GRTExceptions.c: Rebuilt.
6929         * pge-boot/GStdIO.c: Rebuilt.
6930         * pge-boot/GSymbolKey.c: Rebuilt.
6931         * pge-boot/GSysStorage.c: Rebuilt.
6933 2023-02-25  Gaius Mulley  <gaiusmod2@gmail.com>
6935         PR modula2/108261
6936         * Make-lang.in (GM2-COMP-BOOT-DEFS): DynamicStringPath.def
6937         remove.  DynamicPath.def add.
6938         (GM2-COMP-BOOT-MODS): DynamicStringPath.mod remove.
6939         DynamicPath.mod add.
6940         * Make-maintainer.in (BUILD-BOOT-PPG-H): New dependency.
6941         (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PPG-H) Add
6942         dependency.
6943         (PGE-DEF): New definition.
6944         (BUILD-BOOT-PG-H): New dependency.
6945         (m2/gm2-pg-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PG-H) Add
6946         dependency.
6947         (BUILD-BOOT-PGE-H): New dependency.
6948         (m2/gm2-pge-boot/$(SRC_PREFIX)%.o): $(BUILD-BOOT-PGE-H) Add
6949         dependency.
6950         (GM2PATH): Add pathname entries.
6951         (m2/boot-bin/mc-devel$(exeext)): Add m2/mc-boot-ch/Gm2rtsdummy.o
6952         dependency.
6953         (m2/boot-bin/mc-opt$(exeext)): Fix -I path.
6954         * gm2-compiler/DynamicStringPath.def: Renamed module to
6955         DynamicPath.
6956         (GetUserPath): Remove.
6957         (GetSystemPath): Remove.
6958         (SetUserPath): Remove.
6959         (SetSystemPath): Remove.
6960         (DumpPath): New procedure definition.
6961         * gm2-compiler/DynamicStringPath.mod: Renamed module to
6962         DynamicPath.
6963         (GetUserPath): Remove.
6964         (GetSystemPath): Remove.
6965         (SetUserPath): Remove.
6966         (SetSystemPath): Remove.
6967         (DumpPath): Remove Debugging conditional.
6968         * gm2-compiler/M2AsmUtil.mod: Import EqualArray, NulName and
6969         GetLibName.
6970         (Debugging): New declaration.
6971         (GetFullSymName): Re-implemented to prefix (mange) libname
6972         to any extern variable/procedure which is IsExportQualified.
6973         * gm2-compiler/M2Comp.mod (qprintLibName): New procedure.
6974         * gm2-compiler/M2Graph.mod (resolveImports): Add libname.
6975         * gm2-compiler/M2Options.def (SetM2Prefix): New procedure.
6976         (GetM2Prefix): New procedure function.
6977         (SetM2PathName): New procedure.
6978         (GetM2PathName): New procedure function.
6979         * gm2-compiler/M2Options.mod: (SetM2Prefix): New procedure implemented.
6980         (GetM2Prefix): New procedure function implemented.
6981         (SetM2PathName): New procedure implemented.
6982         (GetM2PathName): New procedure function implemented.
6983         (RuntimeModuleOverride): Set to DefaultRuntimeModuleOverride.
6984         * gm2-compiler/M2Quads.mod: Import GetLibName.
6985         (SafeRequestSym) Pass result of GetLibName to RequestDependant.
6986         (callRequestDependant): Add libname as a parameter.
6987         (BuildM2InitFunction): Add libname as a parameter.
6988         (BuildM2FiniFunction): Add libname as a parameter.
6989         (BuildM2CtorFunction): Add libname as a parameter.
6990         * gm2-compiler/M2Scaffold.mod (LookupModuleSym): Set LibName
6991         if a definition source was found.
6992         * gm2-compiler/M2Search.def (FindSourceFile): Add named library parameter.
6993         (FindSourceDefFile): Add named library parameter.
6994         (FindSourceModFile): Add named library parameter.
6995         * gm2-compiler/M2Search.mod (FindSourceFile): Reimplement.
6996         (FindSourceDefFile): Add named library parameter.
6997         (FindSourceModFile): Add named library parameter.
6998         * gm2-compiler/SymbolTable.def (MakeProcedureCtorExtern): Add
6999         libname parameter.
7000         (PutLibName): New procedure.
7001         (GetLibName): New procedure function.
7002         * gm2-compiler/SymbolTable.mod (MakeProcedureCtorExtern): Add
7003         libname parameter.
7004         (GenName): Add libname parameter.
7005         (InitCtorFields): Add moduleSym as a parameter.
7006         (PutCtorExtern): Add libname parameter to GenName.
7007         * gm2-gcc/init.cc (_M2_DynamicStringPath_init): Rename function...
7008         (_M2_DynamicPath_init): ...to this.
7009         (_M2_PathName_init): Added.
7010         * gm2-gcc/m2decl.cc (m2decl_DeclareM2linkStaticInitialization):
7011         Add m2pim as the manged component of the exported symbol.
7012         (m2decl_DeclareM2linkForcedModuleInitOrder): Add m2pim mangle prefix.
7013         * gm2-gcc/m2options.h (M2Options_SetM2Prefix): New function.
7014         (M2Options_GetM2Prefix): New function.
7015         (M2Options_SetM2PathName): New function.
7016         (M2Options_GetM2PathName): New function.
7017         * gm2-lang.cc (push_back_Ipath): New function.
7018         (add_one_import_path): New function.
7019         (gm2_langhook_handle_option): Record -I component.  Call
7020         SetM2PathName when -fm2-pathname= is seen.  Record -fm2-pathnameI
7021         component.  Call SetM2Prefix when -fm2-prefix= is seen.
7022         (gm2_langhook_post_options): Iterative over pathname entries
7023         and call SetM2PathName, SetSearchPath as appropriate.
7024         * gm2-libs-iso/M2RTS.def (ConstructModules): Add libname parameter.
7025         (DeconstructModules): Add libname parameter.
7026         (RegisterModule): Add libname parameter.
7027         (RequestDependant): Add libname parameter.
7028         * gm2-libs-iso/M2RTS.mod (ConstructModules): Add libname parameter.
7029         (DeconstructModules): Add libname parameter.
7030         (RegisterModule): Add libname parameter.
7031         (RequestDependant): Add libname parameter.
7032         * gm2-libs-min/M2RTS.def (ConstructModules): Add libname parameter.
7033         (DeconstructModules): Add libname parameter.
7034         (RegisterModule): Add libname parameter.
7035         (RequestDependant): Add libname parameter.
7036         * gm2-libs-min/M2RTS.mod (ConstructModules): Add libname parameter.
7037         (DeconstructModules): Add libname parameter.
7038         (RegisterModule): Add libname parameter.
7039         (RequestDependant): Add libname parameter.
7040         * gm2-libs/M2Dependent.def (ConstructModules): Add libname parameter.
7041         (DeconstructModules): Add libname parameter.
7042         (RegisterModule): Add libname parameter.
7043         (RequestDependant): Add libname parameter.
7044         * gm2-libs/M2Dependent.mod (ConstructModules): Add libname parameter.
7045         (DeconstructModules): Add libname parameter.
7046         (RegisterModule): Add libname parameter.
7047         (RequestDependant): Add libname parameter.
7048         * gm2-libs/M2RTS.def (ConstructModules): Add libname parameter.
7049         (DeconstructModules): Add libname parameter.
7050         (RegisterModule): Add libname parameter.
7051         (RequestDependant): Add libname parameter.
7052         * gm2-libs/M2RTS.mod (ConstructModules): Add libname parameter.
7053         (DeconstructModules): Add libname parameter.
7054         (RegisterModule): Add libname parameter.
7055         (RequestDependant): Add libname parameter.
7056         * gm2-libs/RTint.mod (FindVector): Rename variables.
7057         (initInputVector): Rename variables.
7058         (initOutputVector): Rename variables.
7059         (InitTimeVector): Rename variables.
7060         (FindVectorNo): Rename variables.
7061         (FindPendingVector): Rename variables.
7062         (ReArmTimeVector): Rename variables.
7063         (GetTimeVector): Rename variables.
7064         (AttachVector): Rename variables.
7065         (AttachVector): Rename variables.
7066         (IncludeVector): Rename variables.
7067         (ExcludeVector): Rename variables.
7068         (AddFd): Rename variables.
7069         (AddFd): Rename variables.
7070         (DumpPendingQueue): Rename variables.
7071         (stop): Remove.
7072         (activatePending): Rename variables.
7073         (Listen): Rename variables.
7074         * gm2-libs/libc.def (snprintf): New function.
7075         * gm2-libs/sckt.def: Change all exported identifiers to be
7076         export qualified.
7077         * gm2spec.cc (push_back_Ipath): New function.
7078         (add_m2_I_path): New function.
7079         (lang_specific_driver): Skip -fm2-pathname= and remember pathname.
7080         Skip -I and record the path and current pathname.  Call add_m2_I_path.
7081         * lang-specs.h: Replace %{I*} with %{fm2-pathname*}.
7082         * lang.opt (-fm2-pathname=): New entry.
7083         (-fm2-pathname): New entry.
7084         (-fm2-prefix=): New entry.
7085         * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_dep): New function.
7086         (_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): New method.
7087         * mc-boot-ch/Glibc.c (libc_snprintf): New function.
7088         * mc-boot-ch/m2rts.h (M2RTS_RequestDependant): Changed prototype.
7089         (M2RTS_RegisterModule): Changed prototype.
7090         * mc-boot/GDynamicStrings.c: Rebuild.
7091         * mc-boot/GFIO.c: Rebuild.
7092         * mc-boot/GIndexing.c: Rebuild.
7093         * mc-boot/GM2Dependent.c: Rebuild.
7094         * mc-boot/GM2Dependent.h: Rebuild.
7095         * mc-boot/GM2EXCEPTION.c: Rebuild.
7096         * mc-boot/GM2RTS.c: Rebuild.
7097         * mc-boot/GM2RTS.h: Rebuild.
7098         * mc-boot/GPushBackInput.c: Rebuild.
7099         * mc-boot/GRTExceptions.c: Rebuild.
7100         * mc-boot/GRTint.c: Rebuild.
7101         * mc-boot/GStdIO.c: Rebuild.
7102         * mc-boot/GStringConvert.c: Rebuild.
7103         * mc-boot/GSysStorage.c: Rebuild.
7104         * mc-boot/Gdecl.c: Rebuild.
7105         * mc-boot/Gkeyc.c: Rebuild.
7106         * mc-boot/Glibc.h: Rebuild.
7107         * mc-boot/GmcComment.c: Rebuild.
7108         * mc-boot/GmcComp.c: Rebuild.
7109         * mc-boot/GmcDebug.c: Rebuild.
7110         * mc-boot/GmcMetaError.c: Rebuild.
7111         * mc-boot/GmcStack.c: Rebuild.
7112         * mc-boot/GnameKey.c: Rebuild.
7113         * mc-boot/GsymbolKey.c: Rebuild.
7114         * pge-boot/GASCII.c: Rebuild.
7115         * pge-boot/GArgs.c: Rebuild.
7116         * pge-boot/GAssertion.c: Rebuild.
7117         * pge-boot/GDebug.c: Rebuild.
7118         * pge-boot/GDynamicStrings.c: Rebuild.
7119         * pge-boot/GFIO.c: Rebuild.
7120         * pge-boot/GIO.c: Rebuild.
7121         * pge-boot/GIndexing.c: Rebuild.
7122         * pge-boot/GLists.c: Rebuild.
7123         * pge-boot/GM2Dependent.c: Rebuild.
7124         * pge-boot/GM2Dependent.h: Rebuild.
7125         * pge-boot/GM2EXCEPTION.c: Rebuild.
7126         * pge-boot/GM2RTS.c: Rebuild.
7127         * pge-boot/GM2RTS.h: Rebuild.
7128         * pge-boot/GNameKey.c: Rebuild.
7129         * pge-boot/GNumberIO.c: Rebuild.
7130         * pge-boot/GOutput.c: Rebuild.
7131         * pge-boot/GPushBackInput.c: Rebuild.
7132         * pge-boot/GRTExceptions.c: Rebuild.
7133         * pge-boot/GSFIO.c: Rebuild.
7134         * pge-boot/GStdIO.c: Rebuild.
7135         * pge-boot/GStorage.c: Rebuild.
7136         * pge-boot/GStrCase.c: Rebuild.
7137         * pge-boot/GStrIO.c: Rebuild.
7138         * pge-boot/GStrLib.c: Rebuild.
7139         * pge-boot/GSymbolKey.c: Rebuild.
7140         * pge-boot/GSysExceptions.c (_M2_SysExceptions_finish): Rename this...
7141         (_M2_SysExceptions_fini): ... to this.
7142         * pge-boot/GSysStorage.c: Rebuild.
7143         (_M2_SysStorage_finish): Rename this...
7144         (_M2_SysStorage_fini): ... to this.
7145         * pge-boot/GUnixArgs.cc: New file.
7146         * pge-boot/Gbnflex.c (_M2_bnflex_finish): Rename this...
7147         (_M2_bnflex_fini): ... to this.
7148         * pge-boot/Gerrno.c (_M2_errno_finish): Rename this...
7149         (_M2_errno_fini): ... to this.
7150         * pge-boot/Glibc.c (libc_snprintf): New function.
7151         * pge-boot/Glibc.h (libc_snprintf): New prototype.
7152         * pge-boot/Gpge.c (_M2_pge_finish): Rename this...
7153         (_M2_pge_fini): ... to this.
7154         * pge-boot/Gtermios.cc (_M2_termios_finish): Rename this...
7155         (_M2_termios_fini): ... to this.
7156         * pge-boot/main.c (_M2_RTExceptions_finish): Rename this...
7157         (_M2_RTExceptions_fini): ... to this.
7158         (_M2_M2EXCEPTION_finish): Rename this...
7159         (_M2_M2EXCEPTION_fini): ... to this.
7160         (_M2_M2RTS_finish): Rename this...
7161         (_M2_M2RTS_fini): ... to this.
7162         (_M2_SysExceptions_finish): Rename this...
7163         (_M2_SysExceptions_fini): ... to this.
7164         (_M2_StrLib_finish): Rename this...
7165         (_M2_StrLib_fini): ... to this.
7166         (_M2_errno_finish): Rename this...
7167         (_M2_errno_fini): ... to this.
7168         (_M2_termios_finish): Rename this...
7169         (_M2_termios_fini): ... to this.
7170         (_M2_IO_finish): Rename this...
7171         (_M2_IO_fini): ... to this.
7172         (_M2_StdIO_finish): Rename this...
7173         (_M2_StdIO_fini): ... to this.
7174         (_M2_Debug_finish): Rename this...
7175         (_M2_Debug_fini): ... to this.
7176         (_M2_SysStorage_finish): Rename this...
7177         (_M2_SysStorage_fini): ... to this.
7178         (_M2_Storage_finish): Rename this...
7179         (_M2_Storage_fini): ... to this.
7180         (_M2_StrIO_finish): Rename this...
7181         (_M2_StrIO_fini): ... to this.
7182         (_M2_DynamicStrings_finish): Rename this...
7183         (_M2_DynamicStrings_fini): ... to this.
7184         (_M2_Assertion_finish): Rename this...
7185         (_M2_Assertion_fini): ... to this.
7186         (_M2_Indexing_finish): Rename this...
7187         (_M2_Indexing_fini): ... to this.
7188         (_M2_NameKey_finish): Rename this...
7189         (_M2_NameKey_fini): ... to this.
7190         (_M2_NumberIO_finish): Rename this...
7191         (_M2_NumberIO_fini): ... to this.
7192         (_M2_PushBackInput_finish): Rename this...
7193         (_M2_PushBackInput_fini): ... to this.
7194         (_M2_SymbolKey_finish): Rename this...
7195         (_M2_SymbolKey_fini): ... to this.
7196         (_M2_UnixArgs_finish): Rename this...
7197         (_M2_UnixArgs_fini): ... to this.
7198         (_M2_FIO_finish): Rename this...
7199         (_M2_FIO_fini): ... to this.
7200         (_M2_SFIO_finish): Rename this...
7201         (_M2_SFIO_fini): ... to this.
7202         (_M2_StrCase_finish): Rename this...
7203         (_M2_StrCase_fini): ... to this.
7204         (_M2_bnflex_finish): Rename this...
7205         (_M2_bnflex_fini): ... to this.
7206         (_M2_Lists_finish): Rename this...
7207         (_M2_Lists_fini): ... to this.
7208         (_M2_Args_finish): Rename this...
7209         (_M2_Args_fini): ... to this.
7210         (_M2_Output_finish): Rename this...
7211         (_M2_Output_fini): ... to this.
7212         (_M2_pge_finish): Rename this...
7213         (_M2_pge_fini): ... to this.
7214         * plugin/m2rte.cc (m2_runtime_error_calls): Change all runtime
7215         procedure names to their name mangled counterparts.
7216         * gm2-libs-iso/wrapsock.c: Removed.
7217         * gm2-libs-iso/wraptime.c: Removed.
7218         * mc-boot/Gpth.h: Removed.
7219         * gm2-compiler/PathName.def: New file.
7220         * gm2-compiler/PathName.mod: New file.
7221         * gm2-compiler/DynamicPath.def: New file.
7222         * gm2-compiler/DynamicPath.mod: New file.
7224 2023-02-06  Gaius Mulley  <gaiusmod2@gmail.com>
7226         PR modula2/108135
7227         * gm2-compiler/M2Search.mod (DSdbEnter): Comment out.
7228         (DSdbExit): Comment out.
7230 2023-02-06  Co-Authored by: Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7232         PR modula2/107234
7233         * m2pp.cc (m2pp_integer_cst): Use
7234         HOST_WIDE_INT_PRINT_UNSIGNED as the format specifier.
7236 2023-02-06  Gaius Mulley  <gaiusmod2@gmail.com>
7238         * gm2-compiler/M2Preprocess.mod (BaseName): Comment out.
7239         * gm2-lang.cc (opt): Remove.
7240         * gm2spec.cc (add_include): Remove.
7241         (full_libraries): Remove.
7242         (concat_option): Remove.
7244 2023-02-03  Gaius Mulley  <gaiusmod2@gmail.com>
7246         * Make-lang.in (TEXISRC): Remove m2/images/gnu.eps.
7247         (RSTSRC): Remove m2/images/gnu.eps.
7248         (doc/m2.dvi): Add $(objdir)/m2/images/gnu.eps.
7249         (doc/m2.pdf): Add $(objdir)/m2/images/gnu.eps.
7250         (M2_PDFFILES): New definition.
7251         (m2.install-pdf): New rule.
7252         (m2.pod): Add $(objdir)/m2/images/gnu.eps.
7253         (m2.info): Add $(objdir)/m2/images/gnu.eps.
7254         (m2.html): New rule.
7255         (m2/gpl_v3_without_node.texi): New rule.
7256         (plugin/m2rte$(soext)): Simplify mkinstalldirs.
7257         (cc1gm2$(exeext)): Ditto.
7258         (m2/stage1/cc1gm2$(exeext)): Ditto.
7259         (m2/gm2-gcc/%.o): Ditto.
7260         (m2/gm2-gcc/rtegraph.o): Ditto.
7261         (m2/gm2-gcc/$(SRC_PREFIX)%.h): Ditto.
7262         (m2/mc-boot/$(SRC_PREFIX)%.o):Ditto.
7263         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Ditto.
7264         (m2/mc-boot/main.o): Ditto.
7265         (m2/gm2-libs-boot/%.o): Ditto.
7266         (m2/gm2-libs-boot/$(SRC_PREFIX)%.h): Ditto.
7267         (m2/gm2-libs-boot/RTcodummy.o): Ditto.
7268         (m2/gm2-libs-boot/wrapc.o): Ditto.
7269         (m2/gm2-libs-boot/M2LINK.o): Ditto.
7270         (m2/gm2-libs-boot/UnixArgs.o): Ditto.
7271         (m2/gm2-libs-boot/choosetemp.o): Ditto.
7272         (m2/gm2-libs-boot/errno.o): Ditto.
7273         (m2/gm2-libs-boot/dtoa.o): Ditto.
7274         (m2/gm2-libs-boot/ldtoa.o): Ditto.
7275         (m2/gm2-libs-boot/termios.o): Ditto.
7276         (m2/gm2-libs-boot/SysExceptions.o): Ditto.
7277         (m2/gm2-libs-boot/SysStorage.o): Ditto.
7278         (m2/gm2-compiler-boot/M2GCCDeclare.o): Ditto.
7279         (m2/gm2-compiler-boot/M2Error.o): Ditto.
7280         (m2/gm2-compiler-boot/%.o): Ditto.
7281         (m2/gm2-compiler-boot/$(SRC_PREFIX)%.h): Ditto.
7282         (m2/gm2-compiler-boot/m2flex.o): Ditto.
7283         (m2/gm2-compiler/m2flex.c): Ditto.
7284         (m2/gm2-libiberty/$(SRC_PREFIX)%.h): Ditto.
7285         (m2/gm2-compiler/%.o): Ditto.
7286         (m2/gm2-compiler/m2flex.o): Ditto.
7287         (m2/gm2-compiler/%.o): Ditto.
7288         (m2/gm2-libs-iso/%.o): Ditto.
7289         (m2/gm2-libs/gm2-libs-host.h): Ditto.
7290         ($(objdir)/m2/gm2-libs-min/SYSTEM.def): Ditto.
7291         ($(objdir)/m2/gm2-libs/SYSTEM.def): Ditto.
7292         ($(objdir)/m2/gm2-libs-iso/SYSTEM.def): Ditto.
7293         ($(objdir)/m2/gm2-libs-coroutines/SYSTEM.def): Ditto.
7294         (m2/gm2-compiler/gm2.a): Ditto.
7295         (m2/gm2-libs-boot/libgm2.a): Ditto.
7296         (m2/gm2-compiler-boot/gm2.a): Ditto.
7297         (m2/boot-bin/mklink$(exeext)): Ditto.
7298         (m2/gm2-compiler-boot/$(SRC_PREFIX)%.h): Ditto.
7299         (m2/gm2-compiler/%.mod): Ditto.
7300         (m2/gm2-compiler-boot/%.mod): Ditto.
7301         (m2/pge-boot/%.o): Ditto.
7303 2023-02-01  Gaius Mulley  <gaiusmod2@gmail.com>
7305         * Make-lang.in (GM2_FLAGS): Add -fno-return -Wreturn-type.
7306         (GM2_ISO_FLAGS): Add -fno-return -Wreturn-type.
7307         * Make-maintainer.in (GM2PATH): Split into separate -I components.
7308         (MC-LIB-DEFS): Add RTentity.def.
7309         (m2/boot-bin/mc-devel$(exeext)): Changed -I$(GM2PATH) to
7310         $(GM2PATH).
7311         (m2/boot-bin/mc-opt$(exeext)): Separate -I paths.
7312         (m2/mc/decl.o): Separate -I paths.
7313         (gm2-bootstrap): Separate -I paths.
7314         (m2/mc-boot-gen/$(SRC_PREFIX)%.h): Separate -I paths.
7315         (m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Separate -I paths.
7316         (m2/mc-boot-gen/$(SRC_PREFIX)%.c): Separate -I paths.
7317         (gm2.verifyparanoid): Separate -I paths.
7318         (gm2.verifystage12): Separate -I paths.
7319         * gm2-compiler/M2ALU.mod (GetConstructorElement): Add default
7320         Return NulSym.  Remove return from the error case.
7321         * gm2-compiler/M2Base.mod (ComplexToScalar): Return RType
7322         from the error case.
7323         (MixMetaTypes):  Return MakeError as a default.
7324         * gm2-compiler/M2GCCDeclare.mod (GetTypeMin): Return NulSym
7325         from the error case.
7326         (GetTypeMax): Return NulSym from the error case.
7327         * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Replace Assert
7328         by InternalError.
7329         * gm2-compiler/M2Quads.mod (GetItemPointedTo): Add InternalError.
7330         (GetTypeMin): Add InternalError.
7331         (GetTypeMax): Add InternalError.
7332         * gm2-compiler/M2System.mod (InitSystem): Call
7333         PutProcedureNoReturn on Throw.
7334         * gm2-gcc/m2except.cc (m2except_InitExceptions): fn_throw_tree
7335         declare as noreturn.  fn_rethrow_tree declare as noreturn.
7336         * gm2-libs-coroutines/Debug.def (Halt): Add noreturn attribute.
7337         * gm2-libs-coroutines/SYSTEM.def (THROW): Add noreturn attribute.
7338         * gm2-libs-iso/ClientSocket.mod (dorbytes): Add return FALSE.
7339         * gm2-libs-iso/EXCEPTIONS.def (RAISE): Add noreturn attribute.
7340         * gm2-libs-iso/IOLink.def (RAISEdevException): Add noreturn attribute.
7341         * gm2-libs-iso/M2RTS.def (HALT): Add noreturn attribute.
7342         (Halt): Ditto.
7343         (HaltC): Ditto.
7344         (ErrorMessage): Ditto.
7345         (AssignmentException): Ditto.
7346         (ReturnException): Ditto.
7347         (IncException): Ditto.
7348         (DecException): Ditto.
7349         (InclException): Ditto.
7350         (ExclException): Ditto.
7351         (ShiftException): Ditto.
7352         (RotateException): Ditto.
7353         (StaticArraySubscriptException): Ditto.
7354         (DynamicArraySubscriptException): Ditto.
7355         (ForLoopBeginException): Ditto.
7356         (ForLoopToException): Ditto.
7357         (ForLoopEndException): Ditto.
7358         (PointerNilException): Ditto.
7359         (NoReturnException): Ditto.
7360         (CaseException): Ditto.
7361         (WholeNonPosDivException): Ditto.
7362         (WholeNonPosModException): Ditto.
7363         (WholeZeroDivException): Ditto.
7364         (WholeZeroRemException): Ditto.
7365         (WholeValueException): Ditto.
7366         (RealValueException): Ditto.
7367         (ParameterException): Ditto.
7368         (NoException): Ditto.
7369         * gm2-libs-iso/SYSTEM.def (THROW): Ditto.
7370         * gm2-libs-iso/TermFile.mod (dorbytes): Add default return FALSE.
7371         * gm2-libs-min/M2RTS.def: Add noreturn attribute.
7372         * gm2-libs/FIO.mod (BufferedRead): Return -1.
7373         (getFileName): Return NIL.
7374         (getFileNameLength): Return 0.
7375         * gm2-libs/M2RTS.def (HaltC): Add noreturn attribute.
7376         (AssignmentException): Ditto.
7377         (ReturnException): Ditto.
7378         (IncException): Ditto.
7379         (DecException): Ditto.
7380         (InclException): Ditto.
7381         (ExclException): Ditto.
7382         (ShiftException): Ditto.
7383         (RotateException): Ditto.
7384         (StaticArraySubscriptException): Ditto.
7385         (DynamicArraySubscriptException): Ditto.
7386         (ForLoopBeginException): Ditto.
7387         (ForLoopToException): Ditto.
7388         (ForLoopEndException): Ditto.
7389         (PointerNilException): Ditto.
7390         (NoReturnException): Ditto.
7391         (CaseException): Ditto.
7392         (WholeNonPosDivException): Ditto.
7393         (WholeNonPosModException): Ditto.
7394         (WholeZeroDivException): Ditto.
7395         (WholeZeroRemException): Ditto.
7396         (WholeValueException): Ditto.
7397         (RealValueException): Ditto.
7398         (ParameterException): Ditto.
7399         (NoException): Ditto.
7400         * gm2-libs/RTExceptions.def (Raise): Ditto.
7401         * gm2-libs/RTExceptions.mod (InvokeHandler): Ditto.
7402         * gm2-libs/SYSTEM.def (THROW): Ditto.
7403         * m2.flex (_M2_m2flex_fini): Remamed to...
7404         (_M2_m2flex_finish): ...here.
7405         * mc-boot-ch/GBuiltins.c (_M2_Builtins_finish): Remamed to...
7406         (_M2_Builtins_fini): ...this.
7407         * mc-boot-ch/GRTco.c (_M2_RTco_finish): Remamed to...
7408         (_M2_RTco_fini): ...this.
7409         * mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_finish): Remamed to...
7410         (_M2_SYSTEM_fini): ...this.
7411         * mc-boot-ch/GSelective.c (_M2_Selective_finish): Remamed to...
7412         (_M2_Selective_fini): ...this.
7413         * mc-boot-ch/GSysExceptions.c (_M2_SysExceptions_init): Add
7414         parameters.
7415         (_M2_SysExceptions_finish): Remamed to...
7416         (_M2_SysExceptions_fini): ...this.
7417         * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_finish): Remamed to...
7418         (_M2_UnixArgs_fini): ...this.
7419         (_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): Change parameter
7420         to _M2_UnixArgs_fini.
7421         * mc-boot-ch/Gdtoa.c (_M2_dtoa_finish): Remamed to...
7422         (_M2_dtoa_fini): ...this.
7423         * mc-boot-ch/Gerrno.c (_M2_errno_finish): Remamed to...
7424         (_M2_errno_fini): ...this.
7425         * mc-boot-ch/Gldtoa.c (_M2_ldtoa_finish): Remamed to...
7426         (_M2_ldtoa_fini): ...this.
7427         * mc-boot-ch/Gtermios.cc (_M2_termios_init): Add parameters.
7428         (_M2_termios_finish): Remamed to...
7429         (_M2_termios_fini): ...this.
7430         * mc-boot-ch/Gwrapc.c (_M2_wrapc_init): Add parameters.
7431         (_M2_wrapc_finish): Remamed to...
7432         (_M2_wrapc_fini): ...this.
7433         * mc-boot/GASCII.c: Rebuild.
7434         * mc-boot/GArgs.c: Rebuild.
7435         * mc-boot/GAssertion.c: Rebuild.
7436         * mc-boot/GBreak.c: Rebuild.
7437         * mc-boot/GCmdArgs.c: Rebuild.
7438         * mc-boot/GDebug.c: Rebuild.
7439         * mc-boot/GDynamicStrings.c: Rebuild.
7440         * mc-boot/GEnvironment.c: Rebuild.
7441         * mc-boot/GFIO.c: Rebuild.
7442         * mc-boot/GFormatStrings.c: Rebuild.
7443         * mc-boot/GFpuIO.c: Rebuild.
7444         * mc-boot/GIO.c: Rebuild.
7445         * mc-boot/GIndexing.c: Rebuild.
7446         * mc-boot/GM2Dependent.c: Rebuild.
7447         * mc-boot/GM2EXCEPTION.c: Rebuild.
7448         * mc-boot/GM2RTS.c: Rebuild.
7449         * mc-boot/GM2RTS.h: Rebuild.
7450         * mc-boot/GMemUtils.c: Rebuild.
7451         * mc-boot/GNumberIO.c: Rebuild.
7452         * mc-boot/GPushBackInput.c: Rebuild.
7453         * mc-boot/GRTExceptions.c: Rebuild.
7454         * mc-boot/GRTExceptions.h: Rebuild.
7455         * mc-boot/GRTco.h: Rebuild.
7456         * mc-boot/GRTint.c: Rebuild.
7457         * mc-boot/GSArgs.c: Rebuild.
7458         * mc-boot/GSFIO.c: Rebuild.
7459         * mc-boot/GStdIO.c: Rebuild.
7460         * mc-boot/GStorage.c: Rebuild.
7461         * mc-boot/GStrCase.c: Rebuild.
7462         * mc-boot/GStrIO.c: Rebuild.
7463         * mc-boot/GStrLib.c: Rebuild.
7464         * mc-boot/GStringConvert.c: Rebuild.
7465         * mc-boot/GSysStorage.c: Rebuild.
7466         * mc-boot/GTimeString.c: Rebuild.
7467         * mc-boot/Galists.c: Rebuild.
7468         * mc-boot/Gdecl.c: Rebuild.
7469         * mc-boot/Gkeyc.c: Rebuild.
7470         * mc-boot/Glists.c: Rebuild.
7471         * mc-boot/GmcComment.c: Rebuild.
7472         * mc-boot/GmcComp.c: Rebuild.
7473         * mc-boot/GmcDebug.c: Rebuild.
7474         * mc-boot/GmcError.c: Rebuild.
7475         * mc-boot/GmcFileName.c: Rebuild.
7476         * mc-boot/GmcLexBuf.c: Rebuild.
7477         * mc-boot/GmcMetaError.c: Rebuild.
7478         * mc-boot/GmcOptions.c: Rebuild.
7479         * mc-boot/GmcPreprocess.c: Rebuild.
7480         * mc-boot/GmcPretty.c: Rebuild.
7481         * mc-boot/GmcPrintf.c: Rebuild.
7482         * mc-boot/GmcQuiet.c: Rebuild.
7483         * mc-boot/GmcReserved.c: Rebuild.
7484         * mc-boot/GmcSearch.c: Rebuild.
7485         * mc-boot/GmcStack.c: Rebuild.
7486         * mc-boot/GmcStream.c: Rebuild.
7487         * mc-boot/Gmcp1.c: Rebuild.
7488         * mc-boot/Gmcp2.c: Rebuild.
7489         * mc-boot/Gmcp3.c: Rebuild.
7490         * mc-boot/Gmcp4.c: Rebuild.
7491         * mc-boot/Gmcp5.c: Rebuild.
7492         * mc-boot/GnameKey.c: Rebuild.
7493         * mc-boot/GsymbolKey.c: Rebuild.
7494         * mc-boot/Gtop.c: Rebuild.
7495         * mc-boot/Gvarargs.c: Rebuild.
7496         * mc-boot/Gwlists.c: Rebuild.
7497         * mc-boot/GRTentity.h: New file.
7498         * mc/decl.mod (scaffoldStatic): Change _finish to _fini.
7499         * mc/mc.flex (_M2_mcflex_fini): New function.
7500         (_M2_mcflex_finish): Remove function.
7501         * tools-src/mklink.c (GenerateFinishCalls): Change
7502         _finish to _fini.
7503         (GeneratePrototypes): Change _finish to _fini.
7505 2023-01-31  Gaius Mulley  <gaiusmod2@gmail.com>
7507         * Make-lang.in (gm2-libs.texi-check): Rename
7508         m2/gm2-libs-pim to m2/gm2-libs-log.
7509         * gm2-libs-pim/BitBlockOps.def: Moved to...
7510         * gm2-libs-log/BitBlockOps.def: ...here.
7511         * gm2-libs-pim/BitBlockOps.mod: Moved to...
7512         * gm2-libs-log/BitBlockOps.mod: ...here.
7513         * gm2-libs-pim/BitByteOps.def: Moved to...
7514         * gm2-libs-log/BitByteOps.def: ...here.
7515         * gm2-libs-pim/BitByteOps.mod: Moved to...
7516         * gm2-libs-log/BitByteOps.mod: ...here.
7517         * gm2-libs-pim/BitWordOps.def: Moved to...
7518         * gm2-libs-log/BitWordOps.def: ...here.
7519         * gm2-libs-pim/BitWordOps.mod: Moved to...
7520         * gm2-libs-log/BitWordOps.mod: ...here.
7521         * gm2-libs-pim/BlockOps.def: Moved to...
7522         * gm2-libs-log/BlockOps.def: ...here.
7523         * gm2-libs-pim/BlockOps.mod: Moved to...
7524         * gm2-libs-log/BlockOps.mod: ...here.
7525         * gm2-libs-pim/Break.c: Moved to...
7526         * gm2-libs-log/Break.c: ...here.
7527         * gm2-libs-pim/Break.def: Moved to...
7528         * gm2-libs-log/Break.def: ...here.
7529         * gm2-libs-pim/CardinalIO.def: Moved to...
7530         * gm2-libs-log/CardinalIO.def: ...here.
7531         * gm2-libs-pim/CardinalIO.mod: Moved to...
7532         * gm2-libs-log/CardinalIO.mod: ...here.
7533         * gm2-libs-pim/Conversions.def: Moved to...
7534         * gm2-libs-log/Conversions.def: ...here.
7535         * gm2-libs-pim/Conversions.mod: Moved to...
7536         * gm2-libs-log/Conversions.mod: ...here.
7537         * gm2-libs-pim/DebugPMD.def: Moved to...
7538         * gm2-libs-log/DebugPMD.def: ...here.
7539         * gm2-libs-pim/DebugPMD.mod: Moved to...
7540         * gm2-libs-log/DebugPMD.mod: ...here.
7541         * gm2-libs-pim/DebugTrace.def: Moved to...
7542         * gm2-libs-log/DebugTrace.def: ...here.
7543         * gm2-libs-pim/DebugTrace.mod: Moved to...
7544         * gm2-libs-log/DebugTrace.mod: ...here.
7545         * gm2-libs-pim/Delay.def: Moved to...
7546         * gm2-libs-log/Delay.def: ...here.
7547         * gm2-libs-pim/Delay.mod: Moved to...
7548         * gm2-libs-log/Delay.mod: ...here.
7549         * gm2-libs-pim/Display.def: Moved to...
7550         * gm2-libs-log/Display.def: ...here.
7551         * gm2-libs-pim/Display.mod: Moved to...
7552         * gm2-libs-log/Display.mod: ...here.
7553         * gm2-libs-pim/ErrorCode.def: Moved to...
7554         * gm2-libs-log/ErrorCode.def: ...here.
7555         * gm2-libs-pim/ErrorCode.mod: Moved to...
7556         * gm2-libs-log/ErrorCode.mod: ...here.
7557         * gm2-libs-pim/FileSystem.def: Moved to...
7558         * gm2-libs-log/FileSystem.def: ...here.
7559         * gm2-libs-pim/FileSystem.mod: Moved to...
7560         * gm2-libs-log/FileSystem.mod: ...here.
7561         * gm2-libs-pim/FloatingUtilities.def: Moved to...
7562         * gm2-libs-log/FloatingUtilities.def: ...here.
7563         * gm2-libs-pim/FloatingUtilities.mod: Moved to...
7564         * gm2-libs-log/FloatingUtilities.mod: ...here.
7565         * gm2-libs-pim/InOut.def: Moved to...
7566         * gm2-libs-log/InOut.def: ...here.
7567         * gm2-libs-pim/InOut.mod: Moved to...
7568         * gm2-libs-log/InOut.mod: ...here.
7569         * gm2-libs-pim/Keyboard.def: Moved to...
7570         * gm2-libs-log/Keyboard.def: ...here.
7571         * gm2-libs-pim/Keyboard.mod: Moved to...
7572         * gm2-libs-log/Keyboard.mod: ...here.
7573         * gm2-libs-pim/LongIO.def: Moved to...
7574         * gm2-libs-log/LongIO.def: ...here.
7575         * gm2-libs-pim/LongIO.mod: Moved to...
7576         * gm2-libs-log/LongIO.mod: ...here.
7577         * gm2-libs-pim/NumberConversion.def: Moved to...
7578         * gm2-libs-log/NumberConversion.def: ...here.
7579         * gm2-libs-pim/NumberConversion.mod: Moved to...
7580         * gm2-libs-log/NumberConversion.mod: ...here.
7581         * gm2-libs-pim/README.texi: Moved to...
7582         * gm2-libs-log/README.texi: ...here.
7583         * gm2-libs-pim/Random.def: Moved to...
7584         * gm2-libs-log/Random.def: ...here.
7585         * gm2-libs-pim/Random.mod: Moved to...
7586         * gm2-libs-log/Random.mod: ...here.
7587         * gm2-libs-pim/RealConversions.def: Moved to...
7588         * gm2-libs-log/RealConversions.def: ...here.
7589         * gm2-libs-pim/RealConversions.mod: Moved to...
7590         * gm2-libs-log/RealConversions.mod: ...here.
7591         * gm2-libs-pim/RealInOut.def: Moved to...
7592         * gm2-libs-log/RealInOut.def: ...here.
7593         * gm2-libs-pim/RealInOut.mod: Moved to...
7594         * gm2-libs-log/RealInOut.mod: ...here.
7595         * gm2-libs-pim/Strings.def: Moved to...
7596         * gm2-libs-log/Strings.def: ...here.
7597         * gm2-libs-pim/Strings.mod: Moved to...
7598         * gm2-libs-log/Strings.mod: ...here.
7599         * gm2-libs-pim/Termbase.def: Moved to...
7600         * gm2-libs-log/Termbase.def: ...here.
7601         * gm2-libs-pim/Termbase.mod: Moved to...
7602         * gm2-libs-log/Termbase.mod: ...here.
7603         * gm2-libs-pim/Terminal.def: Moved to...
7604         * gm2-libs-log/Terminal.def: ...here.
7605         * gm2-libs-pim/Terminal.mod: Moved to...
7606         * gm2-libs-log/Terminal.mod: ...here.
7607         * gm2-libs-pim/TimeDate.def: Moved to...
7608         * gm2-libs-log/TimeDate.def: ...here.
7609         * gm2-libs-pim/TimeDate.mod: Moved to...
7610         * gm2-libs-log/TimeDate.mod: ...here.
7612 2023-01-28  Iain Sandoe  <iain@sandoe.co.uk>
7614         * lang.opt: Claim Wreturn-type.
7616 2023-01-27  Gaius Mulley  <gaiusmod2@gmail.com>
7618         * gm2-compiler/M2Comp.mod:  Import MetaString0.
7619         (ExamineCompilationUnit): New variable Message.
7620         Create and format error string.
7621         * gm2-compiler/M2LexBuf.mod: New variable SeenEof.
7622         (GetNonEofToken): New procedure.
7623         (Init): Set SeenEof to FALSE.
7624         (GetToken): Use GetNonEofToken instead of calls to
7625         m2flex.GetToken and GetToken.
7626         (AddTok): Detect eoftok and set SeenEof.
7628 2023-01-27  Gaius Mulley  <gaiusmod2@gmail.com>
7630         * gm2-compiler/M2Options.def: Export GetMQ, SetMQ.
7631         * gm2-compiler/M2Preprocess.mod: (MakeSaveTempsFileName):
7632         Test NewDir against NIL.  Test Dumpdir against NIL.
7633         Test GetMD () against NIL.  Test GetMMD () against NIL.
7634         Test GetMQ () against NIL.  Test GetObj () against NIL.
7635         Test tempfile against NIL.
7636         * gm2-compiler/P2SymBuild.def: Export
7637         BuildNoReturnAttribute.
7639 2023-01-27  Iain Sandoe  <iain@sandoe.co.uk>
7641         PR modula2/108555
7642         PR modula2/108182
7643         PR modula2/102343
7644         * gm2-lang.cc (gm2_langhook_option_lang_mask): Do not claim CL_C
7645         or CL_DRIVER.
7646         (gm2_langhook_init_options): Handle options that we want to pass
7647         to the preprocessor.
7648         * lang-specs.h: Pass -B and -save-temps to regular compile lines.
7649         * lang.opt: Add C and Driver options that Modula-2 intercepts for
7650         internal use. Reorder options into two sections and to collate.
7652 2023-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
7654         * gm2-compiler/M2GCCDeclare.mod: Import IsProcedureNoReturn.
7655         (DeclareProcedureToGccWholeProgram): New variable declared and set
7656         returnType.  Pass returnType to BuildEndFunctionDeclaration.
7657         Extra parameter IsProcedureNoReturn passed to
7658         BuildEndFunctionDeclaration.
7659         * gm2-compiler/M2Quads.mod (BuildM2MainFunction): Correct
7660         scaffold comment and add extra return 0.
7661         * gm2-compiler/P2Build.bnf: Import BuildNoReturnAttribute.
7662         (ProcedureHeading): Process EndBuildFormalParameters before
7663         parsing AttributeNoReturn.
7664         (DefProcedureHeading): Process EndBuildFormalParameters before
7665         parsing AttributeNoReturn.
7666         (AttributeNoReturn): Call BuildNoReturnAttribute.
7667         * gm2-compiler/P2SymBuild.def (BuildNoReturnAttribute): New
7668         procedure.
7669         * gm2-compiler/P2SymBuild.mod (BuildNoReturnAttribute): New
7670         procedure.
7671         * gm2-compiler/SymbolTable.def (PutProcedureInline): Corrected
7672         comment.
7673         (PutProcedureNoReturn): New procedure.
7674         (IsProcedureNoReturn): New procedure function.
7675         * gm2-compiler/SymbolTable.mod (SymProcedure): IsNoReturn
7676         new field.
7677         (MakeProcedure): Initialize IsNoReturn to FALSE.
7678         (PutProcedureNoReturn): New procedure.
7679         (IsProcedureNoReturn): New procedure function.
7680         * gm2-gcc/m2decl.cc (m2decl_BuildEndFunctionDeclaration):
7681         Add extra parameter isnoreturn.  Set TREE_THIS_VOLATILE
7682         to isnoreturn.
7683         * gm2-gcc/m2decl.def (BuildEndFunctionDeclaration): Add
7684         extra parameter isnoreturn.
7685         * gm2-gcc/m2decl.h (m2decl_BuildEndFunctionDeclaration): Add
7686         extra parameter isnoreturn.
7687         * gm2-gcc/m2except.cc (m2except_InitExceptions): Change all
7688         function decl to pass an extra parameter isnoreturn.
7690 2023-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
7692         * m2.flex (splitSlashStar): Fix comment so that /* does not
7693         appear inside the comment.
7695 2023-01-26  Iain Sandoe  <iain@sandoe.co.uk>
7697         PR modula2/108553
7698         * gm2-lang.cc (gm2_langhook_init_options): Remove debug code.
7700 2023-01-26  Gaius Mulley  <gaiusmod2@gmail.com>
7702         * Make-lang.in (m2/gm2config.h): Rewrite rule to be
7703         dependent upon m2/gm2config.aci.
7704         (m2/gm2config.aci): Newrule.
7705         * configure.ac (AC_CONFIG_HEADERS): Change destination
7706         to gm2config.aci.
7707         * configure: Regenerate.
7708         * gm2-libs/config-host: Regenerate.
7709         * gm2-compiler/M2GCCDeclare.mod (AddSymToWatch): Comment
7710         out.
7711         * gm2-compiler/M2Quads.mod (BuildConstHighFromSym): Remove
7712         Dim.
7713         (StartBuildWith): Call BuildStmtNoteTok.
7714         (BuildStmtNoteTok): New procedure.
7715         (BuildStmtNote): Re-implement re-factor into two
7716         procedures and call BuildStmtNoteTok.
7717         * gm2config.h.in: Remove.
7718         * gm2config.aci.in: New file.
7720 2023-01-25  Iain Sandoe  <iain@sandoe.co.uk>
7722         PR modula2/102343
7723         PR modula2/108182
7724         * gm2-compiler/M2Comp.mod: Early exit for pre-processor-only jobs.
7725         * gm2-compiler/M2Options.def (SetPPOnly, GetPPOnly, SetMD, GetMD,
7726         SetMMD, GetMMD, SetMQ, GetMQ, SetObj, GetObj, SetDumpDir,
7727         GetDumpDir):New.
7728         * gm2-compiler/M2Options.mod:(SetPPOnly, GetPPOnly, SetMD, GetMD,
7729         SetMMD, GetMMD, SetMQ, GetMQ, SetObj, GetObj, SetDumpDir,
7730         GetDumpDir):New.
7731         * gm2-compiler/M2Preprocess.def (PreprocessModule): Add flag to
7732         indicate the main file.
7733         * gm2-compiler/M2Preprocess.mod: Handle Preprocess-only jobs,
7734         handle MD, MMD and MQ options.
7735         * gm2-gcc/m2options.h (M2Options_SetPPOnly, M2Options_GetPPOnly,
7736         M2Options_SetDumpDir, M2Options_SetMD, M2Options_GetMD,
7737         M2Options_SetMMD, M2Options_GetMMD, M2Options_SetMQ, M2Options_GetMQ,
7738         M2Options_SetObj, M2Options_GetObj): New.
7739         * gm2-gcc/m2type.cc (m2type_InitBaseTypes): Early exit for pre-
7740         processor-only jobs.
7741         * gm2-lang.cc (gm2_langhook_init): Handle preprocess-only commands.
7742         (gm2_langhook_option_lang_mask): Claim C and Driver options so that
7743         we can intercept them for building pre-processor commands.
7744         (gm2_langhook_init_options): Collect the preprocessor line here.
7745         Save options that have different actions for preprocessor and compile
7746         commands.
7747         (gm2_langhook_handle_option): Only handle the modula-2 options here.
7748         (gm2_langhook_post_options): Do not create a back-end for pre-
7749         processor-only jobs.
7750         * gm2spec.cc (lang_specific_driver): Ignore PCH options, append a
7751         scaffold-main for cases where we are building a main module with
7752         -c.
7753         * lang-specs.h: Revise to handle preprocessor-only jobs and to
7754         consume pre-processed files.
7755         * lang.opt: Remove Driver and C options copies (we claim these
7756         separately).
7758 2023-01-24  Co-Authored by: Iain Sandoe  <iain@sandoe.co.uk>
7760         * Make-lang.in (GM2-COMP-BOOT-DEFS): Add
7761         DynamicStringPath.def.
7762         (GM2-COMP-BOOT-MODS): Add DynamicStringPath.mod.
7763         (GM2-COMP-DEFS): Add DynamicStringPath.def.
7764         (GM2-COMP-MODS): Add DynamicStringPath.mod.
7765         ($(objdir)/m2/gm2-libs-min/SYSTEM.def): Split path into
7766         multiple -I components.
7767         ($(objdir)/m2/gm2-libs/SYSTEM.def): Ditto.
7768         ($(objdir)/m2/gm2-libs-coroutines/SYSTEM.def): Ditto.
7769         * gm2-compiler/M2Options.mod: Import DynamicStringPath.
7770         (SetSearchPath): Reimplement using DynamicStringPath
7771         procedures.
7772         * gm2-compiler/M2Search.def (InitSearchPath): Remove.
7773         (PrependSearchPath): Remove.
7774         * gm2-compiler/M2Search.mod (SFIO): Remove import.
7775         (DynamicStringPath): Add import.
7776         (Directory): Remove.
7777         (UserPath): Remove.
7778         (InitialPath): Remove.
7779         (InitSearchPath): Remove.
7780         (PrependSearchPath): Remove.
7781         (FindSourceFile): Re-implement.
7782         (FindSourceDefFile): Re-implement.
7783         (FindSourceModFile): Re-implement.
7784         * gm2-gcc/init.cc (_M2_DynamicStringPath_init):
7785         New prototype.
7786         (init_FrontEndInit): Call _M2_DynamicStringPath_init.
7787         * tools-src/makeSystem: Allow multiple -I paths.
7788         * gm2-compiler/DynamicStringPath.def: New file.
7789         * gm2-compiler/DynamicStringPath.mod: New file.
7790         * gm2-gcc/m2options.h (M2Options_SetMakeIncludePath): Add
7791         prototype.
7793 2023-01-24  Gaius Mulley  <gaiusmod2@gmail.com>
7795         * m2.flex (cpreprocessor): Add temporary variable
7796         which is initialized to 0.
7797         (commentCLevel): New variable.
7798         (endOfCComment): New function.
7799         (splitSlashStar): New function to split /* into / and *
7800         tokens.
7801         (COMMENTC): New flex state.
7802         ("/*"): New rule to test whether we should treat /*
7803         as a single token or as two tokens.
7804         (<COMMENTC>.): New rule to skip a character.
7805         (<COMMENTC>\n.*): New rule to consume the line.
7806         (<COMMENTC>"*/"): New rule to call endOfCComment.
7808 2023-01-24  Gaius Mulley  <gaiusmod2@gmail.com>
7810         * gm2-libs-iso/RTco.def: Import RTentity.
7811         Declare RTco as a definition for C module.
7813 2023-01-23  Iain Sandoe  <iain@sandoe.co.uk>
7815         PR modula2/108182
7816         PR modula2/108480
7817         * Make-lang.in: Pass libsubdir to the language init
7818         build.
7819         * gm2-lang.cc (INCLUDE_VECTOR): Define.
7820         (add_one_import_path): New.
7821         (add_m2_import_paths): New.
7822         (gm2_langhook_post_options): Arrange to add the include
7823         paths (and add the system ones) in the same order as C
7824         uses.
7825         * gm2spec.cc (build_archive_path): Remove.
7826         (add_default_combination): Remove.
7827         (add_default_archives): Remove.
7828         (add_default_libs): We no longer need a '-L' option, just
7829         emit the -l and each library in use.
7830         (build_include_path): Remove.
7831         (add_include): Remove.
7832         (add_default_includes): Remove.
7833         (library_installed): Remove.
7834         (check_valid_library): Remove.
7835         (check_valid_list): Remove.
7836         (convert_abbreviation): Diagnose unhandled cases.
7837         (lang_specific_driver): Skip options where we will add back
7838         a validated version.
7839         * lang-specs.h (M2CPP): Reformat, append %I when -fcpp is not
7840         in use.  Revise the cc1gm2 spec to omit mentioning options that
7841         are handled in the c pre-processor line.
7842         * lang.opt: Allow preprocessing and path options as input to the
7843         cc1gm2 invocation, so that they can be passed to the preprocessor
7844         invocation.
7846 2023-01-23  Iain Sandoe  <iain@sandoe.co.uk>
7848         PR modula2/108405
7849         * gm2-libs-iso/Preemptive.mod (initPreemptive): Use a value for
7850         extra space that is divisible by common OS pagesizes.
7852 2023-01-20  Gaius Mulley  <gaiusmod2@gmail.com>
7854         * gm2-libs/Args.mod (GetArg): Check index before
7855         accessing array.
7856         * gm2-libs/M2Dependent.mod (toCString): Check index
7857         before accessing array.
7858         * mc-boot/GArgs.c: Rebuilt.
7859         * mc-boot/GM2Dependent.c: Rebuilt.
7860         * mc-boot/Gkeyc.c: Rebuilt.
7861         * mc/keyc.mod (seenUIntMin): Initialize once.
7862         (seenUIntMax): Initialize once.
7863         (checkLimits): Only test seenUIntMin and seenUIntMax
7864         once.
7865         * pge-boot/GArgs.c:  Rebuilt.
7866         * pge-boot/GM2Dependent.c: Rebuilt.
7868 2023-01-20  Gaius Mulley  <gaiusmod2@gmail.com>
7870         * gm2-gcc/m2statement.cc (gm2_gimplify_function_node):
7871         Remove.
7872         * gm2-libs/DynamicStrings.mod (Equal): Remove dead code.
7873         * m2.flex (<COMMENT>"<*"): Add {} for else statement.
7874         * m2pp.cc (hextree): Add conditional #ifdef DEBUGGING.
7875         * mc-boot/GDynamicStrings.c: Rebuild.
7876         * pge-boot/GDynamicStrings.c: Rebuild.
7877         * pge-boot/GFIO.c: Rebuild.
7878         * pge-boot/GIndexing.c: Rebuild.
7879         * pge-boot/GM2EXCEPTION.c: Rebuild.
7880         * pge-boot/GM2RTS.c: Rebuild.
7881         * pge-boot/GNameKey.c: Rebuild.
7882         * pge-boot/GPushBackInput.c: Rebuild.
7883         * pge-boot/GRTExceptions.c: Rebuild.
7884         * pge-boot/GStdIO.c: Rebuild.
7885         * pge-boot/GSymbolKey.c: Rebuild.
7886         * pge-boot/GSysStorage.c: Rebuild.
7888 2023-01-17  Gaius Mulley  <gaiusmod2@gmail.com>
7890         * mc-boot/GM2RTS.c: Rebuilt.
7891         * mc-boot/GM2RTS.h: Rebuilt.
7892         * mc-boot/Gdecl.c: Rebuilt.
7893         * mc-boot/GmcOptions.c: Rebuilt.
7894         * mc/mcOptions.mod (displayVersion):
7895         Split first printf into three components
7897 2023-01-17  Gaius Mulley  <gaiusmod2@gmail.com>
7899         * gm2-libs-iso/M2RTS.def (Halt): Parameter file renamed to filename.
7900         (HaltC): New procedure declaration.
7901         (ErrorMessage): Parameter file renamed to filename.
7902         * gm2-libs-iso/M2RTS.mod (Halt): Parameter file renamed to
7903         filename.
7904         (HaltC): New procedure implementation.
7905         (ErrorStringC): New procedure implementation.
7906         (ErrorMessageC): New procedure implementation.
7907         * gm2-libs/M2RTS.def (Halt): Parameter file renamed to filename.
7908         (HaltC): New procedure declaration.
7909         (ErrorMessage): Parameter file renamed to filename.
7910         * gm2-libs/M2RTS.mod (Halt): Parameter file renamed to filename.
7911         (HaltC): New procedure implementation.
7912         (ErrorStringC): New procedure implementation.
7913         (ErrorMessageC): New procedure implementation.
7915 2023-01-16  Gaius Mulley  <gaiusmod2@gmail.com>
7917         * mc-boot-ch/Glibc.c (libc_time): New function.
7918         (libc_localtime): New function.
7919         * mc-boot/GDynamicStrings.c: Regenerate.
7920         * mc-boot/GFIO.c: Regenerate.
7921         * mc-boot/GFormatStrings.c: Regenerate.
7922         * mc-boot/GIndexing.c: Regenerate.
7923         * mc-boot/GM2Dependent.c: Regenerate.
7924         * mc-boot/GM2EXCEPTION.c: Regenerate.
7925         * mc-boot/GPushBackInput.c: Regenerate.
7926         * mc-boot/GRTExceptions.c: Regenerate.
7927         * mc-boot/GRTint.c: Regenerate.
7928         * mc-boot/GStdIO.c: Regenerate.
7929         * mc-boot/GStringConvert.c: Regenerate.
7930         * mc-boot/GSysStorage.c: Regenerate.
7931         * mc-boot/Gdecl.c: Regenerate.
7932         * mc-boot/GmcComment.c: Regenerate.
7933         * mc-boot/GmcComp.c: Regenerate.
7934         * mc-boot/GmcDebug.c: Regenerate.
7935         * mc-boot/GmcMetaError.c: Regenerate.
7936         * mc-boot/GmcOptions.c: Regenerate.
7937         * mc-boot/GmcStack.c: Regenerate.
7938         * mc-boot/GnameKey.c: Regenerate.
7939         * mc-boot/GsymbolKey.c: Regenerate.
7940         * mc-boot/Gkeyc.c: Regenerate.
7941         * mc/decl.mod (putFieldRecord): Change NulName to NulKey
7942         and fix type comparision.
7943         * mc/mcOptions.mod (YEAR): Remove.
7944         (getYear): New procedure function.
7945         (displayVersion): Use result from getYear instead of YEAR.
7946         Emit boilerplate for GPL v3.
7947         (gplBody): Use result from getYear instead of YEAR.
7948         (glplBody): Use result from getYear instead of YEAR.
7950 2023-01-16  Gaius Mulley  <gaiusmod2@gmail.com>
7952         * gm2-compiler/M2Quads.mod (AssignUnboundedVar): Check Type
7953         against NulSym and call MetaErrorT1 if necessary.
7954         (AssignUnboundedNonVar): Check Type against NulSym and
7955         call MetaErrorT1 if necessary.
7956         (BuildDesignatorPointer): Check Type1 against NulSym and
7957         call MetaErrorT1 if necessary.
7959 2023-01-16  Gaius Mulley  <gaiusmod2@gmail.com>
7961         * mc/mcOptions.mod (displayVersion): Change GPLv2 to GPLv3.
7962         (YEAR) set to 2023.
7964 2023-01-15  Gaius Mulley  <gaiusmod2@gmail.com>
7966         * gm2-compiler/M2LexBuf.mod (isSrcToken): Add block comment.
7967         Remove dead code.
7968         * gm2-compiler/M2Quads.def (BuildNot): Add notTokPos parameter.
7969         * gm2-compiler/M2Quads.mod (BuildNot): Add notTokPos parameter.
7970         Create and push virtual token.
7971         (PopBooltok): New procedure.
7972         (PushBooltok): New procedure.
7973         (PushBool): Re-implement using PushBooltok.
7974         (PopBool): Re-implement using PopBooltok.
7975         * gm2-compiler/P3Build.bnf (ConstFactor): Record token
7976         position of NOT.
7977         (Factor): Record token position of NOT.
7978         * gm2-compiler/PHBuild.bnf (ConstFactor): Record token
7979         position of NOT.
7980         (Relation): Push token position.
7981         (UnaryOrConstTerm): Push token position.
7982         (AddOperator): Push token position.
7983         (MulOperator): Push token position.
7985 2023-01-13  Iain Sandoe  <iain@sandoe.co.uk>
7987         * gm2-gcc/m2options.h (M2Options_SetVerbose): Export the
7988         function.
7989         * gm2-lang.cc: Handle OPT_v, passing it to the compiler.
7990         * lang-specs.h: Pass -v to cc1gm2.
7992 2023-01-13  Gaius Mulley  <gaiusmod2@gmail.com>
7994         * mc-boot-ch/GRTco.c (RTco_select): Add return 0.
7995         * pge-boot/GRTco.c (RTco_select): Add return 0.
7997 2023-01-10  Gaius Mulley  <gaiusmod2@gmail.com>
7999         * Make-lang.in (m2/mc-boot/$(SRC_PREFIX)%.o): Add
8000         m2/gm2-libs/gm2-libs-host.h dependency.
8001         (m2/mc-boot-ch/$(SRC_PREFIX)%.o): Add
8002         m2/gm2-libs/gm2-libs-host.h dependency.
8004 2023-01-10  Gaius Mulley  <gaiusmod2@gmail.com>
8006         * Make-lang.in (GM2_1): Change -B path to m2/stage1.
8007         ($(objdir)/m2/images/gnu.eps): Check and create dest dir
8008         if necessary.
8009         (gm2-libs.texi-check): Check and create dir m2/gm2-libs-pim,
8010         m2/gm2-libs-iso and m2/gm2-libs if necessary.
8011         ($(objdir)/m2/gm2-compiler-boot): Remove.
8012         ($(objdir)/m2/gm2-libs-boot): Remove.
8013         ($(objdir)/m2/gm2-libs-libiberty): Remove.
8014         ($(objdir)/m2/gm2-libiberty): Remove.
8015         ($(objdir)/m2/gm2-gcc): Remove.
8016         ($(objdir)/m2/gm2-compiler): Remove.
8017         ($(objdir)/m2/gm2-libs): Remove.
8018         ($(objdir)/m2/gm2-libs-iso): Remove.
8019         ($(objdir)/m2/gm2-libs-min): Remove.
8020         ($(objdir)/m2/gm2-compiler-paranoid): Remove.
8021         ($(objdir)/m2/gm2-libs-paranoid): Remove.
8022         ($(objdir)/m2/gm2-compiler-verify): Remove.
8023         ($(objdir)/m2/boot-bin): Remove.
8024         ($(objdir)/m2/gm2-libs-pim): Remove.
8025         ($(objdir)/m2/gm2-libs-coroutines): Remove.
8026         (stage1/m2): Remove.
8027         (stage2/m2): Remove.
8028         (stage3/m2): Remove.
8029         (m2.stageprofile): New rule.
8030         (m2.stagefeedback): New rule.
8031         (cc1gm2$(exeext)): Change dependent name.
8032         (m2/stage2/cc1gm2$(exeext)): Change dependent name.
8033         Check and create dest dir.
8034         (m2/stage1/cc1gm2$(exeext)): Check and create dest dir
8035         if necessary.
8036         (m2/gm2-gcc/%.o): Ditto.
8037         (m2/gm2-gcc/rtegraph.o): Ditto.
8038         (m2/gm2-gcc/$(SRC_PREFIX)%.h): Ditto.
8039         (m2/gm2-gcc/$(SRC_PREFIX)%.h): Ditto.
8040         (m2/mc-boot): Ditto.
8041         (m2/mc-boot-ch): Ditto.
8042         (m2/gm2-libs-boot): Ditto.
8043         (m2/gm2-compiler-boot): Ditto.
8044         (m2/gm2-compiler): Ditto.
8045         (m2/gm2-libiberty): Ditto.
8046         (m2/gm2-compiler): Ditto.
8047         (m2/gm2-libs-iso): Ditto.
8048         (m2/gm2-libs): Ditto.
8049         (m2/gm2-libs-min): Ditto.
8050         (m2/gm2-libs-coroutines): Ditto.
8051         (m2/boot-bin): Ditto.
8052         (m2/pge-boot): Ditto.
8053         (m2/pge-boot): Ditto.
8054         * Make-maintainer.in (m2/gm2-ppg-boot): Check and create
8055         dest dir if necessary.
8056         (m2): Ditto.
8057         (m2/gm2-ppg-boot): Ditto.
8058         (m2/gm2-pg-boot): Ditto.
8059         (m2/gm2-auto): Ditto.
8060         (m2/gm2-pg-boot): Ditto.
8061         (m2/gm2-pge-boot): Ditto.
8062         ($(objdir)/plugin): Ditto.
8063         ($(objdir)/m2/mc-boot-ch): Ditto.
8064         ($(objdir)/m2/mc-boot-gen): Ditto.
8065         (m2/boot-bin): Ditto.
8066         (m2/mc): Ditto.
8067         (m2/mc-obj): Ditto.
8068         ($(objdir)/m2/gm2-ppg-boot): Ditto.
8069         ($(objdir)/m2/gm2-pg-boot): Ditto.
8070         ($(objdir)/m2/gm2-pge-boot): Ditto.
8071         (m2/mc-boot-gen): Ditto.
8072         (m2/m2obj3): Ditto.
8073         (m2/gm2-libs-paranoid): Ditto.
8074         (m2/gm2-compiler-paranoid): Ditto.
8075         (m2/gm2-libs-paranoid): Ditto.
8076         (m2/gm2-compiler-paranoid): Ditto.
8077         (m2/gm2-libs-paranoid): Ditto.
8078         (m2/gm2-compiler-paranoid): Ditto.
8079         * config-lang.in (m2/gm2-compiler-boot): Remove mkdir.
8080         (m2/gm2-libs-boot): Ditto.
8081         (m2/gm2-ici-boot): Ditto.
8082         (m2/gm2-libiberty): Ditto.
8083         (m2/gm2-gcc): Ditto.
8084         (m2/gm2-compiler): Ditto.
8085         (m2/gm2-libs): Ditto.
8086         (m2/gm2-libs-iso): Ditto.
8087         (m2/gm2-compiler-paranoid): Ditto.
8088         (m2/gm2-libs-paranoid): Ditto.
8089         (m2/gm2-compiler-verify): Ditto.
8090         (m2/boot-bin): Ditto.
8091         (m2/gm2-libs-pim): Ditto.
8092         (m2/gm2-libs-coroutines): Ditto.
8093         (m2/gm2-libs-min): Ditto.
8094         (m2/pge-boot): Ditto.
8095         (plugin): Ditto.
8096         (stage1/m2): Ditto.
8097         (stage2/m2): Ditto.
8098         (stage3/m2): Ditto.
8099         (stage4/m2): Ditto.
8100         (m2/gm2-auto): Ditto.
8101         (m2/gm2-pg-boot): Ditto.
8102         (m2/gm2-pge-boot): Ditto.
8103         (m2/gm2-ppg-boot): Ditto.
8104         (m2/mc-boot): Ditto.
8105         (m2/mc-boot-ch): Ditto.
8106         (m2/mc-boot-gen): Ditto.
8108 2023-01-09  Gaius Mulley  <gaiusmod2@gmail.com>
8110         * Make-lang.in (m2/pge-boot/%.o): Add m2/gm2config.h.
8111         * gm2-libs/config-host: Regenerate.
8113 2023-01-07  Iain Sandoe  <iain@sandoe.co.uk>
8115         * gm2-libs-min/libc.c (abort): Update declaration to match the
8116         expected form, add no-return attribute.
8117         (exit): Add no-return attribute.
8119 2023-01-05  Iain Sandoe  <iain@sandoe.co.uk>
8121         PR modula2/107631
8122         * gm2-gcc/m2builtins.cc: Remove scalb, scalbf, scalbl,
8123         significand, significandf, significandl.
8124         * gm2-libs/Builtins.def (significand): Likewise.
8125         * gm2-libs/Builtins.mod: Likewise.
8126         * target-independent/Builtins.texi: Likewise.
8127         * gm2-libs-iso/LowLong.mod: Implement fraction with scalbn*() and
8128         ilogb*().
8129         * gm2-libs-iso/LowReal.mod: Likewise.
8130         * gm2-libs-iso/LowShort.mod: Likewise.
8132 2023-01-05  Gaius Mulley  <gaiusmod2@gmail.com>
8134         * gm2-libs-min/M2RTS.def (ConstructModules): New procedure
8135         declaration.
8136         (DeconstructModules): New procedure declaration.
8137         * gm2-libs-min/M2RTS.mod (ConstructModules): New procedure
8138         dummy implementation.
8139         (DeconstructModules): New procedure dummy implementation.
8141 2023-01-05  Iain Sandoe  <iain@sandoe.co.uk>
8143         * gm2spec.cc (lang_specific_driver): Handle static-libgm2.
8144         * lang.opt: Add static-libgm2.
8146 2023-01-05  Iain Sandoe  <iain@sandoe.co.uk>
8148         * gm2spec.cc (lang_specific_driver): Pass -static-libstdc++ on to
8149         the target driver if the linker does not support Bstatic/dynamic.
8151 2023-01-04  Iain Sandoe  <iain@sandoe.co.uk>
8153         PR modula2/108183
8154         * gm2-libs-ch/UnixArgs.cc (_M2_UnixArgs_ctor): Rework to use
8155         an extern "C" function with 'constructor' attribute.
8156         * gm2-libs-ch/dtoa.cc (_M2_dtoa_ctor): Likewise.
8157         * gm2-libs-ch/ldtoa.cc (_M2_ldtoa_ctor): Likewise.
8159 2023-01-04  Iain Sandoe  <iain@sandoe.co.uk>
8161         PR modula2/108259
8162         * gm2-gcc/m2decl.cc (m2decl_DeclareModuleCtor): Make module
8163         registration constructors visible.
8165 2023-01-04  Iain Sandoe  <iain@sandoe.co.uk>
8167         * Make-lang.in (dvi, ps, pdf): Build in the gcc/doc directory, also
8168         use the configured tools for texi -> dvi and texi -> pdf.
8170 2023-01-01  Iain Sandoe  <iain@sandoe.co.uk>
8171             Gaius Mulley  <gaiusmod2@gmail.com>
8173         PR modula2/108183
8174         * gm2-compiler/M2GCCDeclare.mod: Module registration constructors are
8175         externs to the builder of m2_link.
8177 2022-12-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8178             Iain Sandoe  <iain@sandoe.co.uk>
8180         PR modula2/107612
8181         * Make-lang.in (soext): Use .dylib for Darwin.
8182         (PLUGINLDFLAGS): Use dynmic lookup, set the plugin name, and append
8183         -nodefaultlibs to suppress the linking of libstdc++.
8184         Use INCINTL in compile lines for the plugin.
8186 2022-12-21  Jakub Jelinek  <jakub@redhat.com>
8188         PR modula2/108153
8189         * gm2-gcc/m2linemap.def (location_t): Use CARDINAL instead of INTEGER.
8191 2022-12-19  Jakub Jelinek  <jakub@redhat.com>
8193         * gm2-gcc/m2linemap.cc (m2linemap_ErrorAt, m2linemap_ErrorAtf,
8194         m2linemap_WarningAtf, m2linemap_NoteAtf, m2linemap_internal_error):
8195         Call functions with "%s", message rather than just message, so that
8196         % chars in message aren't treated as format specifiers.
8198 2022-12-19  Jakub Jelinek  <jakub@redhat.com>
8200         PR modula2/108147
8201         * gm2-gcc/m2linemap.def (ErrorAtf, WarningAtf, NoteAtf):
8202         Comment out prototypes with varargs.
8203         * gm2-gcc/m2linemap.h (m2linemap_ErrorAtf, m2linemap_WarningAtf,
8204         m2linemap_NoteAtf): No longer varargs.
8205         * gm2-gcc/m2linemap.cc (m2linemap_ErrorAtf): Turned into a
8206         non-varargs wrapper around ...
8207         (m2linemap_ErrorAtf_1): ... this.  New static function.
8208         (m2linemap_WarningAtf): Turned into a non-varargs wrapper around ...
8209         (m2linemap_WarningAtf_1): ... this.  New static function.
8210         (m2linemap_NoteAtf): Turned into a non-varargs wrapper around ...
8211         (m2linemap_NoteAtf_1): ... this.  New static function.
8213 2022-12-15  Gaius Mulley  <gaiusmod2@gmail.com>
8215         * configure.ac: Stop probing for realpath.
8216         * tools-src/calcpath: Break dependency on realpath, cut
8217         and echo.
8218         * configure: Rebuilt.
8220 2022-12-15  Gaius Mulley  <gaiusmod2@gmail.com>
8222         * gm2config.h.in: Rebuilt.
8224 2022-12-14  Gaius Mulley  <gaiusmod2@gmail.com>
8226         * COPYING.FDL: New file.
8227         * COPYING.RUNTIME: New file.
8228         * COPYING3: New file.
8229         * COPYING3.LIB: New file.
8230         * Make-lang.in: New file.
8231         * Make-maintainer.in: New file.
8232         * NEWS: New file.
8233         * README: New file.
8234         * config-lang.in: New file.
8235         * config-make.in: New file.
8236         * configure.ac: New file.
8237         * gm2-compiler/CLexBuf.def: New file.
8238         * gm2-compiler/CLexBuf.mod: New file.
8239         * gm2-compiler/FifoQueue.def: New file.
8240         * gm2-compiler/FifoQueue.mod: New file.
8241         * gm2-compiler/Lists.def: New file.
8242         * gm2-compiler/Lists.mod: New file.
8243         * gm2-compiler/M2ALU.def: New file.
8244         * gm2-compiler/M2ALU.mod: New file.
8245         * gm2-compiler/M2AsmUtil.def: New file.
8246         * gm2-compiler/M2AsmUtil.mod: New file.
8247         * gm2-compiler/M2Base.def: New file.
8248         * gm2-compiler/M2Base.mod: New file.
8249         * gm2-compiler/M2BasicBlock.def: New file.
8250         * gm2-compiler/M2BasicBlock.mod: New file.
8251         * gm2-compiler/M2Batch.def: New file.
8252         * gm2-compiler/M2Batch.mod: New file.
8253         * gm2-compiler/M2Bitset.def: New file.
8254         * gm2-compiler/M2Bitset.mod: New file.
8255         * gm2-compiler/M2CaseList.def: New file.
8256         * gm2-compiler/M2CaseList.mod: New file.
8257         * gm2-compiler/M2Check.def: New file.
8258         * gm2-compiler/M2Check.mod: New file.
8259         * gm2-compiler/M2Code.def: New file.
8260         * gm2-compiler/M2Code.mod: New file.
8261         * gm2-compiler/M2ColorString.def: New file.
8262         * gm2-compiler/M2ColorString.mod: New file.
8263         * gm2-compiler/M2Comp.def: New file.
8264         * gm2-compiler/M2Comp.mod: New file.
8265         * gm2-compiler/M2Const.def: New file.
8266         * gm2-compiler/M2Const.mod: New file.
8267         * gm2-compiler/M2Debug.def: New file.
8268         * gm2-compiler/M2Debug.mod: New file.
8269         * gm2-compiler/M2DebugStack.def: New file.
8270         * gm2-compiler/M2DebugStack.mod: New file.
8271         * gm2-compiler/M2Defaults.def: New file.
8272         * gm2-compiler/M2Defaults.mod: New file.
8273         * gm2-compiler/M2DriverOptions.def: New file.
8274         * gm2-compiler/M2DriverOptions.mod: New file.
8275         * gm2-compiler/M2Emit.def: New file.
8276         * gm2-compiler/M2Emit.mod: New file.
8277         * gm2-compiler/M2Error.def: New file.
8278         * gm2-compiler/M2Error.mod: New file.
8279         * gm2-compiler/M2EvalSym.def: New file.
8280         * gm2-compiler/M2FileName.def: New file.
8281         * gm2-compiler/M2FileName.mod: New file.
8282         * gm2-compiler/M2GCCDeclare.def: New file.
8283         * gm2-compiler/M2GCCDeclare.mod: New file.
8284         * gm2-compiler/M2GenGCC.def: New file.
8285         * gm2-compiler/M2GenGCC.mod: New file.
8286         * gm2-compiler/M2Graph.def: New file.
8287         * gm2-compiler/M2Graph.mod: New file.
8288         * gm2-compiler/M2Lex.def: New file.
8289         * gm2-compiler/M2Lex.mod: New file.
8290         * gm2-compiler/M2LexBuf.def: New file.
8291         * gm2-compiler/M2LexBuf.mod: New file.
8292         * gm2-compiler/M2MetaError.def: New file.
8293         * gm2-compiler/M2MetaError.mod: New file.
8294         * gm2-compiler/M2Optimize.def: New file.
8295         * gm2-compiler/M2Optimize.mod: New file.
8296         * gm2-compiler/M2Options.def: New file.
8297         * gm2-compiler/M2Options.mod: New file.
8298         * gm2-compiler/M2Pass.def: New file.
8299         * gm2-compiler/M2Pass.mod: New file.
8300         * gm2-compiler/M2Preprocess.def: New file.
8301         * gm2-compiler/M2Preprocess.mod: New file.
8302         * gm2-compiler/M2Printf.def: New file.
8303         * gm2-compiler/M2Printf.mod: New file.
8304         * gm2-compiler/M2Quads.def: New file.
8305         * gm2-compiler/M2Quads.mod: New file.
8306         * gm2-compiler/M2Quiet.def: New file.
8307         * gm2-compiler/M2Quiet.mod: New file.
8308         * gm2-compiler/M2Range.def: New file.
8309         * gm2-compiler/M2Range.mod: New file.
8310         * gm2-compiler/M2Reserved.def: New file.
8311         * gm2-compiler/M2Reserved.mod: New file.
8312         * gm2-compiler/M2SSA.def: New file.
8313         * gm2-compiler/M2SSA.mod: New file.
8314         * gm2-compiler/M2Scaffold.def: New file.
8315         * gm2-compiler/M2Scaffold.mod: New file.
8316         * gm2-compiler/M2Scope.def: New file.
8317         * gm2-compiler/M2Scope.mod: New file.
8318         * gm2-compiler/M2Search.def: New file.
8319         * gm2-compiler/M2Search.mod: New file.
8320         * gm2-compiler/M2Size.def: New file.
8321         * gm2-compiler/M2Size.mod: New file.
8322         * gm2-compiler/M2StackAddress.def: New file.
8323         * gm2-compiler/M2StackAddress.mod: New file.
8324         * gm2-compiler/M2StackWord.def: New file.
8325         * gm2-compiler/M2StackWord.mod: New file.
8326         * gm2-compiler/M2Students.def: New file.
8327         * gm2-compiler/M2Students.mod: New file.
8328         * gm2-compiler/M2Swig.def: New file.
8329         * gm2-compiler/M2Swig.mod: New file.
8330         * gm2-compiler/M2System.def: New file.
8331         * gm2-compiler/M2System.mod: New file.
8332         * gm2-compiler/M2Version.def: New file.
8333         * gm2-compiler/NameKey.def: New file.
8334         * gm2-compiler/NameKey.mod: New file.
8335         * gm2-compiler/ObjectFiles.def: New file.
8336         * gm2-compiler/ObjectFiles.mod: New file.
8337         * gm2-compiler/Output.def: New file.
8338         * gm2-compiler/Output.mod: New file.
8339         * gm2-compiler/P0SymBuild.def: New file.
8340         * gm2-compiler/P0SymBuild.mod: New file.
8341         * gm2-compiler/P0SyntaxCheck.bnf: New file.
8342         * gm2-compiler/P0SyntaxCheck.def: New file.
8343         * gm2-compiler/P1Build.bnf: New file.
8344         * gm2-compiler/P1Build.def: New file.
8345         * gm2-compiler/P1SymBuild.def: New file.
8346         * gm2-compiler/P1SymBuild.mod: New file.
8347         * gm2-compiler/P2Build.bnf: New file.
8348         * gm2-compiler/P2Build.def: New file.
8349         * gm2-compiler/P2SymBuild.def: New file.
8350         * gm2-compiler/P2SymBuild.mod: New file.
8351         * gm2-compiler/P3Build.bnf: New file.
8352         * gm2-compiler/P3Build.def: New file.
8353         * gm2-compiler/P3SymBuild.def: New file.
8354         * gm2-compiler/P3SymBuild.mod: New file.
8355         * gm2-compiler/PCBuild.bnf: New file.
8356         * gm2-compiler/PCBuild.def: New file.
8357         * gm2-compiler/PCSymBuild.def: New file.
8358         * gm2-compiler/PCSymBuild.mod: New file.
8359         * gm2-compiler/PHBuild.bnf: New file.
8360         * gm2-compiler/PHBuild.def: New file.
8361         * gm2-compiler/README: New file.
8362         * gm2-compiler/Sets.def: New file.
8363         * gm2-compiler/Sets.mod: New file.
8364         * gm2-compiler/SymbolConversion.def: New file.
8365         * gm2-compiler/SymbolConversion.mod: New file.
8366         * gm2-compiler/SymbolKey.def: New file.
8367         * gm2-compiler/SymbolKey.mod: New file.
8368         * gm2-compiler/SymbolTable.def: New file.
8369         * gm2-compiler/SymbolTable.mod: New file.
8370         * gm2-compiler/bnflex.def: New file.
8371         * gm2-compiler/bnflex.mod: New file.
8372         * gm2-compiler/cflex.def: New file.
8373         * gm2-compiler/gm2.mod: New file.
8374         * gm2-compiler/gm2lcc.mod: New file.
8375         * gm2-compiler/gm2lgen.mod: New file.
8376         * gm2-compiler/gm2lorder.mod: New file.
8377         * gm2-compiler/m2flex.def: New file.
8378         * gm2-compiler/ppg.mod: New file.
8379         * gm2-gcc/README: New file.
8380         * gm2-gcc/dynamicstrings.h: New file.
8381         * gm2-gcc/gcc-consolidation.h: New file.
8382         * gm2-gcc/init.cc: New file.
8383         * gm2-gcc/init.def: New file.
8384         * gm2-gcc/init.h: New file.
8385         * gm2-gcc/m2assert.cc: New file.
8386         * gm2-gcc/m2assert.h: New file.
8387         * gm2-gcc/m2block.cc: New file.
8388         * gm2-gcc/m2block.def: New file.
8389         * gm2-gcc/m2block.h: New file.
8390         * gm2-gcc/m2builtins.cc: New file.
8391         * gm2-gcc/m2builtins.def: New file.
8392         * gm2-gcc/m2builtins.h: New file.
8393         * gm2-gcc/m2color.cc: New file.
8394         * gm2-gcc/m2color.def: New file.
8395         * gm2-gcc/m2color.h: New file.
8396         * gm2-gcc/m2configure.cc: New file.
8397         * gm2-gcc/m2configure.def: New file.
8398         * gm2-gcc/m2configure.h: New file.
8399         * gm2-gcc/m2convert.cc: New file.
8400         * gm2-gcc/m2convert.def: New file.
8401         * gm2-gcc/m2convert.h: New file.
8402         * gm2-gcc/m2decl.cc: New file.
8403         * gm2-gcc/m2decl.def: New file.
8404         * gm2-gcc/m2decl.h: New file.
8405         * gm2-gcc/m2except.cc: New file.
8406         * gm2-gcc/m2except.def: New file.
8407         * gm2-gcc/m2except.h: New file.
8408         * gm2-gcc/m2expr.cc: New file.
8409         * gm2-gcc/m2expr.def: New file.
8410         * gm2-gcc/m2expr.h: New file.
8411         * gm2-gcc/m2linemap.cc: New file.
8412         * gm2-gcc/m2linemap.def: New file.
8413         * gm2-gcc/m2linemap.h: New file.
8414         * gm2-gcc/m2misc.cc: New file.
8415         * gm2-gcc/m2misc.def: New file.
8416         * gm2-gcc/m2misc.h: New file.
8417         * gm2-gcc/m2options.h: New file.
8418         * gm2-gcc/m2range.h: New file.
8419         * gm2-gcc/m2search.h: New file.
8420         * gm2-gcc/m2statement.cc: New file.
8421         * gm2-gcc/m2statement.def: New file.
8422         * gm2-gcc/m2statement.h: New file.
8423         * gm2-gcc/m2top.cc: New file.
8424         * gm2-gcc/m2top.def: New file.
8425         * gm2-gcc/m2top.h: New file.
8426         * gm2-gcc/m2tree.cc: New file.
8427         * gm2-gcc/m2tree.def: New file.
8428         * gm2-gcc/m2tree.h: New file.
8429         * gm2-gcc/m2treelib.cc: New file.
8430         * gm2-gcc/m2treelib.def: New file.
8431         * gm2-gcc/m2treelib.h: New file.
8432         * gm2-gcc/m2type.cc: New file.
8433         * gm2-gcc/m2type.def: New file.
8434         * gm2-gcc/m2type.h: New file.
8435         * gm2-gcc/rtegraph.cc: New file.
8436         * gm2-gcc/rtegraph.h: New file.
8437         * gm2-ici/M2Emit.mod: New file.
8438         * gm2-ici/README: New file.
8439         * gm2-ici/m2linemap.c: New file.
8440         * gm2-internals.texi: New file.
8441         * gm2-lang.cc: New file.
8442         * gm2-lang.h: New file.
8443         * gm2-libiberty/README: New file.
8444         * gm2-libiberty/choosetemp.def: New file.
8445         * gm2-libiberty/pexecute.def: New file.
8446         * gm2-libs-ch/M2LINK.c: New file.
8447         * gm2-libs-ch/README: New file.
8448         * gm2-libs-ch/RTcodummy.c: New file.
8449         * gm2-libs-ch/RTintdummy.c: New file.
8450         * gm2-libs-ch/Selective.c: New file.
8451         * gm2-libs-ch/SysExceptions.c: New file.
8452         * gm2-libs-ch/UnixArgs.cc: New file.
8453         * gm2-libs-ch/cgetopt.c: New file.
8454         * gm2-libs-ch/choosetemp.c: New file.
8455         * gm2-libs-ch/dtoa.cc: New file.
8456         * gm2-libs-ch/errno.c: New file.
8457         * gm2-libs-ch/host.c: New file.
8458         * gm2-libs-ch/ldtoa.cc: New file.
8459         * gm2-libs-ch/m2rts.h: New file.
8460         * gm2-libs-ch/termios.c: New file.
8461         * gm2-libs-ch/tools.c: New file.
8462         * gm2-libs-ch/wrapc.c: New file.
8463         * gm2-libs-ch/xlibc.c: New file.
8464         * gm2-libs-coroutines/Debug.def: New file.
8465         * gm2-libs-coroutines/Debug.mod: New file.
8466         * gm2-libs-coroutines/Executive.def: New file.
8467         * gm2-libs-coroutines/Executive.mod: New file.
8468         * gm2-libs-coroutines/KeyBoardLEDs.def: New file.
8469         * gm2-libs-coroutines/README.texi: New file.
8470         * gm2-libs-coroutines/SYSTEM.def: New file.
8471         * gm2-libs-coroutines/SYSTEM.mod: New file.
8472         * gm2-libs-coroutines/TimerHandler.def: New file.
8473         * gm2-libs-coroutines/TimerHandler.mod: New file.
8474         * gm2-libs-iso/COROUTINES.def: New file.
8475         * gm2-libs-iso/COROUTINES.mod: New file.
8476         * gm2-libs-iso/ChanConsts.def: New file.
8477         * gm2-libs-iso/ChanConsts.h: New file.
8478         * gm2-libs-iso/ChanConsts.mod: New file.
8479         * gm2-libs-iso/CharClass.def: New file.
8480         * gm2-libs-iso/CharClass.mod: New file.
8481         * gm2-libs-iso/ClientSocket.def: New file.
8482         * gm2-libs-iso/ClientSocket.mod: New file.
8483         * gm2-libs-iso/ComplexMath.def: New file.
8484         * gm2-libs-iso/ComplexMath.mod: New file.
8485         * gm2-libs-iso/ConvStringLong.def: New file.
8486         * gm2-libs-iso/ConvStringLong.mod: New file.
8487         * gm2-libs-iso/ConvStringReal.def: New file.
8488         * gm2-libs-iso/ConvStringReal.mod: New file.
8489         * gm2-libs-iso/ConvTypes.def: New file.
8490         * gm2-libs-iso/ConvTypes.mod: New file.
8491         * gm2-libs-iso/EXCEPTIONS.def: New file.
8492         * gm2-libs-iso/EXCEPTIONS.mod: New file.
8493         * gm2-libs-iso/ErrnoCategory.def: New file.
8494         * gm2-libs-iso/GeneralUserExceptions.def: New file.
8495         * gm2-libs-iso/GeneralUserExceptions.mod: New file.
8496         * gm2-libs-iso/IOChan.def: New file.
8497         * gm2-libs-iso/IOChan.mod: New file.
8498         * gm2-libs-iso/IOConsts.def: New file.
8499         * gm2-libs-iso/IOConsts.mod: New file.
8500         * gm2-libs-iso/IOLink.def: New file.
8501         * gm2-libs-iso/IOLink.mod: New file.
8502         * gm2-libs-iso/IOResult.def: New file.
8503         * gm2-libs-iso/IOResult.mod: New file.
8504         * gm2-libs-iso/LongComplexMath.def: New file.
8505         * gm2-libs-iso/LongComplexMath.mod: New file.
8506         * gm2-libs-iso/LongConv.def: New file.
8507         * gm2-libs-iso/LongConv.mod: New file.
8508         * gm2-libs-iso/LongIO.def: New file.
8509         * gm2-libs-iso/LongIO.mod: New file.
8510         * gm2-libs-iso/LongMath.def: New file.
8511         * gm2-libs-iso/LongMath.mod: New file.
8512         * gm2-libs-iso/LongStr.def: New file.
8513         * gm2-libs-iso/LongStr.mod: New file.
8514         * gm2-libs-iso/LongWholeIO.def: New file.
8515         * gm2-libs-iso/LongWholeIO.mod: New file.
8516         * gm2-libs-iso/LowLong.def: New file.
8517         * gm2-libs-iso/LowLong.mod: New file.
8518         * gm2-libs-iso/LowReal.def: New file.
8519         * gm2-libs-iso/LowReal.mod: New file.
8520         * gm2-libs-iso/LowShort.def: New file.
8521         * gm2-libs-iso/LowShort.mod: New file.
8522         * gm2-libs-iso/M2EXCEPTION.def: New file.
8523         * gm2-libs-iso/M2EXCEPTION.mod: New file.
8524         * gm2-libs-iso/M2RTS.def: New file.
8525         * gm2-libs-iso/M2RTS.mod: New file.
8526         * gm2-libs-iso/MemStream.def: New file.
8527         * gm2-libs-iso/MemStream.mod: New file.
8528         * gm2-libs-iso/Preemptive.def: New file.
8529         * gm2-libs-iso/Preemptive.mod: New file.
8530         * gm2-libs-iso/Processes.def: New file.
8531         * gm2-libs-iso/Processes.mod: New file.
8532         * gm2-libs-iso/ProgramArgs.def: New file.
8533         * gm2-libs-iso/ProgramArgs.mod: New file.
8534         * gm2-libs-iso/README.texi: New file.
8535         * gm2-libs-iso/RTco.def: New file.
8536         * gm2-libs-iso/RTdata.def: New file.
8537         * gm2-libs-iso/RTdata.mod: New file.
8538         * gm2-libs-iso/RTentity.def: New file.
8539         * gm2-libs-iso/RTentity.mod: New file.
8540         * gm2-libs-iso/RTfio.def: New file.
8541         * gm2-libs-iso/RTfio.mod: New file.
8542         * gm2-libs-iso/RTgen.def: New file.
8543         * gm2-libs-iso/RTgen.mod: New file.
8544         * gm2-libs-iso/RTgenif.def: New file.
8545         * gm2-libs-iso/RTgenif.mod: New file.
8546         * gm2-libs-iso/RTio.def: New file.
8547         * gm2-libs-iso/RTio.mod: New file.
8548         * gm2-libs-iso/RandomNumber.def: New file.
8549         * gm2-libs-iso/RandomNumber.mod: New file.
8550         * gm2-libs-iso/RawIO.def: New file.
8551         * gm2-libs-iso/RawIO.mod: New file.
8552         * gm2-libs-iso/RealConv.def: New file.
8553         * gm2-libs-iso/RealConv.mod: New file.
8554         * gm2-libs-iso/RealIO.def: New file.
8555         * gm2-libs-iso/RealIO.mod: New file.
8556         * gm2-libs-iso/RealMath.def: New file.
8557         * gm2-libs-iso/RealMath.mod: New file.
8558         * gm2-libs-iso/RealStr.def: New file.
8559         * gm2-libs-iso/RealStr.mod: New file.
8560         * gm2-libs-iso/RndFile.def: New file.
8561         * gm2-libs-iso/RndFile.mod: New file.
8562         * gm2-libs-iso/SIOResult.def: New file.
8563         * gm2-libs-iso/SIOResult.mod: New file.
8564         * gm2-libs-iso/SLongIO.def: New file.
8565         * gm2-libs-iso/SLongIO.mod: New file.
8566         * gm2-libs-iso/SLongWholeIO.def: New file.
8567         * gm2-libs-iso/SLongWholeIO.mod: New file.
8568         * gm2-libs-iso/SRawIO.def: New file.
8569         * gm2-libs-iso/SRawIO.mod: New file.
8570         * gm2-libs-iso/SRealIO.def: New file.
8571         * gm2-libs-iso/SRealIO.mod: New file.
8572         * gm2-libs-iso/SShortIO.def: New file.
8573         * gm2-libs-iso/SShortIO.mod: New file.
8574         * gm2-libs-iso/SShortWholeIO.def: New file.
8575         * gm2-libs-iso/SShortWholeIO.mod: New file.
8576         * gm2-libs-iso/STextIO.def: New file.
8577         * gm2-libs-iso/STextIO.mod: New file.
8578         * gm2-libs-iso/SWholeIO.def: New file.
8579         * gm2-libs-iso/SWholeIO.mod: New file.
8580         * gm2-libs-iso/SYSTEM.def: New file.
8581         * gm2-libs-iso/SYSTEM.mod: New file.
8582         * gm2-libs-iso/Semaphores.def: New file.
8583         * gm2-libs-iso/Semaphores.mod: New file.
8584         * gm2-libs-iso/SeqFile.def: New file.
8585         * gm2-libs-iso/SeqFile.mod: New file.
8586         * gm2-libs-iso/ShortComplexMath.def: New file.
8587         * gm2-libs-iso/ShortComplexMath.mod: New file.
8588         * gm2-libs-iso/ShortIO.def: New file.
8589         * gm2-libs-iso/ShortIO.mod: New file.
8590         * gm2-libs-iso/ShortWholeIO.def: New file.
8591         * gm2-libs-iso/ShortWholeIO.mod: New file.
8592         * gm2-libs-iso/SimpleCipher.def: New file.
8593         * gm2-libs-iso/SimpleCipher.mod: New file.
8594         * gm2-libs-iso/StdChans.def: New file.
8595         * gm2-libs-iso/StdChans.mod: New file.
8596         * gm2-libs-iso/Storage.def: New file.
8597         * gm2-libs-iso/Storage.mod: New file.
8598         * gm2-libs-iso/StreamFile.def: New file.
8599         * gm2-libs-iso/StreamFile.mod: New file.
8600         * gm2-libs-iso/StringChan.def: New file.
8601         * gm2-libs-iso/StringChan.mod: New file.
8602         * gm2-libs-iso/Strings.def: New file.
8603         * gm2-libs-iso/Strings.mod: New file.
8604         * gm2-libs-iso/SysClock.def: New file.
8605         * gm2-libs-iso/SysClock.mod: New file.
8606         * gm2-libs-iso/TERMINATION.def: New file.
8607         * gm2-libs-iso/TERMINATION.mod: New file.
8608         * gm2-libs-iso/TermFile.def: New file.
8609         * gm2-libs-iso/TermFile.mod: New file.
8610         * gm2-libs-iso/TextIO.def: New file.
8611         * gm2-libs-iso/TextIO.mod: New file.
8612         * gm2-libs-iso/WholeConv.def: New file.
8613         * gm2-libs-iso/WholeConv.mod: New file.
8614         * gm2-libs-iso/WholeIO.def: New file.
8615         * gm2-libs-iso/WholeIO.mod: New file.
8616         * gm2-libs-iso/WholeStr.def: New file.
8617         * gm2-libs-iso/WholeStr.mod: New file.
8618         * gm2-libs-iso/wrapsock.c: New file.
8619         * gm2-libs-iso/wrapsock.def: New file.
8620         * gm2-libs-iso/wraptime.c: New file.
8621         * gm2-libs-iso/wraptime.def: New file.
8622         * gm2-libs-min/M2RTS.def: New file.
8623         * gm2-libs-min/M2RTS.mod: New file.
8624         * gm2-libs-min/SYSTEM.def: New file.
8625         * gm2-libs-min/SYSTEM.mod: New file.
8626         * gm2-libs-min/libc.c: New file.
8627         * gm2-libs-min/libc.def: New file.
8628         * gm2-libs-pim/BitBlockOps.def: New file.
8629         * gm2-libs-pim/BitBlockOps.mod: New file.
8630         * gm2-libs-pim/BitByteOps.def: New file.
8631         * gm2-libs-pim/BitByteOps.mod: New file.
8632         * gm2-libs-pim/BitWordOps.def: New file.
8633         * gm2-libs-pim/BitWordOps.mod: New file.
8634         * gm2-libs-pim/BlockOps.def: New file.
8635         * gm2-libs-pim/BlockOps.mod: New file.
8636         * gm2-libs-pim/Break.c: New file.
8637         * gm2-libs-pim/Break.def: New file.
8638         * gm2-libs-pim/CardinalIO.def: New file.
8639         * gm2-libs-pim/CardinalIO.mod: New file.
8640         * gm2-libs-pim/Conversions.def: New file.
8641         * gm2-libs-pim/Conversions.mod: New file.
8642         * gm2-libs-pim/DebugPMD.def: New file.
8643         * gm2-libs-pim/DebugPMD.mod: New file.
8644         * gm2-libs-pim/DebugTrace.def: New file.
8645         * gm2-libs-pim/DebugTrace.mod: New file.
8646         * gm2-libs-pim/Delay.def: New file.
8647         * gm2-libs-pim/Delay.mod: New file.
8648         * gm2-libs-pim/Display.def: New file.
8649         * gm2-libs-pim/Display.mod: New file.
8650         * gm2-libs-pim/ErrorCode.def: New file.
8651         * gm2-libs-pim/ErrorCode.mod: New file.
8652         * gm2-libs-pim/FileSystem.def: New file.
8653         * gm2-libs-pim/FileSystem.mod: New file.
8654         * gm2-libs-pim/FloatingUtilities.def: New file.
8655         * gm2-libs-pim/FloatingUtilities.mod: New file.
8656         * gm2-libs-pim/InOut.def: New file.
8657         * gm2-libs-pim/InOut.mod: New file.
8658         * gm2-libs-pim/Keyboard.def: New file.
8659         * gm2-libs-pim/Keyboard.mod: New file.
8660         * gm2-libs-pim/LongIO.def: New file.
8661         * gm2-libs-pim/LongIO.mod: New file.
8662         * gm2-libs-pim/NumberConversion.def: New file.
8663         * gm2-libs-pim/NumberConversion.mod: New file.
8664         * gm2-libs-pim/README.texi: New file.
8665         * gm2-libs-pim/Random.def: New file.
8666         * gm2-libs-pim/Random.mod: New file.
8667         * gm2-libs-pim/RealConversions.def: New file.
8668         * gm2-libs-pim/RealConversions.mod: New file.
8669         * gm2-libs-pim/RealInOut.def: New file.
8670         * gm2-libs-pim/RealInOut.mod: New file.
8671         * gm2-libs-pim/Strings.def: New file.
8672         * gm2-libs-pim/Strings.mod: New file.
8673         * gm2-libs-pim/Termbase.def: New file.
8674         * gm2-libs-pim/Termbase.mod: New file.
8675         * gm2-libs-pim/Terminal.def: New file.
8676         * gm2-libs-pim/Terminal.mod: New file.
8677         * gm2-libs-pim/TimeDate.def: New file.
8678         * gm2-libs-pim/TimeDate.mod: New file.
8679         * gm2-libs/ASCII.def: New file.
8680         * gm2-libs/ASCII.mod: New file.
8681         * gm2-libs/Args.def: New file.
8682         * gm2-libs/Args.mod: New file.
8683         * gm2-libs/Assertion.def: New file.
8684         * gm2-libs/Assertion.mod: New file.
8685         * gm2-libs/Break.def: New file.
8686         * gm2-libs/Break.mod: New file.
8687         * gm2-libs/Builtins.def: New file.
8688         * gm2-libs/Builtins.mod: New file.
8689         * gm2-libs/COROUTINES.def: New file.
8690         * gm2-libs/COROUTINES.mod: New file.
8691         * gm2-libs/CmdArgs.def: New file.
8692         * gm2-libs/CmdArgs.mod: New file.
8693         * gm2-libs/Debug.def: New file.
8694         * gm2-libs/Debug.mod: New file.
8695         * gm2-libs/DynamicStrings.def: New file.
8696         * gm2-libs/DynamicStrings.mod: New file.
8697         * gm2-libs/Environment.def: New file.
8698         * gm2-libs/Environment.mod: New file.
8699         * gm2-libs/FIO.def: New file.
8700         * gm2-libs/FIO.mod: New file.
8701         * gm2-libs/FormatStrings.def: New file.
8702         * gm2-libs/FormatStrings.mod: New file.
8703         * gm2-libs/FpuIO.def: New file.
8704         * gm2-libs/FpuIO.mod: New file.
8705         * gm2-libs/GetOpt.def: New file.
8706         * gm2-libs/GetOpt.mod: New file.
8707         * gm2-libs/IO.def: New file.
8708         * gm2-libs/IO.mod: New file.
8709         * gm2-libs/Indexing.def: New file.
8710         * gm2-libs/Indexing.mod: New file.
8711         * gm2-libs/LMathLib0.def: New file.
8712         * gm2-libs/LMathLib0.mod: New file.
8713         * gm2-libs/LegacyReal.def: New file.
8714         * gm2-libs/LegacyReal.mod: New file.
8715         * gm2-libs/M2Dependent.def: New file.
8716         * gm2-libs/M2Dependent.mod: New file.
8717         * gm2-libs/M2EXCEPTION.def: New file.
8718         * gm2-libs/M2EXCEPTION.mod: New file.
8719         * gm2-libs/M2LINK.def: New file.
8720         * gm2-libs/M2RTS.def: New file.
8721         * gm2-libs/M2RTS.mod: New file.
8722         * gm2-libs/MathLib0.def: New file.
8723         * gm2-libs/MathLib0.mod: New file.
8724         * gm2-libs/MemUtils.def: New file.
8725         * gm2-libs/MemUtils.mod: New file.
8726         * gm2-libs/NumberIO.def: New file.
8727         * gm2-libs/NumberIO.mod: New file.
8728         * gm2-libs/OptLib.def: New file.
8729         * gm2-libs/OptLib.mod: New file.
8730         * gm2-libs/PushBackInput.def: New file.
8731         * gm2-libs/PushBackInput.mod: New file.
8732         * gm2-libs/README.texi: New file.
8733         * gm2-libs/RTExceptions.def: New file.
8734         * gm2-libs/RTExceptions.mod: New file.
8735         * gm2-libs/RTint.def: New file.
8736         * gm2-libs/RTint.mod: New file.
8737         * gm2-libs/SArgs.def: New file.
8738         * gm2-libs/SArgs.mod: New file.
8739         * gm2-libs/SCmdArgs.def: New file.
8740         * gm2-libs/SCmdArgs.mod: New file.
8741         * gm2-libs/SEnvironment.def: New file.
8742         * gm2-libs/SEnvironment.mod: New file.
8743         * gm2-libs/SFIO.def: New file.
8744         * gm2-libs/SFIO.mod: New file.
8745         * gm2-libs/SMathLib0.def: New file.
8746         * gm2-libs/SMathLib0.mod: New file.
8747         * gm2-libs/SYSTEM.def: New file.
8748         * gm2-libs/SYSTEM.mod: New file.
8749         * gm2-libs/Scan.def: New file.
8750         * gm2-libs/Scan.mod: New file.
8751         * gm2-libs/Selective.def: New file.
8752         * gm2-libs/StdIO.def: New file.
8753         * gm2-libs/StdIO.mod: New file.
8754         * gm2-libs/Storage.def: New file.
8755         * gm2-libs/Storage.mod: New file.
8756         * gm2-libs/StrCase.def: New file.
8757         * gm2-libs/StrCase.mod: New file.
8758         * gm2-libs/StrIO.def: New file.
8759         * gm2-libs/StrIO.mod: New file.
8760         * gm2-libs/StrLib.def: New file.
8761         * gm2-libs/StrLib.mod: New file.
8762         * gm2-libs/StringConvert.def: New file.
8763         * gm2-libs/StringConvert.mod: New file.
8764         * gm2-libs/SysExceptions.def: New file.
8765         * gm2-libs/SysStorage.def: New file.
8766         * gm2-libs/SysStorage.mod: New file.
8767         * gm2-libs/TimeString.def: New file.
8768         * gm2-libs/TimeString.mod: New file.
8769         * gm2-libs/UnixArgs.def: New file.
8770         * gm2-libs/cbuiltin.def: New file.
8771         * gm2-libs/cgetopt.def: New file.
8772         * gm2-libs/config-host: New file.
8773         * gm2-libs/config-host.in: New file.
8774         * gm2-libs/cxxabi.def: New file.
8775         * gm2-libs/dtoa.def: New file.
8776         * gm2-libs/errno.def: New file.
8777         * gm2-libs/gdbif.def: New file.
8778         * gm2-libs/gdbif.mod: New file.
8779         * gm2-libs/gm2-libs-host.h.in: New file.
8780         * gm2-libs/ldtoa.def: New file.
8781         * gm2-libs/libc.def: New file.
8782         * gm2-libs/libm.def: New file.
8783         * gm2-libs/sckt.def: New file.
8784         * gm2-libs/termios.def: New file.
8785         * gm2-libs/wrapc.def: New file.
8786         * gm2config.h.in: New file.
8787         * gm2spec.cc: New file.
8788         * gm2version.h: New file.
8789         * init/README: New file.
8790         * init/mcinit: New file.
8791         * init/ppginit: New file.
8792         * lang-specs.h: New file.
8793         * lang.opt: New file.
8794         * m2-tree.def: New file.
8795         * m2-tree.h: New file.
8796         * m2.flex: New file.
8797         * m2pp.cc: New file.
8798         * m2pp.h: New file.
8799         * mc-boot-ch/GBuiltins.c: New file.
8800         * mc-boot-ch/GM2LINK.c: New file.
8801         * mc-boot-ch/GRTco.c: New file.
8802         * mc-boot-ch/GSYSTEM.c: New file.
8803         * mc-boot-ch/GSelective.c: New file.
8804         * mc-boot-ch/GSysExceptions.c: New file.
8805         * mc-boot-ch/GUnixArgs.cc: New file.
8806         * mc-boot-ch/Gabort.c: New file.
8807         * mc-boot-ch/Gcbuiltin.c: New file.
8808         * mc-boot-ch/Gdtoa.c: New file.
8809         * mc-boot-ch/Gerrno.c: New file.
8810         * mc-boot-ch/Gldtoa.c: New file.
8811         * mc-boot-ch/Glibc.c: New file.
8812         * mc-boot-ch/Glibm.c: New file.
8813         * mc-boot-ch/Gmcrts.c: New file.
8814         * mc-boot-ch/Gmcrts.h: New file.
8815         * mc-boot-ch/Gnetwork.h: New file.
8816         * mc-boot-ch/Gtermios.cc: New file.
8817         * mc-boot-ch/Gwrapc.c: New file.
8818         * mc-boot-ch/README: New file.
8819         * mc-boot-ch/m2rts.h: New file.
8820         * mc-boot-ch/network.c: New file.
8821         * mc-boot/GASCII.c: New file.
8822         * mc-boot/GASCII.h: New file.
8823         * mc-boot/GArgs.c: New file.
8824         * mc-boot/GArgs.h: New file.
8825         * mc-boot/GAssertion.c: New file.
8826         * mc-boot/GAssertion.h: New file.
8827         * mc-boot/GBreak.c: New file.
8828         * mc-boot/GBreak.h: New file.
8829         * mc-boot/GCOROUTINES.h: New file.
8830         * mc-boot/GCmdArgs.c: New file.
8831         * mc-boot/GCmdArgs.h: New file.
8832         * mc-boot/GDebug.c: New file.
8833         * mc-boot/GDebug.h: New file.
8834         * mc-boot/GDynamicStrings.c: New file.
8835         * mc-boot/GDynamicStrings.h: New file.
8836         * mc-boot/GEnvironment.c: New file.
8837         * mc-boot/GEnvironment.h: New file.
8838         * mc-boot/GFIO.c: New file.
8839         * mc-boot/GFIO.h: New file.
8840         * mc-boot/GFormatStrings.c: New file.
8841         * mc-boot/GFormatStrings.h: New file.
8842         * mc-boot/GFpuIO.c: New file.
8843         * mc-boot/GFpuIO.h: New file.
8844         * mc-boot/GIO.c: New file.
8845         * mc-boot/GIO.h: New file.
8846         * mc-boot/GIndexing.c: New file.
8847         * mc-boot/GIndexing.h: New file.
8848         * mc-boot/GM2Dependent.c: New file.
8849         * mc-boot/GM2Dependent.h: New file.
8850         * mc-boot/GM2EXCEPTION.c: New file.
8851         * mc-boot/GM2EXCEPTION.h: New file.
8852         * mc-boot/GM2LINK.h: New file.
8853         * mc-boot/GM2RTS.c: New file.
8854         * mc-boot/GM2RTS.h: New file.
8855         * mc-boot/GMemUtils.c: New file.
8856         * mc-boot/GMemUtils.h: New file.
8857         * mc-boot/GNumberIO.c: New file.
8858         * mc-boot/GNumberIO.h: New file.
8859         * mc-boot/GPushBackInput.c: New file.
8860         * mc-boot/GPushBackInput.h: New file.
8861         * mc-boot/GRTExceptions.c: New file.
8862         * mc-boot/GRTExceptions.h: New file.
8863         * mc-boot/GRTco.h: New file.
8864         * mc-boot/GRTint.c: New file.
8865         * mc-boot/GRTint.h: New file.
8866         * mc-boot/GSArgs.c: New file.
8867         * mc-boot/GSArgs.h: New file.
8868         * mc-boot/GSFIO.c: New file.
8869         * mc-boot/GSFIO.h: New file.
8870         * mc-boot/GSYSTEM.h: New file.
8871         * mc-boot/GSelective.h: New file.
8872         * mc-boot/GStdIO.c: New file.
8873         * mc-boot/GStdIO.h: New file.
8874         * mc-boot/GStorage.c: New file.
8875         * mc-boot/GStorage.h: New file.
8876         * mc-boot/GStrCase.c: New file.
8877         * mc-boot/GStrCase.h: New file.
8878         * mc-boot/GStrIO.c: New file.
8879         * mc-boot/GStrIO.h: New file.
8880         * mc-boot/GStrLib.c: New file.
8881         * mc-boot/GStrLib.h: New file.
8882         * mc-boot/GStringConvert.c: New file.
8883         * mc-boot/GStringConvert.h: New file.
8884         * mc-boot/GSysExceptions.h: New file.
8885         * mc-boot/GSysStorage.c: New file.
8886         * mc-boot/GSysStorage.h: New file.
8887         * mc-boot/GTimeString.c: New file.
8888         * mc-boot/GTimeString.h: New file.
8889         * mc-boot/GUnixArgs.h: New file.
8890         * mc-boot/Galists.c: New file.
8891         * mc-boot/Galists.h: New file.
8892         * mc-boot/Gdecl.c: New file.
8893         * mc-boot/Gdecl.h: New file.
8894         * mc-boot/Gdtoa.h: New file.
8895         * mc-boot/Gerrno.h: New file.
8896         * mc-boot/Gkeyc.c: New file.
8897         * mc-boot/Gkeyc.h: New file.
8898         * mc-boot/Gldtoa.h: New file.
8899         * mc-boot/Glibc.h: New file.
8900         * mc-boot/Glibm.h: New file.
8901         * mc-boot/Glists.c: New file.
8902         * mc-boot/Glists.h: New file.
8903         * mc-boot/GmcComment.c: New file.
8904         * mc-boot/GmcComment.h: New file.
8905         * mc-boot/GmcComp.c: New file.
8906         * mc-boot/GmcComp.h: New file.
8907         * mc-boot/GmcDebug.c: New file.
8908         * mc-boot/GmcDebug.h: New file.
8909         * mc-boot/GmcError.c: New file.
8910         * mc-boot/GmcError.h: New file.
8911         * mc-boot/GmcFileName.c: New file.
8912         * mc-boot/GmcFileName.h: New file.
8913         * mc-boot/GmcLexBuf.c: New file.
8914         * mc-boot/GmcLexBuf.h: New file.
8915         * mc-boot/GmcMetaError.c: New file.
8916         * mc-boot/GmcMetaError.h: New file.
8917         * mc-boot/GmcOptions.c: New file.
8918         * mc-boot/GmcOptions.h: New file.
8919         * mc-boot/GmcPreprocess.c: New file.
8920         * mc-boot/GmcPreprocess.h: New file.
8921         * mc-boot/GmcPretty.c: New file.
8922         * mc-boot/GmcPretty.h: New file.
8923         * mc-boot/GmcPrintf.c: New file.
8924         * mc-boot/GmcPrintf.h: New file.
8925         * mc-boot/GmcQuiet.c: New file.
8926         * mc-boot/GmcQuiet.h: New file.
8927         * mc-boot/GmcReserved.c: New file.
8928         * mc-boot/GmcReserved.h: New file.
8929         * mc-boot/GmcSearch.c: New file.
8930         * mc-boot/GmcSearch.h: New file.
8931         * mc-boot/GmcStack.c: New file.
8932         * mc-boot/GmcStack.h: New file.
8933         * mc-boot/GmcStream.c: New file.
8934         * mc-boot/GmcStream.h: New file.
8935         * mc-boot/Gmcflex.h: New file.
8936         * mc-boot/Gmcp1.c: New file.
8937         * mc-boot/Gmcp1.h: New file.
8938         * mc-boot/Gmcp2.c: New file.
8939         * mc-boot/Gmcp2.h: New file.
8940         * mc-boot/Gmcp3.c: New file.
8941         * mc-boot/Gmcp3.h: New file.
8942         * mc-boot/Gmcp4.c: New file.
8943         * mc-boot/Gmcp4.h: New file.
8944         * mc-boot/Gmcp5.c: New file.
8945         * mc-boot/Gmcp5.h: New file.
8946         * mc-boot/GnameKey.c: New file.
8947         * mc-boot/GnameKey.h: New file.
8948         * mc-boot/Gpth.h: New file.
8949         * mc-boot/GsymbolKey.c: New file.
8950         * mc-boot/GsymbolKey.h: New file.
8951         * mc-boot/Gtermios.h: New file.
8952         * mc-boot/Gtop.c: New file.
8953         * mc-boot/Gvarargs.c: New file.
8954         * mc-boot/Gvarargs.h: New file.
8955         * mc-boot/Gwlists.c: New file.
8956         * mc-boot/Gwlists.h: New file.
8957         * mc-boot/Gwrapc.h: New file.
8958         * mc-boot/README: New file.
8959         * mc/Indexing.def: New file.
8960         * mc/Indexing.mod: New file.
8961         * mc/README: New file.
8962         * mc/alists.def: New file.
8963         * mc/alists.mod: New file.
8964         * mc/decl.def: New file.
8965         * mc/decl.mod: New file.
8966         * mc/decl.mod-extra: New file.
8967         * mc/keyc.def: New file.
8968         * mc/keyc.mod: New file.
8969         * mc/lists.def: New file.
8970         * mc/lists.mod: New file.
8971         * mc/m2flex.def: New file.
8972         * mc/mc.flex: New file.
8973         * mc/mcComment.def: New file.
8974         * mc/mcComment.h: New file.
8975         * mc/mcComment.mod: New file.
8976         * mc/mcComp.def: New file.
8977         * mc/mcComp.mod: New file.
8978         * mc/mcDebug.def: New file.
8979         * mc/mcDebug.mod: New file.
8980         * mc/mcError.def: New file.
8981         * mc/mcError.mod: New file.
8982         * mc/mcFileName.def: New file.
8983         * mc/mcFileName.mod: New file.
8984         * mc/mcLexBuf.def: New file.
8985         * mc/mcLexBuf.h: New file.
8986         * mc/mcLexBuf.mod: New file.
8987         * mc/mcMetaError.def: New file.
8988         * mc/mcMetaError.mod: New file.
8989         * mc/mcOptions.def: New file.
8990         * mc/mcOptions.mod: New file.
8991         * mc/mcPreprocess.def: New file.
8992         * mc/mcPreprocess.mod: New file.
8993         * mc/mcPretty.def: New file.
8994         * mc/mcPretty.mod: New file.
8995         * mc/mcPrintf.def: New file.
8996         * mc/mcPrintf.mod: New file.
8997         * mc/mcQuiet.def: New file.
8998         * mc/mcQuiet.mod: New file.
8999         * mc/mcReserved.def: New file.
9000         * mc/mcReserved.h: New file.
9001         * mc/mcReserved.mod: New file.
9002         * mc/mcSearch.def: New file.
9003         * mc/mcSearch.mod: New file.
9004         * mc/mcStack.def: New file.
9005         * mc/mcStack.mod: New file.
9006         * mc/mcStream.def: New file.
9007         * mc/mcStream.mod: New file.
9008         * mc/mcflex.def: New file.
9009         * mc/mcp1.bnf: New file.
9010         * mc/mcp1.def: New file.
9011         * mc/mcp2.bnf: New file.
9012         * mc/mcp2.def: New file.
9013         * mc/mcp3.bnf: New file.
9014         * mc/mcp3.def: New file.
9015         * mc/mcp4.bnf: New file.
9016         * mc/mcp4.def: New file.
9017         * mc/mcp5.bnf: New file.
9018         * mc/mcp5.def: New file.
9019         * mc/nameKey.def: New file.
9020         * mc/nameKey.mod: New file.
9021         * mc/symbolKey.def: New file.
9022         * mc/symbolKey.mod: New file.
9023         * mc/top.mod: New file.
9024         * mc/varargs.def: New file.
9025         * mc/varargs.mod: New file.
9026         * mc/wlists.def: New file.
9027         * mc/wlists.mod: New file.
9028         * pge-boot/GASCII.c: New file.
9029         * pge-boot/GASCII.h: New file.
9030         * pge-boot/GArgs.c: New file.
9031         * pge-boot/GArgs.h: New file.
9032         * pge-boot/GAssertion.c: New file.
9033         * pge-boot/GAssertion.h: New file.
9034         * pge-boot/GBreak.h: New file.
9035         * pge-boot/GBuiltins.c: New file.
9036         * pge-boot/GCmdArgs.h: New file.
9037         * pge-boot/GDebug.c: New file.
9038         * pge-boot/GDebug.h: New file.
9039         * pge-boot/GDynamicStrings.c: New file.
9040         * pge-boot/GDynamicStrings.h: New file.
9041         * pge-boot/GEnvironment.h: New file.
9042         * pge-boot/GFIO.c: New file.
9043         * pge-boot/GFIO.h: New file.
9044         * pge-boot/GFormatStrings.h: New file.
9045         * pge-boot/GFpuIO.h: New file.
9046         * pge-boot/GIO.c: New file.
9047         * pge-boot/GIO.h: New file.
9048         * pge-boot/GIndexing.c: New file.
9049         * pge-boot/GIndexing.h: New file.
9050         * pge-boot/GLists.c: New file.
9051         * pge-boot/GLists.h: New file.
9052         * pge-boot/GM2Dependent.c: New file.
9053         * pge-boot/GM2Dependent.h: New file.
9054         * pge-boot/GM2EXCEPTION.c: New file.
9055         * pge-boot/GM2EXCEPTION.h: New file.
9056         * pge-boot/GM2LINK.c: New file.
9057         * pge-boot/GM2LINK.h: New file.
9058         * pge-boot/GM2RTS.c: New file.
9059         * pge-boot/GM2RTS.h: New file.
9060         * pge-boot/GNameKey.c: New file.
9061         * pge-boot/GNameKey.h: New file.
9062         * pge-boot/GNumberIO.c: New file.
9063         * pge-boot/GNumberIO.h: New file.
9064         * pge-boot/GOutput.c: New file.
9065         * pge-boot/GOutput.h: New file.
9066         * pge-boot/GPushBackInput.c: New file.
9067         * pge-boot/GPushBackInput.h: New file.
9068         * pge-boot/GRTExceptions.c: New file.
9069         * pge-boot/GRTExceptions.h: New file.
9070         * pge-boot/GRTco.c: New file.
9071         * pge-boot/GSArgs.h: New file.
9072         * pge-boot/GSEnvironment.h: New file.
9073         * pge-boot/GSFIO.c: New file.
9074         * pge-boot/GSFIO.h: New file.
9075         * pge-boot/GSYSTEM.c: New file.
9076         * pge-boot/GSYSTEM.h: New file.
9077         * pge-boot/GScan.h: New file.
9078         * pge-boot/GSelective.c: New file.
9079         * pge-boot/GStdIO.c: New file.
9080         * pge-boot/GStdIO.h: New file.
9081         * pge-boot/GStorage.c: New file.
9082         * pge-boot/GStorage.h: New file.
9083         * pge-boot/GStrCase.c: New file.
9084         * pge-boot/GStrCase.h: New file.
9085         * pge-boot/GStrIO.c: New file.
9086         * pge-boot/GStrIO.h: New file.
9087         * pge-boot/GStrLib.c: New file.
9088         * pge-boot/GStrLib.h: New file.
9089         * pge-boot/GStringConvert.h: New file.
9090         * pge-boot/GSymbolKey.c: New file.
9091         * pge-boot/GSymbolKey.h: New file.
9092         * pge-boot/GSysExceptions.c: New file.
9093         * pge-boot/GSysExceptions.h: New file.
9094         * pge-boot/GSysStorage.c: New file.
9095         * pge-boot/GSysStorage.h: New file.
9096         * pge-boot/GTimeString.h: New file.
9097         * pge-boot/GUnixArgs.cc: New file.
9098         * pge-boot/GUnixArgs.h: New file.
9099         * pge-boot/Gabort.c: New file.
9100         * pge-boot/Gbnflex.c: New file.
9101         * pge-boot/Gbnflex.h: New file.
9102         * pge-boot/Gcbuiltin.c: New file.
9103         * pge-boot/Gdtoa.c: New file.
9104         * pge-boot/Gdtoa.h: New file.
9105         * pge-boot/Gerrno.c: New file.
9106         * pge-boot/Gerrno.h: New file.
9107         * pge-boot/Gldtoa.c: New file.
9108         * pge-boot/Gldtoa.h: New file.
9109         * pge-boot/Glibc.c: New file.
9110         * pge-boot/Glibc.h: New file.
9111         * pge-boot/Glibm.c: New file.
9112         * pge-boot/Glibm.h: New file.
9113         * pge-boot/Gmcrts.c: New file.
9114         * pge-boot/Gmcrts.h: New file.
9115         * pge-boot/Gnetwork.h: New file.
9116         * pge-boot/Gpge.c: New file.
9117         * pge-boot/Gtermios.cc: New file.
9118         * pge-boot/Gtermios.h: New file.
9119         * pge-boot/Gwrapc.c: New file.
9120         * pge-boot/Gwrapc.h: New file.
9121         * pge-boot/README: New file.
9122         * pge-boot/m2rts.h: New file.
9123         * pge-boot/main.c: New file.
9124         * pge-boot/network.c: New file.
9125         * plugin/README: New file.
9126         * plugin/m2rte.cc: New file.
9127         * tools-src/README: New file.
9128         * tools-src/boilerplate.py: New file.
9129         * tools-src/buildpg: New file.
9130         * tools-src/calcpath: New file.
9131         * tools-src/def2doc.py: New file.
9132         * tools-src/makeSystem: New file.
9133         * tools-src/mklink.c: New file.
9134         * tools-src/tidydates.py: New file.
9135         * images/LICENSE.IMG: New file.
9136         * images/gnupng: New file.
9137         * images/gnu.eps: New file.
9138         * version.c: New file.
9139         * configure: Rebuilt.
9140         * target-independent/Builtins.texi: New file.
9141         * target-independent/SYSTEM-iso.texi: New file.
9142         * target-independent/SYSTEM-pim.texi: New file.
9143         * target-independent/gm2-libs.texi: New file.
9144         * target-independent/readme.txt: New file.