public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/67996] New: std::ios_base::seekdir raises -Wswitch with Clang
@ 2015-10-16 18:53 kim.grasman at gmail dot com
  2015-10-17  0:51 ` [Bug libstdc++/67996] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kim.grasman at gmail dot com @ 2015-10-16 18:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67996

            Bug ID: 67996
           Summary: std::ios_base::seekdir raises -Wswitch with Clang
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kim.grasman at gmail dot com
  Target Milestone: ---

When using libstdc++ with Clang, we can't seem to form a fully-covered switch
over std::ios_base::seekdir:

  void f(std::ios_base::seekdir way)
    switch(way) {
      case std::ios_base::beg:
        // ...
        break;

      case std::ios_base::cur:
        // ...
        break;

      case std::ios_base::end:
        // ...
        break;
    }
  }

...t.cc:87:12: warning: enumeration value
'_S_ios_seekdir_end' not handled in switch [-Wswitch]
                        switch (way)

This looks like it was discussed long ago in #17922, so I don't know if this
has regressed or if it's something about Clang's implementation of this
diagnostic that is different from GCC.

A discussion on the Clang list is available here:
http://article.gmane.org/gmane.comp.compilers.clang.devel/45198/match=overeager

What's the motivation for _S_ios_seekdir_end? Any chance it could be removed?

Thanks!


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

end of thread, other threads:[~2015-10-17 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16 18:53 [Bug libstdc++/67996] New: std::ios_base::seekdir raises -Wswitch with Clang kim.grasman at gmail dot com
2015-10-17  0:51 ` [Bug libstdc++/67996] " redi at gcc dot gnu.org
2015-10-17  5:58 ` kim.grasman at gmail dot com
2015-10-17 13:49 ` redi at gcc dot gnu.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).