This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16307] New: -Wchar-subscripts broken
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2004 00:57:38 -0000
- Subject: [Bug c++/16307] New: -Wchar-subscripts broken
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The -Wchar-subscripts option doesn't seem to have any effect. IIRC,
it used to work at some point in the past but this test case doesn't
seem to trigger it in any compiler between 2.95 and 3.4 regardless
of whether char is signed or unsigned.
$ cat t.cpp && g++ --version && g++ -Wchar-subscripts t.cpp
char foo (const char *s)
{
return s [s ['\x80']];
}
int main ()
{
foo ("\x80");
}
g++ (GCC) 3.4.0
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: -Wchar-subscripts broken
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16307