http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48570
Summary: gcc-4.6: wrong subscription with -std=c++0x Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: regression AssignedTo: unassig...@gcc.gnu.org ReportedBy: holger.h...@sap.com gcc-4.6 and trunk produce wrong results here. I expect return 1 (==), but gcc-4.6 and trunk return 0 (!=). $ g++ -std=c++0x t.c && ./a.out gcc-4.5 and gcc-4.6 without -std=c++0x work correctly, char type works correctly, but not wchar_t, char16_t, char32_t. int main() { wchar_t z = (L"01234")[1]; return (z == L'1'); }