Latest compilers emit a ton of C4996 warnings as errors #20510

Open
opened 2026-01-31 07:16:07 +00:00 by claunia · 0 comments
Owner

Originally created by @Dan-Albrecht on GitHub (Sep 19, 2023).

Windows Terminal version

main @ 2e91e9c

Windows build number

10.0.22621.0

Other Software

Visual Studio Version 17.8.0 Preview 3.0 [34118.359.main]

msbuild -version
MSBuild version 17.8.0-preview-23431-02+3c910ba83 for .NET Framework
17.8.0.43102

Steps to reproduce

  • Open OpenConsole solution
  • Set to x64
  • F5

Expected Behavior

No errors

Actual Behavior

1,123 C4996 warnings as errors. e.g.:

Error	C4996	'stdext::checked_array_iterator<_Ty*>': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. 
std::span (since C++20) and gsl::span can be used instead. 
You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to suppress this warning.	
fmt	C:\git\terminal\oss\fmt\include\fmt\format.h	359
Originally created by @Dan-Albrecht on GitHub (Sep 19, 2023). ### Windows Terminal version main @ [2e91e9c](https://github.com/microsoft/terminal/commit/2e91e9c6debca8915e829592b90ab5c3f13224b8) ### Windows build number 10.0.22621.0 ### Other Software Visual Studio `Version 17.8.0 Preview 3.0 [34118.359.main]` ``` msbuild -version MSBuild version 17.8.0-preview-23431-02+3c910ba83 for .NET Framework 17.8.0.43102 ``` ### Steps to reproduce - Open OpenConsole solution - Set to x64 - F5 ### Expected Behavior No errors ### Actual Behavior 1,123 C4996 warnings as errors. e.g.: ``` Error C4996 'stdext::checked_array_iterator<_Ty*>': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to suppress this warning. fmt C:\git\terminal\oss\fmt\include\fmt\format.h 359 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20510