[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-29 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. I now realise that my previous comment was nonsense: looking at @thakis's link more carefully, there are actually 5 failing tests that are nothing to do with the one I modified, and a lot of them don't even have any obvious `-fms-extension` option in the cc1 comman

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D73457#1844475 , @thakis wrote: > Since we auto-detect -fmsc-version if it's not explicitly installed and since > this warning is on by default, it makes the test suite depend on the > environment a good bit. Given how o

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-28 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. I wanted this to go in because I'm actually using it – pre-2015 C libraries are useful to link against if you need an application to run on very old versions of Windows, and that means you need the compiler to warn you if you do something those libraries don't supp

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-28 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks tests on Windows: http://45.33.8.238/win/6812/step_7.txt Since we auto-detect -fmsc-version if it's not explicitly installed and since this warning is on by default, it makes the test suite depend on the environment a good bit. Given how old 2015 is by now, I

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-28 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. In D73457#1842605 , @amccarth wrote: > clang will still (by default) use the MS runtime libraries for Windows > builds, in which case it's important for the compatibility version to match > the one for the libraries that are

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-28 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfe0d1b6a8ac5: [Clang] Warn about 'z' printf modifier in old MSVC. (authored by simon_tatham). Changed prior to commit: https://reviews.llvm.org/D73457?vs=240626&id=240796#toc Repository: rG LLVM Gith

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! In D73457#1842605 , @amccarth wrote: > In D73457#1842493 , @simon_tatham > wrote: > > > R

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-27 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth added a comment. In D73457#1842493 , @simon_tatham wrote: > Removed the special case for `MSCompatibilityVersion == 0`. If the default > compatibility setting needs to be changed, that's a separate piece of work > and should be done by someone

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 240626. simon_tatham added a comment. Removed the special case for `MSCompatibilityVersion == 0`. If the default compatibility setting needs to be changed, that's a separate piece of work and should be done by someone who understands more than I do abou

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rnk, majnemer, zturner. aaron.ballman added a comment. Adding some more Windows reviewers to see if there are more opinions on how to handle this. Comment at: clang/lib/AST/FormatString.cpp:754 + LO.isMSCompatibilityVersionSpecified() &&

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/AST/FormatString.cpp:754 + LO.isMSCompatibilityVersionSpecified() && + !LO.isCompatibleWithMSVC(LangOptions::MSVC2015)) { +// The standard libraries

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/FormatString.cpp:754 + LO.isMSCompatibilityVersionSpecified() && + !LO.isCompatibleWithMSVC(LangOptions::MSVC2015)) { +// The standard libraries before MSVC2015 didn't support the 'z' length

[PATCH] D73457: [Clang] Warn about 'z' printf modifier in old MSVC.

2020-01-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: aaron.ballman, lebedev.ri. Herald added a project: clang. Herald added a subscriber: cfe-commits. The 'z' length modifier, signalling that an integer format specifier takes a `size_t` sized integer, is only supported by the C librar