summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-12-06 00:31:24 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-12-06 02:04:52 +0100
commit4bf96727e32d260b435340b73abc22e32396a9d7 (patch)
tree580d988b323524b8b73c7b2ef7f0485186778fd1
parent23f7bf9b66adc6316c9642b8c29c6aeb93e316b9 (diff)
Port to gcc 8.
-rw-r--r--document/src/tests/documentselectparsertest.cpp2
-rw-r--r--eval/src/vespa/eval/eval/cell_type.h4
-rw-r--r--juniper/src/test/auxTest.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/document/src/tests/documentselectparsertest.cpp b/document/src/tests/documentselectparsertest.cpp
index ab7f2cf1972..0830c84fe39 100644
--- a/document/src/tests/documentselectparsertest.cpp
+++ b/document/src/tests/documentselectparsertest.cpp
@@ -1234,7 +1234,7 @@ TEST_F(DocumentSelectParserTest, testDocumentIdsInRemoves)
namespace {
-#if __cplusplus > 201703L
+#if defined(__cpp_char8_t)
const char *
char_from_u8(const char8_t * p) {
return reinterpret_cast<const char *>(p);
diff --git a/eval/src/vespa/eval/eval/cell_type.h b/eval/src/vespa/eval/eval/cell_type.h
index 49114d04bfe..4c4f7e78413 100644
--- a/eval/src/vespa/eval/eval/cell_type.h
+++ b/eval/src/vespa/eval/eval/cell_type.h
@@ -32,16 +32,16 @@ struct CellTypeUtils {
switch (cell_type) {
case CellType::DOUBLE: return sizeof(double);
case CellType::FLOAT: return sizeof(float);
+ default: bad_argument((uint32_t)cell_type);
}
- bad_argument((uint32_t)cell_type);
}
static constexpr size_t mem_size(CellType cell_type, size_t sz) {
switch (cell_type) {
case CellType::DOUBLE: return sz * sizeof(double);
case CellType::FLOAT: return sz * sizeof(float);
+ default: bad_argument((uint32_t)cell_type);
}
- bad_argument((uint32_t)cell_type);
}
};
diff --git a/juniper/src/test/auxTest.cpp b/juniper/src/test/auxTest.cpp
index 62bed396d44..74b3469f2c0 100644
--- a/juniper/src/test/auxTest.cpp
+++ b/juniper/src/test/auxTest.cpp
@@ -320,7 +320,7 @@ void test_dump(const char* s, unsigned int len)
namespace {
-#if __cplusplus > 201703L
+#if defined(__cpp_char8_t)
const char *
char_from_u8(const char8_t * p) {
return reinterpret_cast<const char *>(p);