public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16307] New: -Wchar-subscripts broken
@ 2004-07-01  0:57 sebor at roguewave dot com
  2004-07-01  5:01 ` [Bug c++/16307] -Wchar-subscripts does not warn on pointers pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: sebor at roguewave dot com @ 2004-07-01  0:57 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-10-29 19:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-16307-1186@http.gcc.gnu.org/bugzilla/>
2006-10-28 23:23 ` [Bug c++/16307] -Wchar-subscripts does not warn on pointers mueller at gcc dot gnu dot org
2006-10-29 18:38 ` mueller at gcc dot gnu dot org
2006-10-29 19:13 ` mueller at gcc dot gnu dot org
2004-07-01  0:57 [Bug c++/16307] New: -Wchar-subscripts broken sebor at roguewave dot com
2004-07-01  5:01 ` [Bug c++/16307] -Wchar-subscripts does not warn on pointers pinskia at gcc dot gnu dot org
2004-11-20 20:42 ` pinskia at gcc dot gnu dot org
2004-11-20 20:48 ` pinskia at gcc dot gnu dot org
2004-11-21  1:52 ` pinskia at gcc dot gnu dot org
2005-02-12 22:35 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).