COBOL: Accept FD name as CALL parameter.
COBOL compiler now accepts and warns on file descriptor names as CALL parameters, emulating mainframe behavior.
The GCC COBOL compiler now accepts a file descriptor (FD) name as a parameter to the CALL statement, a nonstandard extension. Currently, it interprets this as a buffer name with a warning, or an error without the ‘-dialect ibm’ option, beginning to address mainframe semantics. A new __funcsig__ macro is also introduced for debugging.
In Details
This commit adds support for using FD names as CALL parameters in the COBOL front end, aligning with mainframe behavior where such parameters refer to the file's DCB. The parser now accepts FD names, treats them as buffer names with a warning (or error if not '-dialect ibm'), and introduces __funcsig__ as a debugging macro to simplify __PRETTY_FUNCTION__ output.
- FD name
- A File Descriptor name, which in COBOL refers to a file control entry and associated data structures.
- CALL parameter
- An argument passed from one program or procedure to another when using the CALL statement.
- DCB
- Data Control Block, a mainframe structure containing information about a file's organization and access methods.
- COBOL
- A compiled programming language designed for business applications.
- mainframe
- A powerful, large-scale computer system typically used by organizations for critical applications, bulk data processing, and transaction processing.
- IBM dialect
- A specific set of language extensions or behaviors defined by IBM for its COBOL compilers.
- __funcsig__
- A debugging macro introduced to provide a cleaner representation of function signatures compared to __PRETTY_FUNCTION__.