www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - printf format string validation is here

reply Walter Bright <newshound2 digitalmars.com> writes:
   https://github.com/dlang/dmd/pull/10812

I wrote it yesterday, and spend today fixing all the sloppy code in the test 
suite with bad formats, and submitting PRs for projects with bad formats.

Unfortunately, Rainer says that Microsoft VS doesn't support the printf `z` 
specifier (despite it being standardized in 1999) in versions before 2015.

   https://github.com/dlang/druntime/pull/2947

Is it time to throw old VS support under the bus?
Feb 22 2020
next sibling parent 12345swordy <alexanderheistermann gmail.com> writes:
On Saturday, 22 February 2020 at 08:06:59 UTC, Walter Bright 
wrote:
   https://github.com/dlang/dmd/pull/10812

 I wrote it yesterday, and spend today fixing all the sloppy 
 code in the test suite with bad formats, and submitting PRs for 
 projects with bad formats.

 Unfortunately, Rainer says that Microsoft VS doesn't support 
 the printf `z` specifier (despite it being standardized in 
 1999) in versions before 2015.

   https://github.com/dlang/druntime/pull/2947

 Is it time to throw old VS support under the bus?
We couldn't use clang-cl for this? -Alex
Feb 22 2020
prev sibling next sibling parent kinke <noone nowhere.com> writes:
On Saturday, 22 February 2020 at 08:06:59 UTC, Walter Bright 
wrote:
 Is it time to throw old VS support under the bus?
I've been advocating that for years, due to the MSVC 2015 runtime finally featuring near-complete C99 standard compliance and thus vastly simplifying portability and rendering previous workarounds and test special cases in druntime/Phobos obsolete. LDC has been requiring MSVC 2015+ for years. That said, Rainer went to great lengths to maintain support with pre-UCRT due to the ease of redistribution (bundling 1 DLL vs. potential UCRT Windows component installation), so dumping it now just because of `%z` seems excessive to me.
Feb 22 2020
prev sibling parent jxel <jxel gmall.com> writes:
On Saturday, 22 February 2020 at 08:06:59 UTC, Walter Bright wrote
 Is it time to throw old VS support under the bus?
As long as Optlink and DMC's std lib go with it.
Feb 22 2020