base-hw: workaround for compiling with GCC 6

Issue #2382
This commit is contained in:
Christian Prochaska 2017-04-06 17:22:15 +02:00 committed by Christian Helmuth
parent f90a4a85e0
commit 767d86e6dc
1 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,8 @@ void prepare_reinit_main_thread() { prepare_init_main_thread(); }
** Thread **
************/
/* prevent the compiler from optimizing out the 'this' pointer check */
__attribute__((optimize("-fno-delete-null-pointer-checks")))
Native_utcb *Thread::utcb()
{
if (this) { return &_stack->utcb(); }