diff --git a/spirv_cross_containers.hpp b/spirv_cross_containers.hpp index 11cb3719..393f4614 100644 --- a/spirv_cross_containers.hpp +++ b/spirv_cross_containers.hpp @@ -297,7 +297,10 @@ public: void pop_back() { - resize(this->buffer_size - 1); + // Work around false positive warning on GCC 8.3. + // Calling pop_back on empty vector is undefined. + if (!this->empty()) + resize(this->buffer_size - 1); } template