+void CheckAssertions (void)
+/* Check all assertions and evaluate the ones we can evaluate here. */
+{
+ unsigned I;
+
+ /* Get the number of assertions */
+ unsigned Count = CollCount (&Assertions);
+
+ /* Check the assertions */
+ for (I = 0; I < Count; ++I) {
+
+ /* Get the next assertion */
+ Assertion* A = CollAtUnchecked (&Assertions, I);
+
+ /* Can we evaluate the expression? */
+ long Val;
+ if (IsConstExpr (A->Expr, &Val) && Val == 0) {
+ /* Apply the action */
+ const char* Msg = GetString (A->Msg);
+ switch (A->Action) {
+
+ case ASSERT_ACT_WARN:
+ PWarning (&A->Pos, 0, "%s", Msg);
+ break;
+
+ case ASSERT_ACT_ERROR:
+ PError (&A->Pos, "%s", Msg);
+ break;
+
+ default:
+ Internal ("Illegal assert action specifier");
+ break;
+ }
+ }
+ }
+}
+
+
+