Repository navigation
A fixed argument may be a header constant or sizeof of a header type; zlib, bzip2 and xz facts (#3173, spec v7.80) - #3526
Merged
Merged
Conversation
added 8 commits
November 21, 2026 18:54
…an imported type: param p fixed NAME, param p fixed sizeof(T) (#3173; zlib's initializers)
…am p fixed V on its fn item (#3173; zlib's initializers take the header's version and the stream's size)
…rom the pinned 1.4 header: Inflater and Deflater over z_stream, their initializers passing ZLIB_VERSION and sizeof(z_stream) (#3173)
…n a package linked as a prebuilt binary
…sor over bz_stream (#3173)
…n encoder and a decoder initializer (#3173)
…nes, or sizeof of a type the header declares (Eric, 2026-11-21)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Eric's ruling of 2026-11-21 on #3173 (the two
fixedforms; then the registry facts), with the blessed words.The forms (§31
fixed_value = literal | CONST | "sizeof" "(" type ")", §16.2b.11):param p fixed NAME: a constant the imported header defines. Text goes only to a C string parameter; an integer constant must fit the parameter.param p fixed sizeof(T):Tis a type the header declares; the parameter is an integer that holds the size.err_3129_initializer_fixed_argument,err_c_facade_help_fixed_argument_on_initializer); they are replaced bybehav_c_facade_initializer_fixed_argument, which shows it working. Apreinitstill takes none.Registry facts, each line cited from the package
with getpins, and each proven by running a program against the pinned library:InflaterandDeflateroverz_stream;inflateInit_and its kin passZLIB_VERSIONandsizeof(z_stream)(the header's own macros do). Both returnZ_OK, which zlib only does when the version and size are right. The existing gz citations are updated from 1.3.2 to the pinned 1.4.CompressorandDecompressoroverbz_stream, cited from the package's ownbzlib.c(the header has no prose); a bad block size returnsErr.Streamoverlzma_streamwith an encoder and a decoder initializer; a bad check type returnsErr.Each file also cites why zeroed storage is valid and what a failed initializer leaves behind.
Report fixes found on the way: a function a registry resource names was reported "raw", and was missing from the report entirely for a package linked as a prebuilt binary. zlib's report now lists nine functions, nine presented.
Tests:
behav_c_facade_fixed_constant_and_sizeof, fiveerr_c_facade_fixed_*,behav_c_facade_initializer_fixed_argument,conan_facade_inplace_fixed_facts_test.The §31 table row still reads
param p fixed literal; it is a normative row and is left for Eric.Battery green;
:release-checksgreen. #3173 stays open: the survey rerun and the draft proofs A and B follow.