Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cobj/warning-help.def
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ CB_WARNDEF (cb_warn_constant, "constant", 1,
CB_WARNDEF (cb_warn_parentheses, "parentheses", 1,
N_("Warn lack of parentheses around AND within OR"))

CB_WARNDEF (cb_warn_call_params, "call-params", 0,
N_("Warn non 01/77 items for CALL params"))

CB_WARNDEF (cb_warn_column_overflow, "column-overflow", 0,
N_("Warn text after column 72, FIXED format"))

Expand Down
1 change: 1 addition & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ command_line_options_DEPENDENCIES = \
command-line-options.src/Wredefinition.at \
command-line-options.src/Wconstant.at \
command-line-options.src/Wparentheses.at \
command-line-options.src/Wcall-params.at \
command-line-options.src/Wcolumn-overflow.at \
command-line-options.src/Wterminator.at \
command-line-options.src/Wunreachable.at \
Expand Down
1 change: 1 addition & 0 deletions tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ command_line_options_DEPENDENCIES = \
command-line-options.src/Wredefinition.at \
command-line-options.src/Wconstant.at \
command-line-options.src/Wparentheses.at \
command-line-options.src/Wcall-params.at \
command-line-options.src/Wcolumn-overflow.at \
command-line-options.src/Wterminator.at \
command-line-options.src/Wunreachable.at \
Expand Down
1 change: 1 addition & 0 deletions tests/command-line-options.at
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ m4_include([Wobsolete-Warchaic.at])
m4_include([Wredefinition.at])
m4_include([Wconstant.at])
m4_include([Wparentheses.at])
m4_include([Wcall-params.at])
m4_include([Wcolumn-overflow.at])
m4_include([Wterminator.at])
m4_include([Wunreachable.at])
Expand Down
24 changes: 24 additions & 0 deletions tests/command-line-options.src/Wcall-params.at
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
AT_SETUP([-Wcolumn-overflow])

AT_DATA([callee.cbl],
[ IDENTIFICATION DIVISION.
PROGRAM-ID. callee.
DATA DIVISION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.
01 GRP1.
03 P1 PIC X(5).
01 GRP2.
03 P2 PIC X(5).
77 P3 PIC X(5).
PROCEDURE DIVISION USING P1 GRP2 P3.
DISPLAY P1.
])

AT_CHECK([${COBJ} -Wcall-params callee.cbl], [1], [],
[callee.cbl:11: Error: 'P1' not level 01 or 77
])

AT_CHECK([${COBJ} --help | grep '\-Wcall-params' > /dev/null], [0])

AT_CLEANUP