public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/17922] New: Spurious warnings
@ 2004-10-10 13:55 jm at bourguet dot org
  2004-10-11 12:22 ` [Bug libstdc++/17922] [3.3/3.4/4.0 regression] Spurious warnings about std::ios_base::seekdir reichelt at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jm at bourguet dot org @ 2004-10-10 13:55 UTC (permalink / raw)
  To: gcc-bugs

$ cat bug.cc

#include <istream>

void f(std::ios_base::seekdir dir)
{
  switch (dir) {
  case std::ios_base::beg:
    break;
  case std::ios_base::cur:
    break;
  case std::ios_base::end:
    break;
  }
}

$ LANG=C g++-3.4.2 -Wall -c bug.cc 
bug.cc: In function `void f(std::_Ios_Seekdir)':
bug.cc:12: warning: enumeration value `_S_ios_seekdir_end' not handled in switch
bug.cc:12: warning: case value `0' not in enumerated type `_Ios_Seekdir'
bug.cc:12: warning: case value `1' not in enumerated type `_Ios_Seekdir'
bug.cc:12: warning: case value `2' not in enumerated type `_Ios_Seekdir'

These warnings are not very usefull: the code cover all the standard
values and only them but the compiler complaim about missing value and values
not in the type.

Yours,

-- 
Jean-Marc

-- 
           Summary: Spurious warnings
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jm at bourguet dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17922


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

end of thread, other threads:[~2005-02-21 16:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-10 13:55 [Bug libstdc++/17922] New: Spurious warnings jm at bourguet dot org
2004-10-11 12:22 ` [Bug libstdc++/17922] [3.3/3.4/4.0 regression] Spurious warnings about std::ios_base::seekdir reichelt at gcc dot gnu dot org
2004-10-11 14:47 ` pcarlini at suse dot de
2004-10-11 20:49 ` bkoz at gcc dot gnu dot org
2004-11-01  0:44 ` mmitchel at gcc dot gnu dot org
2004-11-02  5:48 ` bkoz at gcc dot gnu dot org
2004-11-02 19:00 ` cvs-commit at gcc dot gnu dot org
2004-11-08 18:02 ` [Bug libstdc++/17922] [3.3/3.4 " cvs-commit at gcc dot gnu dot org
2004-11-08 18:05 ` pinskia at gcc dot gnu dot org
2005-02-21 22:19 ` cvs-commit 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).