aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2016-09-26 09:42:50 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2016-09-26 09:42:50 +0000
commit81fea426da8c4687bb32e6894dc26f00ae211822 (patch)
tree8b84b3de175727d09b7dcf1b5703e0d46b64f9e7 /libstdc++-v3
parent392fa55c799358e198ca85fbea548e60359133c5 (diff)
downloadgcc-81fea426da8c4687bb32e6894dc26f00ae211822.zip
gcc-81fea426da8c4687bb32e6894dc26f00ae211822.tar.gz
gcc-81fea426da8c4687bb32e6894dc26f00ae211822.tar.bz2
Implement -Wimplicit-fallthrough.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r240485
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/libsupc++/hash_bytes.cc2
2 files changed, 7 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6f134cb..230f764 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-26 Marek Polacek <polacek@redhat.com>
+
+ PR c/7652
+ * libsupc++/hash_bytes.cc: Add [[gnu::fallthrough]].
+
2016-09-25 François Dumont <fdumont@gcc.gnu.org>
* src/c++11/debug.cc: Include debug/vector. Include cctype. Remove
diff --git a/libstdc++-v3/libsupc++/hash_bytes.cc b/libstdc++-v3/libsupc++/hash_bytes.cc
index 2e5bbfa..1042de6 100644
--- a/libstdc++-v3/libsupc++/hash_bytes.cc
+++ b/libstdc++-v3/libsupc++/hash_bytes.cc
@@ -95,8 +95,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
case 3:
hash ^= static_cast<unsigned char>(buf[2]) << 16;
+ [[gnu::fallthrough]];
case 2:
hash ^= static_cast<unsigned char>(buf[1]) << 8;
+ [[gnu::fallthrough]];
case 1:
hash ^= static_cast<unsigned char>(buf[0]);
hash *= m;