}
EXTERN
+time_t
+libc_time (time_t *buf)
+{
+ return time (buf);
+}
+
+EXTERN
+void *
+libc_localtime (time_t *epochtime)
+{
+ return localtime (epochtime);
+}
+
+EXTERN
int
libc_printf (char *_format, unsigned int _format_high, ...)
{
(*c).next->contents.next = NULL;
ConcatContents (&(*c).next->contents, (const char *) a, _a_high, h, o);
AddDebugInfo ((*c).next);
- (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 722, (const char *) "ConcatContents", 14);
+ (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 722, (const char *) "ConcatContents", 14);
}
else
{
AddDebugInfo ((*c).next);
if (TraceOn)
{
- (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 917, (const char *) "ConcatContentsAddress", 21);
+ (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 917, (const char *) "ConcatContentsAddress", 21);
}
}
else
AddDebugInfo (s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 758, (const char *) "InitString", 10);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 758, (const char *) "InitString", 10);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
AddDebugInfo (s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 957, (const char *) "InitStringCharStar", 18);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 957, (const char *) "InitStringCharStar", 18);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_InitString ((const char *) &a.array[0], 1);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 977, (const char *) "InitStringChar", 14);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 977, (const char *) "InitStringChar", 14);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Assign (DynamicStrings_InitString ((const char *) "", 0), s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1173, (const char *) "Dup", 3);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1173, (const char *) "Dup", 3);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
a = DynamicStrings_ConCat (DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "", 0), a), b);
if (TraceOn)
{
- a = AssignDebug (a, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1193, (const char *) "Add", 3);
+ a = AssignDebug (a, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1193, (const char *) "Add", 3);
}
return a;
/* static analysis guarentees a RETURN statement will be used before here. */
t = DynamicStrings_InitStringCharStar (a);
if (TraceOn)
{
- t = AssignDebug (t, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1258, (const char *) "EqualCharStar", 13);
+ t = AssignDebug (t, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1258, (const char *) "EqualCharStar", 13);
}
t = AddToGarbage (t, s);
if (DynamicStrings_Equal (t, s))
t = DynamicStrings_InitString ((const char *) a, _a_high);
if (TraceOn)
{
- t = AssignDebug (t, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1288, (const char *) "EqualArray", 10);
+ t = AssignDebug (t, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1288, (const char *) "EqualArray", 10);
}
t = AddToGarbage (t, s);
if (DynamicStrings_Equal (t, s))
}
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1320, (const char *) "Mult", 4);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1320, (const char *) "Mult", 4);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
AddDebugInfo (t->contents.next);
if (TraceOn)
{
- t->contents.next = AssignDebug (t->contents.next, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1388, (const char *) "Slice", 5);
+ t->contents.next = AssignDebug (t->contents.next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1388, (const char *) "Slice", 5);
}
}
t = t->contents.next;
}
if (TraceOn)
{
- d = AssignDebug (d, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1405, (const char *) "Slice", 5);
+ d = AssignDebug (d, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1405, (const char *) "Slice", 5);
}
return d;
/* static analysis guarentees a RETURN statement will be used before here. */
}
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1517, (const char *) "RemoveComment", 13);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1517, (const char *) "RemoveComment", 13);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Slice (s, (int ) (i), 0);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1629, (const char *) "RemoveWhitePrefix", 17);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1629, (const char *) "RemoveWhitePrefix", 17);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Slice (s, 0, i+1);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 1651, (const char *) "RemoveWhitePostfix", 18);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1651, (const char *) "RemoveWhitePostfix", 18);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
{
stop ();
/* writeString ("mismatched number of PopAllocation's compared to PushAllocation's") */
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/DynamicStrings.mod", 62, 176, (const char *) "PopAllocationExemption", 22, (const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 176, (const char *) "PopAllocationExemption", 22, (const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65);
}
else
{
return f; /* create new slot */
}
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/FIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
__builtin_unreachable ();
}
extern "C" void FIO_ReadAny (FIO_File f, unsigned char *a, unsigned int _a_high)
{
CheckAccess (f, FIO_openedforread, FALSE);
- if ((BufferedRead (f, _a_high, a)) == _a_high)
+ if ((BufferedRead (f, _a_high, a)) == ((int ) (_a_high)))
{
SetEndOfLine (f, static_cast<char> (a[_a_high]));
}
extern "C" void FIO_WriteAny (FIO_File f, unsigned char *a, unsigned int _a_high)
{
CheckAccess (f, FIO_openedforwrite, TRUE);
- if ((BufferedWrite (f, _a_high, a)) == _a_high)
+ if ((BufferedWrite (f, _a_high, a)) == ((int ) (_a_high)))
{} /* empty. */
}
extern "C" void FIO_WriteChar (FIO_File f, char ch)
{
CheckAccess (f, FIO_openedforwrite, TRUE);
- if ((BufferedWrite (f, sizeof (ch), &ch)) == sizeof (ch))
+ if ((BufferedWrite (f, sizeof (ch), &ch)) == ((int ) (sizeof (ch))))
{} /* empty. */
}
char ch;
CheckAccess (f, FIO_openedforread, FALSE);
- if ((BufferedRead (f, sizeof (ch), &ch)) == sizeof (ch))
+ if ((BufferedRead (f, sizeof (ch), &ch)) == ((int ) (sizeof (ch))))
{
SetEndOfLine (f, ch);
return ch;
return fd->name.address;
}
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/FIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
__builtin_unreachable ();
}
return fd->name.size;
}
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/FIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
__builtin_unreachable ();
}
int prevpos;
DynamicStrings_String result;
- if ((startpos == (DynamicStrings_Length (fmt))) || (startpos < 0))
+ if ((startpos == ((int ) (DynamicStrings_Length (fmt)))) || (startpos < 0))
{
return s;
}
{
return (n >= i->Low) && (n <= i->High);
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/Indexing.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/Indexing.def", 20, 1);
__builtin_unreachable ();
}
{
return i->High;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/Indexing.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/Indexing.def", 20, 1);
__builtin_unreachable ();
}
{
return i->Low;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/Indexing.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/Indexing.def", 20, 1);
__builtin_unreachable ();
}
static void ForceDependencies (void);
/*
+ CheckApplication - check to see that the application is the last entry in the list.
+ This might happen if the application only imports FOR C modules.
+*/
+
+static void CheckApplication (void);
+
+/*
equal - return TRUE if C string cstr is equal to str.
*/
static void DisplayModuleInfo (M2Dependent_DependencyState state, const char *name_, unsigned int _name_high)
{
M2Dependent_ModuleChain mptr;
+ unsigned int count;
char name[_name_high+1];
/* make a local copy of each unbounded array. */
{
libc_printf ((const char *) "%s modules\\n", 12, &name);
mptr = Modules.array[state-M2Dependent_unregistered];
+ count = 0;
do {
- libc_printf ((const char *) " %s", 4, mptr->name);
+ libc_printf ((const char *) " %d %s", 8, count, mptr->name);
+ count += 1;
if (mptr->dependency.appl)
{
libc_printf ((const char *) " application", 12);
/*
+ CheckApplication - check to see that the application is the last entry in the list.
+ This might happen if the application only imports FOR C modules.
+*/
+
+static void CheckApplication (void)
+{
+ M2Dependent_ModuleChain mptr;
+ M2Dependent_ModuleChain appl;
+
+ mptr = Modules.array[M2Dependent_ordered-M2Dependent_unregistered];
+ if (mptr != NULL)
+ {
+ appl = NULL;
+ do {
+ if (mptr->dependency.appl)
+ {
+ appl = mptr;
+ }
+ else
+ {
+ mptr = mptr->next;
+ }
+ } while (! ((appl != NULL) || (mptr == Modules.array[M2Dependent_ordered-M2Dependent_unregistered])));
+ if (appl != NULL)
+ {
+ Modules.array[M2Dependent_ordered-M2Dependent_unregistered] = appl->next;
+ }
+ }
+}
+
+
+/*
equal - return TRUE if C string cstr is equal to str.
*/
ForceDependencies ();
traceprintf (ForceTrace, (const char *) "After user forcing ordering\\n", 29);
DumpModuleData (ForceTrace);
+ CheckApplication ();
+ traceprintf (ForceTrace, (const char *) "After runtime forces application to the end\\n", 45);
+ DumpModuleData (ForceTrace);
if (Modules.array[M2Dependent_ordered-M2Dependent_unregistered] == NULL)
{
traceprintf2 (ModuleTrace, (const char *) " module: %s has not registered itself using a global constructor\\n", 67, applicationmodule);
n = RTExceptions_GetNumber (e);
if (n == (UINT_MAX))
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (reinterpret_cast<const void*>("M2Exception")), const_cast<void*> (reinterpret_cast<const void*>("current coroutine is not in the exceptional execution state")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (reinterpret_cast<const void*>("M2Exception")), const_cast<void*> (reinterpret_cast<const void*>("current coroutine is not in the exceptional execution state")));
}
else
{
return (M2EXCEPTION_M2Exceptions) (n);
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/M2EXCEPTION.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/M2EXCEPTION.def", 25, 1);
__builtin_unreachable ();
}
}
else
{
- Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, 150, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/PushBackInput.mod", 61);
+ Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, 150, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
return ch;
/* static analysis guarentees a RETURN statement will be used before here. */
l -= 1;
if ((PushBackInput_PutCh (a[l])) != a[l])
{
- Debug_Halt ((const char *) "assert failed", 13, 132, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/PushBackInput.mod", 61);
+ Debug_Halt ((const char *) "assert failed", 13, 132, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
}
}
i -= 1;
if ((PushBackInput_PutCh (DynamicStrings_char (s, static_cast<int> (i)))) != (DynamicStrings_char (s, static_cast<int> (i))))
{
- Debug_Halt ((const char *) "assert failed", 13, 113, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/PushBackInput.mod", 61);
+ Debug_Halt ((const char *) "assert failed", 13, 113, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
}
}
static void indexf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 612, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 612, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
}
static void range (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 624, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 624, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
}
static void casef (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 636, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 636, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
}
static void invalidloc (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 648, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 648, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
}
static void function (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 660, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 660, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
}
static void wholevalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 672, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 672, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
static void wholediv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 684, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 684, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
static void realvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 696, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 696, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
}
static void realdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 708, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 708, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
}
static void complexvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 720, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 720, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
}
static void complexdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 732, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 732, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
}
static void protection (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 744, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 744, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
}
static void systemf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 756, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 756, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
}
static void coroutine (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 768, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 768, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
}
static void exception (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod")), 780, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 780, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
}
{
if (currentEHB == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.mod", 60, 598, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 598, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
}
else
{
return currentEHB;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTExceptions.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.def", 25, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.def", 25, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
v = v->pending;
RTco_signal (lock);
return v->no;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
v = FindVectorNo (vec);
if (v == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.mod", 53, 286, (const char *) "ReArmTimeVector", 15, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 286, (const char *) "ReArmTimeVector", 15, (const char *) "cannot find vector supplied", 27);
}
else
{
v = FindVectorNo (vec);
if (v == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.mod", 53, 312, (const char *) "GetTimeVector", 13, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 312, (const char *) "GetTimeVector", 13, (const char *) "cannot find vector supplied", 27);
}
else
{
v = FindVectorNo (vec);
if (v == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.mod", 53, 339, (const char *) "AttachVector", 12, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 339, (const char *) "AttachVector", 12, (const char *) "cannot find vector supplied", 27);
}
else
{
RTco_signal (lock);
return l;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
v = FindVectorNo (vec);
if (v == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.mod", 53, 372, (const char *) "IncludeVector", 13, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 372, (const char *) "IncludeVector", 13, (const char *) "cannot find vector supplied", 27);
}
else
{
v = FindPendingVector (vec);
if (v == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.mod", 53, 415, (const char *) "ExcludeVector", 13, (const char *) "cannot find pending vector supplied", 35);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 415, (const char *) "ExcludeVector", 13, (const char *) "cannot find pending vector supplied", 35);
}
else
{
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.def", 25, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
v = v->pending;
}
if (((untilInterrupt && (i == NULL)) && (o == NULL)) && ! found)
{
- M2RTS_Halt ((const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/RTint.mod", 53, 731, (const char *) "Listen", 6, (const char *) "deadlock found, no more processes to run and no interrupts active", 65);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 731, (const char *) "Listen", 6, (const char *) "deadlock found, no more processes to run and no interrupts active", 65);
}
/* printf('}
') ; */
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/StdIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/StdIO.def", 25, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/gm2-libs/StdIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/StdIO.def", 25, 1);
__builtin_unreachable ();
}
int point;
unsigned int poTen;
- Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/StringConvert.mod", 61, 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, 1222, (const char *) "ToSigFig", 8);
point = DynamicStrings_Index (s, '.', 0);
if (point < 0)
{
{
int point;
- Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/StringConvert.mod", 61, 1069, (const char *) "ToDecimalPlaces", 15);
+ Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/StringConvert.mod", 54, 1069, (const char *) "ToDecimalPlaces", 15);
point = DynamicStrings_Index (s, '.', 0);
if (point < 0)
{
(*a) = libc_malloc (static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 50, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/SysStorage.mod", 58);
+ Debug_Halt ((const char *) "out of memory error", 19, 50, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
if (enableTrace && trace)
{
}
if ((libc_memset ((*a), 0, static_cast<size_t> (size))) != (*a))
{
- Debug_Halt ((const char *) "memset should have returned the first parameter", 47, 76, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/SysStorage.mod", 58);
+ Debug_Halt ((const char *) "memset should have returned the first parameter", 47, 76, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
}
if (enableDeallocation)
(*a) = libc_realloc ((*a), static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 119, (const char *) "../../gcc-git-devel-modula2/gcc/m2/gm2-libs/SysStorage.mod", 58);
+ Debug_Halt ((const char *) "out of memory error", 19, 119, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
if (enableTrace && trace)
{
typedef unsigned int FIO_File;
extern FIO_File FIO_StdOut;
+# define symbolKey_NulKey NULL
typedef struct symbolKey_performOperation_p symbolKey_performOperation;
# define ASCII_tab ASCII_ht
# define SYSTEM_BYTESPERWORD 4
typedef struct M2RTS_ArgCVEnvP_p M2RTS_ArgCVEnvP;
-# define symbolKey_NulKey NULL
typedef struct symbolKey_isSymbol_p symbolKey_isSymbol;
# define ASCII_nul (char) 000
typedef struct wlists__T9_r wlists__T9;
-typedef struct mcPretty__T12_r mcPretty__T12;
-
typedef struct DynamicStrings_Contents_r DynamicStrings_Contents;
typedef struct DynamicStrings__T7_a DynamicStrings__T7;
+typedef struct mcPretty__T12_r mcPretty__T12;
+
typedef struct wlists__T10_a wlists__T10;
typedef Indexing__T5 *Indexing_Index;
wlists_wlist next;
};
+struct DynamicStrings_Contents_r {
+ DynamicStrings__T7 buf;
+ unsigned int len;
+ DynamicStrings_String next;
+ };
+
struct mcPretty__T12_r {
mcPretty_writeProc write_;
mcPretty_writeLnProc writeln;
mcPretty_pretty stacked;
};
-struct DynamicStrings_Contents_r {
- DynamicStrings__T7 buf;
- unsigned int len;
- DynamicStrings_String next;
- };
-
typedef struct DynamicStrings_descriptor_r DynamicStrings_descriptor;
typedef DynamicStrings_descriptor *DynamicStrings_Descriptor;
d->at.firstUsed = 0;
return d;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
switch (f->kind)
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
if (tag != nameKey_NulName)
{
/* avoid gcc warning by using compound statement even if not strictly necessary. */
- if ((symbolKey_getSymKey (r->recordF.localSymbols, tag)) == nameKey_NulName)
+ if ((symbolKey_getSymKey (r->recordF.localSymbols, tag)) == symbolKey_NulKey)
{
symbolKey_putSymKey (r->recordF.localSymbols, tag, reinterpret_cast<void *> (n));
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* fill in, n. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return n;
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return TRUE;
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
return s;
}
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return c;
}
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1); /* finish the cacading elsif statement. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1); /* finish the cacading elsif statement. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
mcPretty_setNeedSpace (p);
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
outText (p, (const char *) ";", 1);
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
if (n != NULL)
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
mcPretty_setNeedSpace (p);
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return n;
__builtin_unreachable ();
break;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
importEnumFields (m, n);
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
M2RTS_HALT (-1); /* most likely op needs a clause as above. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1); /* most likely op needs a clause as above. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
closeOutput ();
return TRUE;
}
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/keyc.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/keyc.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/mcComment.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/mcComment.def", 20, 1);
__builtin_unreachable ();
}
if (cd->used)
}
mcflex_mcError (DynamicStrings_string (DynamicStrings_InitString ((const char *) "failed to find module name", 26)));
libc_exit (1);
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/mcComp.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcComp.def", 20, 1);
__builtin_unreachable ();
}
mcPrintf_fprintf1 (FIO_StdErr, (const char *) "failed to open %s\\n", 19, (const unsigned char *) &s, (sizeof (s)-1));
libc_exit (1);
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/mcComp.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcComp.def", 20, 1);
__builtin_unreachable ();
}
{
if (! q)
{
- mcError_internalError ((const char *) "assert failed", 13, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/mcDebug.mod", 49, 35);
+ mcError_internalError ((const char *) "assert failed", 13, (const char *) "../../gcc-read-write/gcc/m2/mc/mcDebug.mod", 42, 35);
}
}
s = DynamicStrings_ConCatChar (s, '^');
s = SFIO_WriteS (FIO_StdOut, s);
FIO_WriteLine (FIO_StdOut);
- mcError_internalError ((const char *) m, _m_high, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/mcMetaError.mod", 53, 97);
+ mcError_internalError ((const char *) m, _m_high, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 97);
}
{
if (a != b)
{
- mcError_internalError ((const char *) "different string returned", 25, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/mcMetaError.mod", 53, 109);
+ mcError_internalError ((const char *) "different string returned", 25, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 109);
}
return a;
/* static analysis guarentees a RETURN statement will be used before here. */
case mcMetaError_chained:
if (e == NULL)
{
- mcError_internalError ((const char *) "should not be chaining an error onto an empty error note", 56, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/mcMetaError.mod", 53, 355);
+ mcError_internalError ((const char *) "should not be chaining an error onto an empty error note", 56, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 355);
}
else
{
default:
- mcError_internalError ((const char *) "unexpected enumeration value", 28, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/mcMetaError.mod", 53, 369);
+ mcError_internalError ((const char *) "unexpected enumeration value", 28, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 369);
break;
}
return e;
# include "GFIO.h"
# include "GSFIO.h"
-# define YEAR "2021"
static unsigned int langC;
static unsigned int langCPP;
static unsigned int langM2;
extern "C" void mcOptions_writeGPLheader (FIO_File f);
/*
+ getYear - return the year.
+*/
+
+static unsigned int getYear (void);
+
+/*
displayVersion - displays the version of the compiler.
*/
/*
+ getYear - return the year.
+*/
+
+static unsigned int getYear (void)
+{
+ libc_time_t epoch;
+ libc_ptrToTM localTime;
+
+ epoch = libc_time (NULL);
+ localTime = static_cast<libc_ptrToTM> (libc_localtime (&epoch));
+ return localTime->tm_year+1900;
+ /* static analysis guarentees a RETURN statement will be used before here. */
+ __builtin_unreachable ();
+}
+
+
+/*
displayVersion - displays the version of the compiler.
*/
static void displayVersion (unsigned int mustExit)
{
- mcPrintf_printf0 ((const char *) "Copyright (C) ''2021'' Free Software Foundation, Inc.\\n", 55);
- mcPrintf_printf0 ((const char *) "License GPLv2: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\\n", 78);
+ unsigned int year;
+
+ year = getYear ();
+ mcPrintf_printf1 ((const char *) "Copyright (C) %d Free Software Foundation, Inc.\\n", 49, (const unsigned char *) &year, (sizeof (year)-1));
+ mcPrintf_printf0 ((const char *) "License GPLv3: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\\n", 78);
mcPrintf_printf0 ((const char *) "This is free software: you are free to change and redistribute it.\\n", 68);
mcPrintf_printf0 ((const char *) "There is NO WARRANTY, to the extent permitted by law.\\n", 55);
if (mustExit)
static void gplBody (FIO_File f)
{
- comment (f, (const char *) "Copyright (C) ''2021'' Free Software Foundation, Inc.", 53);
+ unsigned int year;
+
+ year = getYear ();
+ mcPrintf_printf1 ((const char *) "Copyright (C) %d Free Software Foundation, Inc.\\n", 49, (const unsigned char *) &year, (sizeof (year)-1));
if (contributed)
{
FIO_WriteString (f, (const char *) "Contributed by ", 15);
static void glplBody (FIO_File f)
{
- comment (f, (const char *) "Copyright (C) ''2021'' Free Software Foundation, Inc.", 53);
+ unsigned int year;
+
+ year = getYear ();
+ mcPrintf_printf1 ((const char *) "Copyright (C) %d Free Software Foundation, Inc.\\n", 49, (const unsigned char *) &year, (sizeof (year)-1));
if (contributed)
{
FIO_WriteString (f, (const char *) "Contributed by ", 15);
Indexing_DeleteIndice (s->list, Indexing_HighIndice (s->list));
return a;
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/mcStack.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcStack.def", 20, 1);
__builtin_unreachable ();
}
{
return Indexing_GetIndice (s->list, i);
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/mcStack.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcStack.def", 20, 1);
__builtin_unreachable ();
}
(*p) = ASCII_nul;
return doMakeKey (n, higha);
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/nameKey.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/nameKey.def", 20, 1);
__builtin_unreachable ();
}
return doMakeKey (n, higha);
}
}
- ReturnException ("../../gcc-git-devel-modula2/gcc/m2/mc/nameKey.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/nameKey.def", 20, 1);
__builtin_unreachable ();
}
(*father) = t;
if (t == NULL)
{
- Debug_Halt ((const char *) "parameter t should never be NIL", 31, 203, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/symbolKey.mod", 51);
+ Debug_Halt ((const char *) "parameter t should never be NIL", 31, 203, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
}
(*child) = t->left;
if ((*child) != NULL)
}
else
{
- Debug_Halt ((const char *) "symbol already stored", 21, 119, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/symbolKey.mod", 51);
+ Debug_Halt ((const char *) "symbol already stored", 21, 119, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
}
}
}
else
{
- Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, 186, (const char *) "../../gcc-git-devel-modula2/gcc/m2/mc/symbolKey.mod", 51);
+ Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, 186, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
}
}
IMPLEMENTATION MODULE decl ; (*!m2pim*)
FROM ASCII IMPORT lf, tab ;
-FROM symbolKey IMPORT symbolTree, initTree, getSymKey, putSymKey, foreachNodeDo ;
+FROM symbolKey IMPORT NulKey, symbolTree, initTree, getSymKey, putSymKey, foreachNodeDo ;
FROM mcDebug IMPORT assert ;
FROM Storage IMPORT ALLOCATE, DEALLOCATE ;
FROM nameKey IMPORT NulName, makeKey, lengthKey, makekey, keyToCharStar ;
(* ensure that field, n, is in the parents Local Symbols. *)
IF tag#NulName
THEN
- IF getSymKey (recordF.localSymbols, tag) = NulName
+ IF getSymKey (recordF.localSymbols, tag) = NulKey
THEN
putSymKey (recordF.localSymbols, tag, n)
ELSE
FROM SArgs IMPORT GetArg, Narg ;
FROM mcSearch IMPORT prependSearchPath ;
-FROM libc IMPORT exit, printf ;
-FROM mcPrintf IMPORT printf0 ;
+FROM libc IMPORT exit, printf, time, localtime, time_t, ptrToTM ;
+FROM mcPrintf IMPORT printf0, printf1 ;
FROM Debug IMPORT Halt ;
FROM StrLib IMPORT StrLen ;
FROM decl IMPORT setLangC, setLangCP, setLangM2 ;
IMPORT FIO ;
IMPORT SFIO ;
-CONST
- YEAR = '2023' ;
-
VAR
langC,
langCPP,
cppProgram : String ;
+
+(*
+ getYear - return the year.
+*)
+
+PROCEDURE getYear () : CARDINAL ;
+VAR
+ epoch : time_t ;
+ localTime: ptrToTM ;
+BEGIN
+ epoch := time (NIL) ;
+ localTime := localtime (epoch) ;
+ RETURN localTime^.tm_year + 1900
+END getYear ;
+
+
(*
displayVersion - displays the version of the compiler.
*)
PROCEDURE displayVersion (mustExit: BOOLEAN) ;
+VAR
+ year: CARDINAL ;
BEGIN
- printf0 ('Copyright (C) ' + YEAR + ' Free Software Foundation, Inc.\n') ;
+ year := getYear () ;
+ printf1 ('Copyright (C) %d Free Software Foundation, Inc.\n', year) ;
printf0 ('License GPLv3: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n') ;
printf0 ('This is free software: you are free to change and redistribute it.\n') ;
printf0 ('There is NO WARRANTY, to the extent permitted by law.\n') ;
*)
PROCEDURE gplBody (f: File) ;
+VAR
+ year: CARDINAL ;
BEGIN
- comment (f, 'Copyright (C) ' + YEAR + ' Free Software Foundation, Inc.') ;
+ year := getYear () ;
+ printf1 ('Copyright (C) %d Free Software Foundation, Inc.\n', year) ;
IF contributed
THEN
FIO.WriteString (f, "Contributed by ") ;
*)
PROCEDURE glplBody (f: File) ;
+VAR
+ year: CARDINAL ;
BEGIN
- comment (f, 'Copyright (C) ' + YEAR + ' Free Software Foundation, Inc.') ;
+ year := getYear () ;
+ printf1 ('Copyright (C) %d Free Software Foundation, Inc.\n', year) ;
IF contributed
THEN
FIO.WriteString (f, "Contributed by ") ;