From 2c4c78358538c7b260a2d23a66add87e28d9a1ad Mon Sep 17 00:00:00 2001 From: Mikolaj Zalewski Date: Thu, 13 Aug 2009 16:56:44 +0200 Subject: [PATCH] gold: add cast to gold_unreachable to workaround gcc giving invalid "no return statement" warnings --- gold/gold.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gold/gold.h b/gold/gold.h index 1319699..3c9971d 100644 --- a/gold/gold.h +++ b/gold/gold.h @@ -255,9 +255,11 @@ gold_nomem() ATTRIBUTE_NORETURN; // This macro and function are used in cases which can not arise if // the code is written correctly. +// Note: the cast of __FUNCTION__ is needed to workaround gcc bug +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30988 causing invalid warnings. #define gold_unreachable() \ - (gold::do_gold_unreachable(__FILE__, __LINE__, __FUNCTION__)) + (gold::do_gold_unreachable(__FILE__, __LINE__, (const char *)__FUNCTION__)) extern void do_gold_unreachable(const char*, int, const char*) ATTRIBUTE_NORETURN; -- 1.5.4.3