summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-07-24 14:17:35 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2017-07-24 14:17:35 +0000
commitb4be762630e273ab8913261ad8b2a0a38353de2f (patch)
tree25cd74dcfc4175a258e0c9c86a082b3a128bf407 /vespalib
parent761677c3f844527aa67c75e718b05d13e7ff3386 (diff)
Use syntax that works for both gcc 7 and gcc 6.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/data/slime/json_format.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/bobhash.h22
2 files changed, 12 insertions, 12 deletions
diff --git a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
index 88b99725302..d6126667d68 100644
--- a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
+++ b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
@@ -426,7 +426,7 @@ JsonDecoder::decodeNumber(Inserter &inserter)
switch (c) {
case '+': case '-': case '.': case 'e': case 'E':
isLong = false;
- [[fallthrough]];
+ //@fallthrough@
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
value.push_back(c);
diff --git a/vespalib/src/vespa/vespalib/util/bobhash.h b/vespalib/src/vespa/vespalib/util/bobhash.h
index 6c92896e538..1b1d0095be9 100644
--- a/vespalib/src/vespa/vespalib/util/bobhash.h
+++ b/vespalib/src/vespa/vespalib/util/bobhash.h
@@ -135,18 +135,18 @@ public:
c += length;
switch(len) /* all the case statements fall through */
{
- case 11: c += (static_cast<uint32_t>(k[10]) << 24); [[fallthrough]];
- case 10: c += (static_cast<uint32_t>(k[9]) << 16); [[fallthrough]];
- case 9 : c += (static_cast<uint32_t>(k[8]) << 8); [[fallthrough]];
+ case 11: c += (static_cast<uint32_t>(k[10]) << 24); //@fallthrough@
+ case 10: c += (static_cast<uint32_t>(k[9]) << 16); //@fallthrough@
+ case 9 : c += (static_cast<uint32_t>(k[8]) << 8); //@fallthrough@
/* the first byte of c is reserved for the length */
- case 8 : b += (static_cast<uint32_t>(k[7]) << 24); [[fallthrough]];
- case 7 : b += (static_cast<uint32_t>(k[6]) << 16); [[fallthrough]];
- case 6 : b += (static_cast<uint32_t>(k[5]) << 8); [[fallthrough]];
- case 5 : b += k[4]; [[fallthrough]];
- case 4 : a += (static_cast<uint32_t>(k[3]) << 24); [[fallthrough]];
- case 3 : a += (static_cast<uint32_t>(k[2]) << 16); [[fallthrough]];
- case 2 : a += (static_cast<uint32_t>(k[1]) << 8); [[fallthrough]];
- case 1 : a += k[0]; [[fallthrough]];
+ case 8 : b += (static_cast<uint32_t>(k[7]) << 24); //@fallthrough@
+ case 7 : b += (static_cast<uint32_t>(k[6]) << 16); //@fallthrough@
+ case 6 : b += (static_cast<uint32_t>(k[5]) << 8); //@fallthrough@
+ case 5 : b += k[4]; //@fallthrough@
+ case 4 : a += (static_cast<uint32_t>(k[3]) << 24); //@fallthrough@
+ case 3 : a += (static_cast<uint32_t>(k[2]) << 16); //@fallthrough@
+ case 2 : a += (static_cast<uint32_t>(k[1]) << 8); //@fallthrough@
+ case 1 : a += k[0]; //@fallthrough@
/* case 0: nothing left to add */
}
bobhash_mix(a,b,c);