The wchar_t type is used extensively on Windows API and C++ standard library APIs derived from them therefore it's hard to change Windows code to use something else because you would have to cast/convert back and forth every time.
But on non-Windows wide characters are rarely used and UTF-8 encoding is preferred instead. Therefore having code that uses wchar_t outside Windows probably does something wrong and even if its intended it's better to use types that communicate the intent better eg. using std::u16string and char16_t when dealing with UTF-16 strings instead of wstring and using std::u32string and char32_t when the intent is storing Unicode codepoints.
Is there a GCC option to turn on a diagnostic project wide that warns or errors when it sees a wchar_t, therefore identifying potential sites for refactoring?