New version, with an option for strict Modula-2, and

warnings for unused or uninitialized variables
This commit is contained in:
ceriel
1987-10-19 11:28:37 +00:00
parent a9ac8e4f0a
commit 1082e61bd7
21 changed files with 341 additions and 196 deletions

View File

@@ -15,6 +15,7 @@
#include <em_label.h>
#include <alloc.h>
#include "strict3rd.h"
#include "type.h"
#include "main.h"
#include "warning.h"
@@ -44,6 +45,9 @@ DoOption(text)
case 'n': /* no register messages */
case 'x': /* every name global */
case 's': /* symmetric: MIN(INTEGER) = -MAX(INTEGER) */
#ifndef STRICT_3RD_ED
case '3': /* strict 3rd edition Modula-2 */
#endif
options[text[-1]]++;
break;
@@ -64,9 +68,11 @@ DoOption(text)
if (*text) {
while (*text) {
switch(*text++) {
#ifndef STRICT_3RD_ED
case 'O':
warning_classes &= ~W_OLDFASHIONED;
break;
#endif
case 'R':
warning_classes &= ~W_STRICT;
break;
@@ -83,9 +89,11 @@ DoOption(text)
if (*text) {
while (*text) {
switch(*text++) {
#ifndef STRICT_3RD_ED
case 'O':
warning_classes |= W_OLDFASHIONED;
break;
#endif
case 'R':
warning_classes |= W_STRICT;
break;