From 742293ab87328df69ce2fe64cd32357a717bd874 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 6 Apr 2017 17:21:54 +0200 Subject: [PATCH] Genode::Fifo_element: workaround for compiling with GCC 6 Issue #2383 --- repos/base/include/util/fifo.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/base/include/util/fifo.h b/repos/base/include/util/fifo.h index f76e9fde5..3a1784380 100644 --- a/repos/base/include/util/fifo.h +++ b/repos/base/include/util/fifo.h @@ -186,6 +186,9 @@ class Genode::Fifo_element : public Fifo >::Element * Zero-pointer save: Returns 0 if this pointer is 0 to * cover the case of accessing an empty FIFO. */ + + /* prevent the compiler from optimizing out the 'this' pointer check */ + __attribute__((optimize("-fno-delete-null-pointer-checks"))) inline T *object() { if (this) { return _object; }