[MSVC][std:c++latest] terminal failed to build with /std:c++latest on MSVC #16791

Open
opened 2026-01-31 05:22:52 +00:00 by claunia · 0 comments
Owner

Originally created by @xiaoxiao-Xu on GitHub (Feb 17, 2022).

Windows Terminal version

No response

Windows build number

10.0.19041.0

Other Software

No response

Steps to reproduce

The MSVC team recently added terminal as part of RWC testing. But we found some errors when building terminal with '/std:c++latest'.

repro steps:

  1. git clone https://github.com/microsoft/terminal.git F:\gitP\microsoft\terminal
  2. cd F:\gitP\microsoft\terminal
  3. set _CL_= /std:c++latest
  4. set _CL_=/wd4189 %_CL_%
  5. msbuild /m /p:Platform=x64 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.20348.0 OpenConsole.sln /t:Restore /t:Rebuild

Expected Behavior

Terminal could build successfully with '/std:c++latest'.

Actual Behavior

precomp.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\wrl\module.h(1275,10): error C2220: the following warning is treated as an error
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\wrl\module.h(1275,10): warning C5104: found 'L#serverName' in macro replacement list, did you mean 'L""#serverName'?
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\wrl\module.h(1275,10): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
F:\gitP\microsoft\terminal\src\inc\til\bit.h(12,1): fatal error C1021: invalid preprocessor command 'warning'
build.log

Originally created by @xiaoxiao-Xu on GitHub (Feb 17, 2022). ### Windows Terminal version _No response_ ### Windows build number 10.0.19041.0 ### Other Software _No response_ ### Steps to reproduce The MSVC team recently added terminal as part of RWC testing. But we found some errors when building terminal with '/std:c++latest'. **repro steps:** 1. `git clone https://github.com/microsoft/terminal.git F:\gitP\microsoft\terminal` 2. `cd F:\gitP\microsoft\terminal` 3. `set _CL_= /std:c++latest` 4. `set _CL_=/wd4189 %_CL_%` 5. `msbuild /m /p:Platform=x64 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.20348.0 OpenConsole.sln /t:Restore /t:Rebuild` ### Expected Behavior Terminal could build successfully with '/std:c++latest'. ### Actual Behavior precomp.cpp C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\wrl\module.h(1275,10): error C2220: the following warning is treated as an error C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\wrl\module.h(1275,10): warning C5104: found 'L#serverName' in macro replacement list, did you mean 'L""#serverName'? C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt\wrl\module.h(1275,10): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings F:\gitP\microsoft\terminal\src\inc\til\bit.h(12,1): fatal error C1021: invalid preprocessor command 'warning' [build.log](https://github.com/microsoft/terminal/files/8086582/build.log)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16791