Skip to content

as370: a library-member continuation diagnostic cannot be reconciled with the statement it belongs to #91

Description

@mgrossmann

Split out of #88, where the flagged-statement count stopped counting messages and started counting statements.

The gap

Continuation diagnostics are raised while cards are being joined, before lines[] exists, so they are recorded in a different key space from the other ten recorders: contd[].stmt is a raw card number, while everything else carries a lines[] index. #88 reconciles the two through the origin card, which works for the primary source.

It cannot work for a library member: its card numbers are member-relative, and the lines[] statement the member's cards eventually produce carries line_org = the macro call's card. Member card 4 and source card 4 are different statements, and nothing records the link.

Reproducer

tests/run.sh builds it as the flagged_libmac case:

         MACRO
&L       BOTHM
&L       MVC   FIELD(8),                                              X
JUNK             0(2)
         MEND

One generated statement, badly continued and referencing an undefined symbol. IFOX00 counts 1 flagged statement; as370 counts 2.

The neighbouring flagged_libcard case pins the opposite error, which is why #88 does not simply subtract on the card number: member card 4 colliding with primary-source card 4 would merge two genuinely different statements into one — an under-count, which hides a diagnostic.

Blast radius

The printed count only. The RC, the object bytes and the listing are unaffected — errors is used as a boolean for the return code and as the number in the summary line, nothing else.

Frequency

0 of 835 ecosystem modules produce a library-member continuation diagnostic at all. #81 (a library macro is read to its MEND, and no card further) removed the last of them — the 21 libc370 modules tests/corpus/README.md still describes as warning through sysmac/getmain.macro no longer do.

What a fix needs

The origin (member, card) of every generated line, threaded through the macro expander alongside line_org[] — then a continuation diagnostic raised in a member can be matched to the generated statement it belongs to, and the two spaces become one.

That is the joiner and mexp, which is where #63 (a 1376-character statement overflowing a char[128]), #78 and #81 came from. Deliberately not done inside #88, which is a cosmetic counter: the residual is pinned there as a tripwire instead, so implementing this issue fails flagged_libmac and brings whoever does it to the number that has to change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions