Detecting and reporting unlikely constructs
PL/I is a versatile language, where the level of ambiguity is such that actual bugs may go unnoticed because the compiler accepts the input, in a way that is totally different from what the developer had intended to do.
For instance, a piece of code such as:
dcl aa fixed bin(15), init(7);
declares a variable named INIT as an array of 7 elements while the developer’s original intention clearly was to define 7 as the AA variable’s initial value. The comma – erroneously – placed before the INIT clause causes the compiler to understand it as a separate variable declaration.
Such unlikely constructs, as well as many others, are detected and duly reported by the Raincode PL/I compiler:
Implicit variable declarations
Initialization clauses with more values than elements to fill
Missing END keywords in nested statements
INIT clauses in based variables (which are ignored)
Implicit promotions from bit strings to floating point values, which induce probable differences in precision
Each of these warnings can be deactivated to avoid clobbering the compiler output, or forced into plain errors when you want to ensure that no program will be compiled if it contains similar instances of disorderly programming.