https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107930

            Bug ID: 107930
           Summary: wchar_t may not be the native character type for
                    windows
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

Windows APIs have two modes. ANSI 9x and Wide NT. It is still possible the
operating system character type is char, not wchar_t. Plus nobody guarantees
the sizeof(wchar_t) == 2 on windows. 


I suggest adding a toggle to set the toggle here on whether A apis or W apis
are called when building with cross-toolchain.

WINVER, _WIN32_WINDOWS and _WIN32_WINNT determine what mode to use. However,
libstdc++ does not provide options to set them.

enum class win32_family
{
ansi_9x,
wide_nt,
#ifdef _WIN32_WINDOWS
native = ansi_9x
#else
native = wide_nt
#endif
};

https://github.com/cppfastio/fast_io/blob/f2dc1472e1d0c1e15687b4b94bf5d6221f1099d2/include/fast_io_hosted/api_encoding_converter/impl.h#L10

Reply via email to