[Audit] Investigate using real wchar_t in Windows #3755

Open
opened 2026-01-30 23:29:29 +00:00 by claunia · 0 comments
Owner

Originally created by @miniksa on GitHub (Sep 5, 2019).

Originally assigned to: @DHowett on GitHub.

As revealed by OutputCellIterator, the default Windows build rules do not treat wchar_t as a distinct type that differs from DWORD which results in a bunch of weirdness in OutputCellIterator to sort of treat them as the same.

This weirdness includes a reinterpret_cast on one of the constructors that causes an audit mode flag as well as a boolean that exists for no other purpose than to distinguish two of the construction paths because the types "look the same" to the Windows compiler settings.

Visual Studio, by default, treats wchar_t as its own type. So changing this and building outside won't really prove anything.

As such, this represents someone on the core contributor team who is employed by Microsoft going and finding out if we can turn on /Zc:wchar_t in the Windows build system and get away with it then resolving the audit issue and the otherwise weird/useless bool.

Originally created by @miniksa on GitHub (Sep 5, 2019). Originally assigned to: @DHowett on GitHub. As revealed by `OutputCellIterator`, the default Windows build rules do not treat `wchar_t` as a distinct type that differs from `DWORD` which results in a bunch of weirdness in `OutputCellIterator` to sort of treat them as the same. This weirdness includes a `reinterpret_cast` on one of the constructors that causes an audit mode flag as well as a boolean that exists for no other purpose than to distinguish two of the construction paths because the types "look the same" to the Windows compiler settings. Visual Studio, by default, treats `wchar_t` as its own type. So changing this and building outside won't really prove anything. As such, this represents someone on the core contributor team who is employed by Microsoft going and finding out if we can turn on `/Zc:wchar_t` in the Windows build system and get away with it then resolving the audit issue and the otherwise weird/useless bool.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3755