Commit 4cfeb8eb authored by Kenton Varda's avatar Kenton Varda

Better work-around for weird GCC 4.8 warning breaking tests.

parent 7638ec97
......@@ -21,14 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ == 8
// GCC 4.8 warns that ConstResult_<T, Tuple<>>::operator() returns an uninitialized value from
// the second branch. This is bogus AFAICT. Moreover, the warning comes from the use of the
// `number` parser. GCC does not complain when this parser is used in the Cap'n Proto compiler;
// only when it is used in this test.
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include "char.h"
#include "../string.h"
#include <gtest/gtest.h>
......
......@@ -193,6 +193,16 @@ case ${CXX:-g++} in
# There's an unused private field in gtest.
export CXXFLAGS="$CXXFLAGS -Wno-unused-private-field"
;;
*g++* )
if (${CXX:-g++} --version | grep -q ' 4[.]8'); then
# GCC 4.8 emits a weird uninitialized warning in kj/parse/char-test, deep in one of the parser
# combinators. It could be a real bug but there is just not enough information to figure out
# where the problem is coming from, because GCC does not provide any description of the inlining
# that has occurred. Since I have not observed any actual problem (tests pass, etc.), I'm
# muting it for now.
CXXFLAGS="$CXXFLAGS -Wno-maybe-uninitialized"
fi
;;
esac
cd c++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment