Skip to content

MSVC format checks for vararg APIs#260

Open
jnsh-rf wants to merge 1 commit into
tsoding:mainfrom
jnsh-rf:printf-msvc-v2
Open

MSVC format checks for vararg APIs#260
jnsh-rf wants to merge 1 commit into
tsoding:mainfrom
jnsh-rf:printf-msvc-v2

Conversation

@jnsh-rf

@jnsh-rf jnsh-rf commented Jul 19, 2026

Copy link
Copy Markdown

introduces compile-time format string verification for printf-style functions on MSVC

It does so by redefining key variadic functions with macros that trigger format checks at compile time using a sizeof(printf(...)) trick. The implementation is compatible with both C and C++ and avoids dependencies on SAL.h. Additionally, the functions are wrapped with extern "C" for C++ compatibility.

(PR desc by copilut, less bad equivalent of #253)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant