[PATCH] gold: add cast to gold_unreachable to workaround gcc giving invalid "no return statement" warnings

Mikolaj Zalewski mikolajz@google.com
Fri Aug 14 09:28:00 GMT 2009


  Yes, this patch works.

Mikołaj

On Fri, Aug 14, 2009 at 10:34 AM, Ian Lance Taylor<iant@google.com> wrote:
> Mikolaj Zalewski <mikolajz@google.com> writes:
>
>>   I couldn't compile gold today because of the "no return statement"
>> warning when using gold_unreachable. At
>> http://gcc.gnu.org/ml/gcc-bugs/2007-11/msg01605.html I've found a
>> workaround that should work for gcc >= 3.4. Such a patch that affects
>> only gold_unreachable is ok?
>>
>> 2009-08-13  Mikolaj Zalewski  <mikolajz@google.com>
>>
>>       * gold.h (gold_unreachable): Add a cast.
>
> I would prefer a patch like this one, which gives us a way to clean it
> up a few years down the road.  Could you check whether this solves the
> problem for you?  If it does, I'll commit it.  Thanks.
>
> Ian
>
>
> 2009-08-14  Ian Lance Taylor  <iant@google.com>
>
>        * gold.h (FUNCTION_NAME): Define.
>        (gold_unreachable): Use FUNCTION_NAME.
>
>
>



More information about the Binutils mailing list