From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50308 invoked by alias); 16 Oct 2015 18:53:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 50272 invoked by uid 48); 16 Oct 2015 18:53:00 -0000 From: "kim.grasman at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/67996] New: std::ios_base::seekdir raises -Wswitch with Clang Date: Fri, 16 Oct 2015 18:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.6.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kim.grasman at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg01336.txt.bz2 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!