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!