Attached is a draft patch for program and function prototypes. It only adds support for the PROTOTYPE
format of programs and functions and checks that prototypes and definition agree with each other. It lacks the following important features:
Also missing is:
ADDRESS OF
items.By the time this patch is complete, all of these features should be implemented.
Bugs: #350
Commit: [r5278]
Discussion: USER DEFINED FUNCTIONS 3 questions
This update adds checks for parameter conformance.
Here is an example.
The above program causes the following errors (the first error is a bug) :
Patch updated to [r2120] (otherwise unchanged).
Thank you for your work on this. Current questions for this work-in-progress:
RETURN-CODE
if the prototype doesn't have theRETURNING
clause?Please upload a patch without the generated man entries, bison/flex testsuite and a first draft of the Changelogs, this helps to understand better what part of the patch is doing what.
I'm really sorry that it took so long to recheck this. While the patch had a bunch of TODOs, general open points and some issues it was already a good bunch of work.
I've included most of the last patch with [r4358] (fixing added errors in [r4360]), taking care of updating it to the current codebase, fixed the numbered parameter check (needed to inspect
PROCEDURE DIVISION USING
parameters, notLINKAGE
items) and made the prototype checks depend on a warning (defaulting to on) instead of an error, allowing it to be suppressed.It would be really nice to get an updated version of the patch with the missing pieces, also nice: testsuite entries (could be directly committed with skip/xfail, too).
Related
Commit: [r4358]
Commit: [r4360]