-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove printf
implementation
#81243
Remove printf
implementation
#81243
Conversation
Replace implementation of file related printfs using the platform implementation (PAL_fprintf and PAL_vfprintf). Remove tests for PAL_printf, PAL_vprintf, PAL_fprintf and PAL_vfprintf since they are all now supplied by the platform.
Left _vsnprintf_s tests to ensure the _TRUNCATE logic is validated.
/azp list |
/azp run runtime-coreclr ilasm |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
It looks like the |
@jkoritzinsky It should be possible, but note that it does have semantic differences. Particularly the return value. It is also worth noting MSVC complains if not using the |
It is not just MSVC. The static analysis tools that are part of Microsoft release gates are going to complain about it too. Switching back to non- |
Are the |
We are likely to always have a bit of this. MSVC doesn't officially support C11 either so the tooling there is going to have rough edges. As the PAL evolves this may change but for right now we need a shim. |
According to CRT team |
That is the official statement, but it isn't complete support and that was admitted in the announcement - https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/#whats-not. I'm not saying there isn't some support but it isn't as consistent with other compilers and playing the piecemeal game is tiresome. This also is difficult because of mono and potential code sharing. Yes, we don't share this code, but introducing C11 as a dependency and then realizing that some part can't be used by mono is a bad idea. For now, we should focus on C99 and work towards C11 as more support is enabled. This PR has no need for that at present. |
/azp run runtime-coreclr ilasm |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice cleanup! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Replace implementation of file related printfs using the
platform implementation (
PAL_fprintf
andPAL_vfprintf
).Remove tests for
PAL_printf
,PAL_vprintf
,PAL_fprintf
andPAL_vfprintf
since they are all now supplied by the platform.Left
_vsnprintf_s
tests to ensure the_TRUNCATE
logic is validated.
Size impact (bytes)