aboutsummaryrefslogtreecommitdiff
path: root/gcc/m2/mc-boot
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-06-21 11:04:04 -0700
committerIan Lance Taylor <iant@golang.org>2023-06-21 11:04:04 -0700
commit97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (patch)
treed5c1cae4de436a0fe54a5f0a2a197d309f3d654c /gcc/m2/mc-boot
parent6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced (diff)
parent577223aebc7acdd31e62b33c1682fe54a622ae27 (diff)
downloadgcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.zip
gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.tar.gz
gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.tar.bz2
Merge from trunk revision 577223aebc7acdd31e62b33c1682fe54a622ae27.
Diffstat (limited to 'gcc/m2/mc-boot')
-rw-r--r--gcc/m2/mc-boot/GDynamicStrings.cc29
-rw-r--r--gcc/m2/mc-boot/GFIO.cc2
-rw-r--r--gcc/m2/mc-boot/GFormatStrings.cc2
-rw-r--r--gcc/m2/mc-boot/GM2Dependent.cc85
-rw-r--r--gcc/m2/mc-boot/GM2Dependent.h2
-rw-r--r--gcc/m2/mc-boot/GM2LINK.h60
-rw-r--r--gcc/m2/mc-boot/GM2RTS.cc6
-rw-r--r--gcc/m2/mc-boot/GM2RTS.h2
-rw-r--r--gcc/m2/mc-boot/GRTExceptions.cc1
-rw-r--r--gcc/m2/mc-boot/GRTint.cc6
-rw-r--r--gcc/m2/mc-boot/GSFIO.cc1
-rw-r--r--gcc/m2/mc-boot/GStringConvert.cc4
-rw-r--r--gcc/m2/mc-boot/Gdecl.cc2
13 files changed, 63 insertions, 139 deletions
diff --git a/gcc/m2/mc-boot/GDynamicStrings.cc b/gcc/m2/mc-boot/GDynamicStrings.cc
index e97764d..0076047 100644
--- a/gcc/m2/mc-boot/GDynamicStrings.cc
+++ b/gcc/m2/mc-boot/GDynamicStrings.cc
@@ -463,7 +463,7 @@ static void writeCard (unsigned int c);
static void writeLongcard (long unsigned int l);
/*
- writeAddress -
+ writeAddress - writes out the address of a with a C style hex prefix.
*/
static void writeAddress (void * a);
@@ -684,8 +684,6 @@ static void writeNspace (unsigned int n)
static void DumpStringInfo (DynamicStrings_String s, unsigned int i)
{
- DynamicStrings_String t;
-
if (s != NULL)
{
writeNspace (i);
@@ -901,12 +899,18 @@ static void writeLongcard (long unsigned int l)
/*
- writeAddress -
+ writeAddress - writes out the address of a with a C style hex prefix.
*/
static void writeAddress (void * a)
{
- writeLongcard ((long unsigned int ) (a));
+ typedef struct writeAddress__T4_a writeAddress__T4;
+
+ struct writeAddress__T4_a { char array[30+1]; };
+ writeAddress__T4 buffer;
+
+ libc_snprintf (&buffer, static_cast<size_t> (sizeof (buffer)), (const char *) "0x%", 3, a);
+ writeString ((const char *) &buffer.array[0], 30);
}
@@ -1655,10 +1659,10 @@ extern "C" DynamicStrings_String DynamicStrings_InitStringCharStar (void * a)
extern "C" DynamicStrings_String DynamicStrings_InitStringChar (char ch)
{
- typedef struct InitStringChar__T4_a InitStringChar__T4;
+ typedef struct InitStringChar__T5_a InitStringChar__T5;
- struct InitStringChar__T4_a { char array[1+1]; };
- InitStringChar__T4 a;
+ struct InitStringChar__T5_a { char array[1+1]; };
+ InitStringChar__T5 a;
DynamicStrings_String s;
a.array[0] = ch;
@@ -1763,10 +1767,10 @@ extern "C" DynamicStrings_String DynamicStrings_ConCat (DynamicStrings_String a,
extern "C" DynamicStrings_String DynamicStrings_ConCatChar (DynamicStrings_String a, char ch)
{
- typedef struct ConCatChar__T5_a ConCatChar__T5;
+ typedef struct ConCatChar__T6_a ConCatChar__T6;
- struct ConCatChar__T5_a { char array[1+1]; };
- ConCatChar__T5 b;
+ struct ConCatChar__T6_a { char array[1+1]; };
+ ConCatChar__T6 b;
DynamicStrings_String t;
if (PoisonOn)
@@ -2620,7 +2624,6 @@ extern "C" void DynamicStrings_PopAllocation (bool halt)
extern "C" DynamicStrings_String DynamicStrings_PopAllocationExemption (bool halt, DynamicStrings_String e)
{
DynamicStrings_String s;
- DynamicStrings_frame f;
bool b;
Init ();
@@ -2630,7 +2633,7 @@ extern "C" DynamicStrings_String DynamicStrings_PopAllocationExemption (bool hal
if (frameHead == NULL)
{
stop ();
- M2RTS_Halt ((const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, (const char *) "PopAllocationExemption", 22, 177);
+ M2RTS_Halt ((const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, (const char *) "PopAllocationExemption", 22, 174);
}
else
{
diff --git a/gcc/m2/mc-boot/GFIO.cc b/gcc/m2/mc-boot/GFIO.cc
index ce7f0bc..a3f5362 100644
--- a/gcc/m2/mc-boot/GFIO.cc
+++ b/gcc/m2/mc-boot/GFIO.cc
@@ -814,7 +814,6 @@ static int BufferedRead (FIO_File f, unsigned int nBytes, void * a)
typedef unsigned char *BufferedRead__T3;
void * t;
- int result;
int total;
int n;
BufferedRead__T3 p;
@@ -1242,7 +1241,6 @@ static int BufferedWrite (FIO_File f, unsigned int nBytes, void * a)
typedef unsigned char *BufferedWrite__T5;
void * t;
- int result;
int total;
int n;
BufferedWrite__T5 p;
diff --git a/gcc/m2/mc-boot/GFormatStrings.cc b/gcc/m2/mc-boot/GFormatStrings.cc
index b8d0f92..c8fdefa 100644
--- a/gcc/m2/mc-boot/GFormatStrings.cc
+++ b/gcc/m2/mc-boot/GFormatStrings.cc
@@ -370,7 +370,6 @@ static DynamicStrings_String PerformFormatString (DynamicStrings_String fmt, int
int width;
int nextperc;
int afterperc;
- int endpos;
char leader;
char ch;
char ch2;
@@ -544,7 +543,6 @@ static DynamicStrings_String Copy (DynamicStrings_String fmt, DynamicStrings_Str
static DynamicStrings_String HandlePercent (DynamicStrings_String fmt, DynamicStrings_String s, int startpos)
{
int prevpos;
- DynamicStrings_String result;
if ((startpos == ((int ) (DynamicStrings_Length (fmt)))) || (startpos < 0))
{
diff --git a/gcc/m2/mc-boot/GM2Dependent.cc b/gcc/m2/mc-boot/GM2Dependent.cc
index 23fb28d..1fe5de2 100644
--- a/gcc/m2/mc-boot/GM2Dependent.cc
+++ b/gcc/m2/mc-boot/GM2Dependent.cc
@@ -51,7 +51,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define _M2Dependent_C
# include "Glibc.h"
-# include "GM2LINK.h"
# include "GASCII.h"
# include "GSYSTEM.h"
# include "GStorage.h"
@@ -62,6 +61,8 @@ typedef struct M2Dependent_ArgCVEnvP_p M2Dependent_ArgCVEnvP;
typedef struct M2Dependent_DependencyList_r M2Dependent_DependencyList;
+typedef char *M2Dependent_PtrToChar;
+
typedef struct M2Dependent__T2_r M2Dependent__T2;
typedef M2Dependent__T2 *M2Dependent_ModuleChain;
@@ -93,6 +94,7 @@ struct M2Dependent__T2_r {
};
static M2Dependent__T3 Modules;
+static bool DynamicInitialization;
static bool Initialized;
static bool WarningTrace;
static bool ModuleTrace;
@@ -107,7 +109,7 @@ static bool ForceTrace;
module constructor in turn.
*/
-extern "C" void M2Dependent_ConstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
+extern "C" void M2Dependent_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp);
/*
DeconstructModules - resolve dependencies and then call each
@@ -127,7 +129,7 @@ extern "C" void M2Dependent_RegisterModule (void * modulename, void * libname, M
/*
RequestDependant - used to specify that modulename is dependant upon
module dependantmodule. It only takes effect
- if we are not using StaticInitialization.
+ if we are using DynamicInitialization.
*/
extern "C" void M2Dependent_RequestDependant (void * modulename, void * libname, void * dependantmodule, void * dependantlibname);
@@ -195,20 +197,20 @@ static void toCString (char *str, unsigned int _str_high);
We cannot use Builtins.def during bootstrap.
*/
-static int strcmp (M2LINK_PtrToChar a, M2LINK_PtrToChar b);
+static int strcmp (M2Dependent_PtrToChar a, M2Dependent_PtrToChar b);
/*
strncmp - return 0 if both strings are equal.
We cannot use Builtins.def during bootstrap.
*/
-static int strncmp (M2LINK_PtrToChar a, M2LINK_PtrToChar b, unsigned int n);
+static int strncmp (M2Dependent_PtrToChar a, M2Dependent_PtrToChar b, unsigned int n);
/*
strlen - returns the length of string.
*/
-static int strlen_ (M2LINK_PtrToChar string);
+static int strlen_ (M2Dependent_PtrToChar string);
/*
traceprintf - wrap printf with a boolean flag.
@@ -294,7 +296,7 @@ static void ForceModule (void * modname, unsigned int modlen, void * libname, un
the dynamic ordering with the preference.
*/
-static void ForceDependencies (void);
+static void ForceDependencies (void * overrideliborder);
/*
CheckApplication - check to see that the application is the last entry in the list.
@@ -360,8 +362,6 @@ static void CheckInitialized (void);
static M2Dependent_ModuleChain CreateModule (void * name, void * libname, M2Dependent_ArgCVEnvP init, M2Dependent_ArgCVEnvP fini, PROC dependencies)
{
M2Dependent_ModuleChain mptr;
- void * p0;
- void * p1;
Storage_ALLOCATE ((void **) &mptr, sizeof (M2Dependent__T2));
mptr->name = name;
@@ -503,7 +503,7 @@ static M2Dependent_ModuleChain LookupModuleN (M2Dependent_DependencyState state,
{
ptr = Modules.array[state-M2Dependent_unregistered];
do {
- if (((strncmp (reinterpret_cast<M2LINK_PtrToChar> (ptr->name), reinterpret_cast<M2LINK_PtrToChar> (name), max (namelen, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2LINK_PtrToChar> (ptr->name)))))) == 0) && ((strncmp (reinterpret_cast<M2LINK_PtrToChar> (ptr->libname), reinterpret_cast<M2LINK_PtrToChar> (libname), max (libnamelen, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2LINK_PtrToChar> (ptr->libname)))))) == 0))
+ if (((strncmp (reinterpret_cast<M2Dependent_PtrToChar> (ptr->name), reinterpret_cast<M2Dependent_PtrToChar> (name), max (namelen, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2Dependent_PtrToChar> (ptr->name)))))) == 0) && ((strncmp (reinterpret_cast<M2Dependent_PtrToChar> (ptr->libname), reinterpret_cast<M2Dependent_PtrToChar> (libname), max (libnamelen, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2Dependent_PtrToChar> (ptr->libname)))))) == 0))
{
return ptr;
}
@@ -523,7 +523,7 @@ static M2Dependent_ModuleChain LookupModuleN (M2Dependent_DependencyState state,
static M2Dependent_ModuleChain LookupModule (M2Dependent_DependencyState state, void * name, void * libname)
{
- return LookupModuleN (state, name, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2LINK_PtrToChar> (name))), libname, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2LINK_PtrToChar> (libname))));
+ return LookupModuleN (state, name, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2Dependent_PtrToChar> (name))), libname, static_cast<unsigned int> (strlen_ (reinterpret_cast<M2Dependent_PtrToChar> (libname))));
/* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
}
@@ -567,7 +567,7 @@ static void toCString (char *str, unsigned int _str_high)
We cannot use Builtins.def during bootstrap.
*/
-static int strcmp (M2LINK_PtrToChar a, M2LINK_PtrToChar b)
+static int strcmp (M2Dependent_PtrToChar a, M2Dependent_PtrToChar b)
{
if ((a != NULL) && (b != NULL))
{
@@ -600,7 +600,7 @@ static int strcmp (M2LINK_PtrToChar a, M2LINK_PtrToChar b)
We cannot use Builtins.def during bootstrap.
*/
-static int strncmp (M2LINK_PtrToChar a, M2LINK_PtrToChar b, unsigned int n)
+static int strncmp (M2Dependent_PtrToChar a, M2Dependent_PtrToChar b, unsigned int n)
{
if (n == 0)
{
@@ -637,7 +637,7 @@ static int strncmp (M2LINK_PtrToChar a, M2LINK_PtrToChar b, unsigned int n)
strlen - returns the length of string.
*/
-static int strlen_ (M2LINK_PtrToChar string)
+static int strlen_ (M2Dependent_PtrToChar string)
{
int count;
@@ -910,8 +910,6 @@ static void DisplayModuleInfo (M2Dependent_DependencyState state, const char *de
static void DumpModuleData (bool flag)
{
- M2Dependent_ModuleChain mptr;
-
if (flag)
{
DisplayModuleInfo (M2Dependent_unregistered, (const char *) "unregistered", 12);
@@ -993,20 +991,20 @@ static void ForceModule (void * modname, unsigned int modlen, void * libname, un
the dynamic ordering with the preference.
*/
-static void ForceDependencies (void)
+static void ForceDependencies (void * overrideliborder)
{
unsigned int len;
unsigned int modlen;
unsigned int liblen;
- M2LINK_PtrToChar modname;
- M2LINK_PtrToChar libname;
- M2LINK_PtrToChar pc;
- M2LINK_PtrToChar start;
+ M2Dependent_PtrToChar modname;
+ M2Dependent_PtrToChar libname;
+ M2Dependent_PtrToChar pc;
+ M2Dependent_PtrToChar start;
- if (M2LINK_ForcedModuleInitOrder != NULL)
+ if (overrideliborder != NULL)
{
- traceprintf2 (ForceTrace, (const char *) "user forcing order: %s\\n", 24, reinterpret_cast<void *> (M2LINK_ForcedModuleInitOrder));
- pc = M2LINK_ForcedModuleInitOrder;
+ traceprintf2 (ForceTrace, (const char *) "user forcing order: %s\\n", 24, overrideliborder);
+ pc = static_cast<M2Dependent_PtrToChar> (overrideliborder);
start = pc;
len = 0;
modname = NULL;
@@ -1123,7 +1121,7 @@ static bool equal (void * cstr, const char *str_, unsigned int _str_high)
/* make a local copy of each unbounded array. */
memcpy (str, str_, _str_high+1);
- return (strncmp (reinterpret_cast<M2LINK_PtrToChar> (cstr), reinterpret_cast<M2LINK_PtrToChar> (&str), StrLib_StrLen ((const char *) str, _str_high))) == 0;
+ return (strncmp (reinterpret_cast<M2Dependent_PtrToChar> (cstr), reinterpret_cast<M2Dependent_PtrToChar> (&str), StrLib_StrLen ((const char *) str, _str_high))) == 0;
/* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
}
@@ -1239,6 +1237,7 @@ static void Init (void)
{
Modules.array[state-M2Dependent_unregistered] = NULL;
}
+ DynamicInitialization = false;
}
@@ -1264,13 +1263,13 @@ static void CheckInitialized (void)
module constructor in turn.
*/
-extern "C" void M2Dependent_ConstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp)
+extern "C" void M2Dependent_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp)
{
M2Dependent_ModuleChain mptr;
- M2Dependent_ArgCVEnvP nulp;
CheckInitialized ();
- traceprintf3 (ModuleTrace, (const char *) "application module: %s [%s]\\n", 29, applicationmodule, libname);
+ DynamicInitialization = true; /* This procedure is only called if we desire dynamic initialization. */
+ traceprintf3 (ModuleTrace, (const char *) "application module: %s [%s]\\n", 29, applicationmodule, libname); /* This procedure is only called if we desire dynamic initialization. */
mptr = LookupModule (M2Dependent_unordered, applicationmodule, libname);
if (mptr != NULL)
{
@@ -1281,7 +1280,7 @@ extern "C" void M2Dependent_ConstructModules (void * applicationmodule, void * l
ResolveDependencies (applicationmodule, libname);
traceprintf (PreTrace, (const char *) "Post resolving dependents\\n", 27);
DumpModuleData (PostTrace);
- ForceDependencies ();
+ ForceDependencies (overrideliborder);
traceprintf (ForceTrace, (const char *) "After user forcing ordering\\n", 29);
DumpModuleData (ForceTrace);
CheckApplication ();
@@ -1366,19 +1365,16 @@ extern "C" void M2Dependent_RegisterModule (void * modulename, void * libname, M
M2Dependent_ModuleChain mptr;
CheckInitialized ();
- if (! M2LINK_StaticInitialization)
+ mptr = LookupModule (M2Dependent_unordered, modulename, libname);
+ if (mptr == NULL)
{
- mptr = LookupModule (M2Dependent_unordered, modulename, libname);
- if (mptr == NULL)
- {
- traceprintf3 (ModuleTrace, (const char *) "module: %s [%s] registering", 27, modulename, libname);
- moveTo (M2Dependent_unordered, CreateModule (modulename, libname, init, fini, dependencies));
- traceprintf (ModuleTrace, (const char *) "\\n", 2);
- }
- else
- {
- warning3 ((const char *) "module: %s [%s] (ignoring duplicate registration)\\n", 51, modulename, libname);
- }
+ traceprintf3 (ModuleTrace, (const char *) "module: %s [%s] registering", 27, modulename, libname);
+ moveTo (M2Dependent_unordered, CreateModule (modulename, libname, init, fini, dependencies));
+ traceprintf (ModuleTrace, (const char *) "\\n", 2);
+ }
+ else
+ {
+ warning3 ((const char *) "module: %s [%s] (ignoring duplicate registration)\\n", 51, modulename, libname);
}
}
@@ -1386,16 +1382,13 @@ extern "C" void M2Dependent_RegisterModule (void * modulename, void * libname, M
/*
RequestDependant - used to specify that modulename is dependant upon
module dependantmodule. It only takes effect
- if we are not using StaticInitialization.
+ if we are using DynamicInitialization.
*/
extern "C" void M2Dependent_RequestDependant (void * modulename, void * libname, void * dependantmodule, void * dependantlibname)
{
CheckInitialized ();
- if (! M2LINK_StaticInitialization)
- {
- PerformRequestDependant (modulename, libname, dependantmodule, dependantlibname);
- }
+ PerformRequestDependant (modulename, libname, dependantmodule, dependantlibname);
}
extern "C" void _M2_M2Dependent_init (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
diff --git a/gcc/m2/mc-boot/GM2Dependent.h b/gcc/m2/mc-boot/GM2Dependent.h
index a26f957..caa49e7 100644
--- a/gcc/m2/mc-boot/GM2Dependent.h
+++ b/gcc/m2/mc-boot/GM2Dependent.h
@@ -54,7 +54,7 @@ typedef struct M2Dependent_ArgCVEnvP_p M2Dependent_ArgCVEnvP;
typedef void (*M2Dependent_ArgCVEnvP_t) (int, void *, void *);
struct M2Dependent_ArgCVEnvP_p { M2Dependent_ArgCVEnvP_t proc; };
-EXTERN void M2Dependent_ConstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
+EXTERN void M2Dependent_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp);
EXTERN void M2Dependent_DeconstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
/*
diff --git a/gcc/m2/mc-boot/GM2LINK.h b/gcc/m2/mc-boot/GM2LINK.h
deleted file mode 100644
index edbcc9c..0000000
--- a/gcc/m2/mc-boot/GM2LINK.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* do not edit automatically generated by mc from M2LINK. */
-/* M2LINK.def defines the linking mode used in Modula-2.
-
-Copyright (C) 2022-2023 Free Software Foundation, Inc.
-Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
-
-This file is part of GNU Modula-2.
-
-GNU Modula-2 is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GNU Modula-2 is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-
-#if !defined (_M2LINK_H)
-# define _M2LINK_H
-
-#include "config.h"
-#include "system.h"
-# ifdef __cplusplus
-extern "C" {
-# endif
-#include <stdbool.h>
-# if !defined (PROC_D)
-# define PROC_D
- typedef void (*PROC_t) (void);
- typedef struct { PROC_t proc; } PROC;
-# endif
-
-
-# if defined (_M2LINK_C)
-# define EXTERN
-# else
-# define EXTERN extern
-# endif
-
-typedef char *M2LINK_PtrToChar;
-
-EXTERN M2LINK_PtrToChar M2LINK_ForcedModuleInitOrder;
-EXTERN bool M2LINK_StaticInitialization;
-# ifdef __cplusplus
-}
-# endif
-
-# undef EXTERN
-#endif
diff --git a/gcc/m2/mc-boot/GM2RTS.cc b/gcc/m2/mc-boot/GM2RTS.cc
index cc3f559..dd04dcd 100644
--- a/gcc/m2/mc-boot/GM2RTS.cc
+++ b/gcc/m2/mc-boot/GM2RTS.cc
@@ -97,7 +97,7 @@ static bool Initialized;
module constructor in turn.
*/
-extern "C" void M2RTS_ConstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
+extern "C" void M2RTS_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp);
/*
DeconstructModules - resolve dependencies and then call each
@@ -435,9 +435,9 @@ static void CheckInitialized (void)
module constructor in turn.
*/
-extern "C" void M2RTS_ConstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp)
+extern "C" void M2RTS_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp)
{
- M2Dependent_ConstructModules (applicationmodule, libname, argc, argv, envp);
+ M2Dependent_ConstructModules (applicationmodule, libname, overrideliborder, argc, argv, envp);
}
diff --git a/gcc/m2/mc-boot/GM2RTS.h b/gcc/m2/mc-boot/GM2RTS.h
index 8d23876..d9acb54 100644
--- a/gcc/m2/mc-boot/GM2RTS.h
+++ b/gcc/m2/mc-boot/GM2RTS.h
@@ -54,7 +54,7 @@ typedef struct M2RTS_ArgCVEnvP_p M2RTS_ArgCVEnvP;
typedef void (*M2RTS_ArgCVEnvP_t) (int, void *, void *);
struct M2RTS_ArgCVEnvP_p { M2RTS_ArgCVEnvP_t proc; };
-EXTERN void M2RTS_ConstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
+EXTERN void M2RTS_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp);
EXTERN void M2RTS_DeconstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
/*
diff --git a/gcc/m2/mc-boot/GRTExceptions.cc b/gcc/m2/mc-boot/GRTExceptions.cc
index 2986aad..15ff094 100644
--- a/gcc/m2/mc-boot/GRTExceptions.cc
+++ b/gcc/m2/mc-boot/GRTExceptions.cc
@@ -1075,7 +1075,6 @@ extern "C" void RTExceptions_PushHandler (RTExceptions_EHBlock e, unsigned int n
extern "C" void RTExceptions_PopHandler (RTExceptions_EHBlock e, unsigned int number)
{
RTExceptions_Handler h;
- RTExceptions_Handler i;
h = findHandler (e, number);
if (h != NULL)
diff --git a/gcc/m2/mc-boot/GRTint.cc b/gcc/m2/mc-boot/GRTint.cc
index d44db63..e8f4bc4 100644
--- a/gcc/m2/mc-boot/GRTint.cc
+++ b/gcc/m2/mc-boot/GRTint.cc
@@ -934,10 +934,6 @@ extern "C" void RTint_Listen (bool untilInterrupt, RTint_DispatchVector call, un
RTint_Vector vec;
Selective_SetOfFd inSet;
Selective_SetOfFd outSet;
- unsigned int b4s;
- unsigned int b4m;
- unsigned int afs;
- unsigned int afm;
unsigned int sec;
unsigned int micro;
int maxFd;
@@ -1001,7 +997,7 @@ extern "C" void RTint_Listen (bool untilInterrupt, RTint_DispatchVector call, un
}
if (((untilInterrupt && (inSet == NULL)) && (outSet == NULL)) && ! found)
{
- M2RTS_Halt ((const char *) "deadlock found, no more processes to run and no interrupts active", 65, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "Listen", 6, 732);
+ M2RTS_Halt ((const char *) "deadlock found, no more processes to run and no interrupts active", 65, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "Listen", 6, 728);
}
/* printf('}
') ; */
diff --git a/gcc/m2/mc-boot/GSFIO.cc b/gcc/m2/mc-boot/GSFIO.cc
index 43be478..50ed65b 100644
--- a/gcc/m2/mc-boot/GSFIO.cc
+++ b/gcc/m2/mc-boot/GSFIO.cc
@@ -190,7 +190,6 @@ extern "C" DynamicStrings_String SFIO_WriteS (FIO_File file, DynamicStrings_Stri
extern "C" DynamicStrings_String SFIO_ReadS (FIO_File file)
{
DynamicStrings_String s;
- unsigned int c;
s = DynamicStrings_InitString ((const char *) "", 0);
while (((! (FIO_EOLN (file))) && (! (FIO_EOF (file)))) && (FIO_IsNoError (file)))
diff --git a/gcc/m2/mc-boot/GStringConvert.cc b/gcc/m2/mc-boot/GStringConvert.cc
index f369660..123fd49 100644
--- a/gcc/m2/mc-boot/GStringConvert.cc
+++ b/gcc/m2/mc-boot/GStringConvert.cc
@@ -770,8 +770,6 @@ static DynamicStrings_String doDecimalPlaces (DynamicStrings_String s, unsigned
int l;
int point;
DynamicStrings_String t;
- DynamicStrings_String whole;
- DynamicStrings_String fraction;
DynamicStrings_String tenths;
DynamicStrings_String hundreths;
@@ -1917,7 +1915,7 @@ extern "C" DynamicStrings_String StringConvert_ToSigFig (DynamicStrings_String s
int point;
unsigned int poTen;
- Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/StringConvert.mod", 54, 1222, (const char *) "ToSigFig", 8);
+ Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/StringConvert.mod", 54, 1220, (const char *) "ToSigFig", 8);
point = DynamicStrings_Index (s, '.', 0);
if (point < 0)
{
diff --git a/gcc/m2/mc-boot/Gdecl.cc b/gcc/m2/mc-boot/Gdecl.cc
index 21949b3..72acd82 100644
--- a/gcc/m2/mc-boot/Gdecl.cc
+++ b/gcc/m2/mc-boot/Gdecl.cc
@@ -1028,7 +1028,7 @@ extern "C" void SYSTEM_ShiftRight (unsigned int *s, unsigned int _s_high, unsign
extern "C" void SYSTEM_RotateVal (unsigned int *s, unsigned int _s_high, unsigned int *d, unsigned int _d_high, unsigned int SetSizeInBits, int RotateCount);
extern "C" void SYSTEM_RotateLeft (unsigned int *s, unsigned int _s_high, unsigned int *d, unsigned int _d_high, unsigned int SetSizeInBits, unsigned int RotateCount);
extern "C" void SYSTEM_RotateRight (unsigned int *s, unsigned int _s_high, unsigned int *d, unsigned int _d_high, unsigned int SetSizeInBits, unsigned int RotateCount);
-extern "C" void M2RTS_ConstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
+extern "C" void M2RTS_ConstructModules (void * applicationmodule, void * libname, void * overrideliborder, int argc, void * argv, void * envp);
extern "C" void M2RTS_DeconstructModules (void * applicationmodule, void * libname, int argc, void * argv, void * envp);
extern "C" void M2RTS_RegisterModule (void * name, void * libname, M2RTS_ArgCVEnvP init, M2RTS_ArgCVEnvP fini, PROC dependencies);
extern "C" void M2RTS_RequestDependant (void * modulename, void * libname, void * dependantmodule, void * dependantlibname);