add sensible constraints for using __MINGW_PRINTF_FORMAT in include/C… - #1896
Closed
Conversation
…ppUTest/CppUTestConfig.h to silence warnings when building for UCRT64 with autotools
5 tasks
thetic
added a commit
to thetic/mu.tiny
that referenced
this pull request
Sep 10, 2026
On UCRT-based MinGW builds, __USE_MINGW_ANSI_STDIO defaults to 0, so __MINGW_PRINTF_FORMAT no longer matches the CRT's printf and trips format-checking warnings. Restrict it to the classic MinGW runtime and fall back to plain printf otherwise, matching cpputest/cpputest#1896. Add a UCRT64 leg to the MSYS CI matrix so this path is covered. Claude-Session: https://claude.ai/code/session_01AK4HQuuasGpAUvZtortGkH
Author
|
After more testing, this isn't the right solution. More light was found by reading & testing out the code in Martin Licht's article, The long double trouble with MinGW and Windows, which shows that one has two options for mitigating the problem, and the one I chose here is half-baked. Sorry for that. Closing this PR. |
Keith-H-Utron
deleted the
1832-fix-ucrt64-autotools-warning-__MINGW_PRINTF_FORMAT-is-an-unrecognized-format-function-type
branch
September 10, 2026 18:03
Member
|
no problem, thanks for contributing anyways! |
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.
…ppUTest/CppUTestConfig.h to silence warnings when building for UCRT64 with autotools