Skip to content

Commit 916f17c

Browse files
committed
WI #1267 Use Warning instead of Error for premature PERFORM exit
1 parent bcb9138 commit 916f17c

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

TypeCobol.Analysis.Test/BasicCfgInstrs/IX105A.diag

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,38 @@ Line 421[12,47] <37, Warning, General> - Warning: "end-if" is missing
1212
Line 423[12,46] <37, Warning, General> - Warning: "end-if" is missing
1313
Line 436[12,47] <37, Warning, General> - Warning: "end-if" is missing
1414
Line 437[12,42] <37, Warning, General> - Warning: "end-if" is missing
15-
Line 455[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 485, column 15 prevents this PERFORM statement to reach its exit.
16-
Line 456[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 478, column 15 prevents this PERFORM statement to reach its exit.
17-
Line 457[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 485, column 15 prevents this PERFORM statement to reach its exit.
18-
Line 458[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 478, column 15 prevents this PERFORM statement to reach its exit.
19-
Line 459[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 485, column 15 prevents this PERFORM statement to reach its exit.
20-
Line 460[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 478, column 15 prevents this PERFORM statement to reach its exit.
15+
Line 455[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 485, column 15 prevents this PERFORM statement to reach its exit.
16+
Line 456[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 478, column 15 prevents this PERFORM statement to reach its exit.
17+
Line 457[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 485, column 15 prevents this PERFORM statement to reach its exit.
18+
Line 458[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 478, column 15 prevents this PERFORM statement to reach its exit.
19+
Line 459[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 485, column 15 prevents this PERFORM statement to reach its exit.
20+
Line 460[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-01-FAIL' located at line 478, column 15 prevents this PERFORM statement to reach its exit.
2121
Line 461[12,37] <37, Warning, General> - Warning: "end-if" is missing
2222
Line 507[12,40] <37, Warning, General> - Warning: "end-if" is missing
2323
Line 511[12,33] <37, Warning, General> - Warning: "end-if" is missing
2424
Line 546[12,42] <37, Warning, General> - Warning: "end-if" is missing
2525
Line 573[12,46] <37, Warning, General> - Warning: "end-if" is missing
2626
Line 578[12,36] <37, Warning, General> - Warning: "end-if" is missing
27-
Line 600[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 630, column 15 prevents this PERFORM statement to reach its exit.
28-
Line 601[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 623, column 15 prevents this PERFORM statement to reach its exit.
29-
Line 602[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 630, column 15 prevents this PERFORM statement to reach its exit.
30-
Line 603[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 623, column 15 prevents this PERFORM statement to reach its exit.
31-
Line 604[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 630, column 15 prevents this PERFORM statement to reach its exit.
32-
Line 605[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 623, column 15 prevents this PERFORM statement to reach its exit.
27+
Line 600[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 630, column 15 prevents this PERFORM statement to reach its exit.
28+
Line 601[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 623, column 15 prevents this PERFORM statement to reach its exit.
29+
Line 602[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 630, column 15 prevents this PERFORM statement to reach its exit.
30+
Line 603[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 623, column 15 prevents this PERFORM statement to reach its exit.
31+
Line 604[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 630, column 15 prevents this PERFORM statement to reach its exit.
32+
Line 605[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-02-FAIL' located at line 623, column 15 prevents this PERFORM statement to reach its exit.
3333
Line 606[12,37] <37, Warning, General> - Warning: "end-if" is missing
3434
Line 651[12,40] <37, Warning, General> - Warning: "end-if" is missing
3535
Line 655[12,33] <37, Warning, General> - Warning: "end-if" is missing
3636
Line 686[12,42] <37, Warning, General> - Warning: "end-if" is missing
3737
Line 711[12,42] <37, Warning, General> - Warning: "end-if" is missing
3838
Line 716[15,39] <37, Warning, General> - Warning: "end-if" is missing
39-
Line 738[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
40-
Line 739[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
41-
Line 740[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
42-
Line 741[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
43-
Line 742[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
44-
Line 743[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
45-
Line 744[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
46-
Line 745[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
39+
Line 738[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
40+
Line 739[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
41+
Line 740[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
42+
Line 741[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
43+
Line 742[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
44+
Line 743[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
45+
Line 744[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 770, column 15 prevents this PERFORM statement to reach its exit.
46+
Line 745[12,12] <37, Warning, General> - Warning: Statement ' GO TO WRITE-TEST-GF-03-FAIL' located at line 763, column 15 prevents this PERFORM statement to reach its exit.
4747
Line 746[12,37] <37, Warning, General> - Warning: "end-if" is missing
4848
Line 794[12,39] <37, Warning, General> - Warning: "end-if" is missing
4949
Line 801[12,42] <37, Warning, General> - Warning: "end-if" is missing
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
--- Diagnostics ---
2-
Line 4[12,12] <30, Error, Semantics> - Semantic error: Statement ' go to b' located at line 10, column 12 prevents this PERFORM statement to reach its exit.
2+
Line 4[12,12] <37, Warning, General> - Warning: Statement ' go to b' located at line 10, column 12 prevents this PERFORM statement to reach its exit.

TypeCobol.Analysis.Test/BasicCfgInstrs/SG102A.diag

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ Line 380[12,16] <37, Warning, General> - Warning: ALTER should not be used
2424
Line 397[12,16] <37, Warning, General> - Warning: ALTER should not be used
2525
Line 407[12,40] <37, Warning, General> - Warning: "end-if" is missing
2626
Line 411[12,16] <37, Warning, General> - Warning: ALTER should not be used
27-
Line 426[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO TEST-5A' located at line 597, column 12 prevents this PERFORM statement to reach its exit.
27+
Line 426[12,12] <37, Warning, General> - Warning: Statement ' GO TO TEST-5A' located at line 597, column 12 prevents this PERFORM statement to reach its exit.
2828
Line 427[12,33] <37, Warning, General> - Warning: "end-if" is missing
2929
Line 448[12,16] <37, Warning, General> - Warning: ALTER should not be used
3030
Line 451[12,33] <37, Warning, General> - Warning: "end-if" is missing
3131
Line 470[12,16] <37, Warning, General> - Warning: ALTER should not be used
3232
Line 485[12,16] <37, Warning, General> - Warning: ALTER should not be used
33-
Line 495[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO TEST-3-WRITE' located at line 516, column 16 prevents this PERFORM statement to reach its exit.
34-
Line 495[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO TEST-3-WRITE' located at line 520, column 12 prevents this PERFORM statement to reach its exit.
33+
Line 495[12,12] <37, Warning, General> - Warning: Statement ' GO TO TEST-3-WRITE' located at line 516, column 16 prevents this PERFORM statement to reach its exit.
34+
Line 495[12,12] <37, Warning, General> - Warning: Statement ' GO TO TEST-3-WRITE' located at line 520, column 12 prevents this PERFORM statement to reach its exit.
3535
Line 496[12,16] <37, Warning, General> - Warning: ALTER should not be used
3636
Line 497[12,16] <37, Warning, General> - Warning: ALTER should not be used
37-
Line 498[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO TEST-3-WRITE' located at line 516, column 16 prevents this PERFORM statement to reach its exit.
38-
Line 498[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO TEST-3-WRITE' located at line 520, column 12 prevents this PERFORM statement to reach its exit.
37+
Line 498[12,12] <37, Warning, General> - Warning: Statement ' GO TO TEST-3-WRITE' located at line 516, column 16 prevents this PERFORM statement to reach its exit.
38+
Line 498[12,12] <37, Warning, General> - Warning: Statement ' GO TO TEST-3-WRITE' located at line 520, column 12 prevents this PERFORM statement to reach its exit.
3939
Line 514[12,33] <37, Warning, General> - Warning: "end-if" is missing
4040
Line 526[12,33] <37, Warning, General> - Warning: "end-if" is missing
4141
Line 539[12,33] <37, Warning, General> - Warning: "end-if" is missing
42-
Line 559[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO SEG-TEST-2' located at line 369, column 12 prevents this PERFORM statement to reach its exit.
43-
Line 559[12,12] <30, Error, Semantics> - Semantic error: Statement ' GO TO SEG-TEST8' located at line 372, column 12 prevents this PERFORM statement to reach its exit.
42+
Line 559[12,12] <37, Warning, General> - Warning: Statement ' GO TO SEG-TEST-2' located at line 369, column 12 prevents this PERFORM statement to reach its exit.
43+
Line 559[12,12] <37, Warning, General> - Warning: Statement ' GO TO SEG-TEST8' located at line 372, column 12 prevents this PERFORM statement to reach its exit.
4444
Line 560[12,33] <37, Warning, General> - Warning: "end-if" is missing
4545
Line 576[12,16] <37, Warning, General> - Warning: ALTER should not be used
4646
Line 578[12,33] <37, Warning, General> - Warning: "end-if" is missing

TypeCobol.Analysis/Cfg/ControlFlowGraphBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ private void RelocateBasicBlockForNodeGroupGraph(PerformProcedure p, BasicBlockF
10631063
string offendingStatement = offendingInstruction.CodeElement.SourceText;
10641064
int offendingLine = offendingInstruction.CodeElement.Line;
10651065
int offendingColumn = offendingInstruction.CodeElement.Column;
1066-
Diagnostic d = new Diagnostic(MessageCode.SemanticTCErrorInParser,
1066+
Diagnostic d = new Diagnostic(MessageCode.Warning,
10671067
p.CodeElement.Column,
10681068
p.CodeElement.Column,
10691069
p.CodeElement.Line,

0 commit comments

Comments
 (0)