Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8408: Boost is not compatible with Clang's -Wimplicit-fallthrough diagnostic
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-08 17:38:53
#8408: Boost is not compatible with Clang's -Wimplicit-fallthrough diagnostic
------------------------------------------------------+---------------------
Reporter: Alexander Kornienko <alexfh@â¦> | Owner: johnmaddock
Type: Patches | Status: new
Milestone: To Be Determined | Component: config
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
------------------------------------------------------+---------------------
Comment (by Alexander Kornienko <alexfh@â¦>):
Replying to [comment:4 johnmaddock]:
> >For the second part, are you saying this will require a separate ticket
and patch for each library that's updated to use the annotation?
>
> That would certainly increase the chance of acceptance.
Thanks for clarification.
> One thing about your patches though: some compilers (GCC?) will warn if
there are empty statements - which is exactly what your warning patch will
generate on non-clang compilers.
>
> So BOOST_FALLTHROUGH needs to be defined to be used without a following
";".
On unsupported compilers (or in non-C++11 mode in Clang) it expands to "do
{} while(0)", which requires a semicolon as well. This construct was meant
to look and behave consistently with 'break;' statement, which it can be
an alternative to in many cases. So requiring a semicolon after it seems
to be reasonable.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8408#comment:5> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC