Skip to content

A contract can name a forwarding macro; zlib's facts name the initializers a program calls; the report lists every initializer - #3532

Merged
ehartford merged 3 commits into
mainfrom
macro-forwarding-call
Nov 22, 2026
Merged

ehartford merged 3 commits into
mainfrom
macro-forwarding-call

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Closes #3516. Closes #3521. The two issues I opened on 2026-11-21 and should have fixed in place.

#3516: a macro that forwards its parameters to one call. inflateInit(strm) is inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)). The importer already presented such a macro as a callable function, but generic over its parameters, so a contract naming it was refused as "not a declaration in scope". When a macro's body is one call of a declared function, with each macro parameter passed whole as exactly one argument and named nowhere else, the function now takes the callee's own parameter types. The importer's cache format is bumped (v19).

zlib's facts now name what a program calls: inflateInit, inflateInit2, deflateInit, deflateInit2, with no fixed lines. All four return Z_OK on the pinned zlib 1.4. Constructors read Inflater.inflateInit().

#3521, the last part: the contract report. It listed only a resource's first initializer, said "status: none" though each stated ok, and labelled an initializer's claim with an unrelated name: it read the initializer's success status as a profile rule. It now lists every initializer with the name it is presented under, its status, and its real citation; with contract report c.<lib> <function> finds an initializer too.

Tests: behav_c_facade_names_a_forwarding_macro, behav_contract_view_lists_every_initializer; both fail on the previous compiler.

Battery green; :release-checks green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant