On 09/22/16 16:34, Kyrill Tkachov wrote:
>
> On 22/09/16 15:27, Alexander Monakov wrote:
>> H_F_P_IS_FRAME_POINTER (the ChangeLog is wrong).  As I understand, the
>> issue is
>> that config/arm/arm.h defines that to plain 0, which causes the
>> warning (ugh?).
>>
>> Does the following restore bootstrap?
>>
>> Thanks.
>> Alexander
>>
>> diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
>> index 373dc85..1ae82c1 100644
>> --- a/gcc/config/arm/arm.h
>> +++ b/gcc/config/arm/arm.h
>> @@ -887,8 +887,8 @@ extern int arm_arch_crc;
>>      ? ARM_HARD_FRAME_POINTER_REGNUM             \
>>      : THUMB_HARD_FRAME_POINTER_REGNUM)
>>
>> -#define HARD_FRAME_POINTER_IS_FRAME_POINTER 0
>> -#define HARD_FRAME_POINTER_IS_ARG_POINTER 0
>> +#define HARD_FRAME_POINTER_IS_FRAME_POINTER false
>> +#define HARD_FRAME_POINTER_IS_ARG_POINTER false
>
> Sorry no, the problem is HARD_FRAME_POINTER_REGNUM that is defined as:
> #define HARD_FRAME_POINTER_REGNUM        \
>    (TARGET_ARM                    \
>     ? ARM_HARD_FRAME_POINTER_REGNUM        \
>     : THUMB_HARD_FRAME_POINTER_REGNUM)
>
> where ARM_HARD_FRAME_POINTER_REGNUM is 11 and
> THUMB_HARD_FRAME_POINTER_REGNUM is 7
> so Bernd's new warning triggers whenever HARD_FRAME_POINTER_REGNUM is
> used as a
> boolean like it is in sel-sched.c and regrename.c
>

Yes and that was obviously a typo.

As of today the warning will no longer trigger if the ?: is in a
macro definition, but most ot the time when the warning triggered
so far, it has pointed to something that needed really our attention
like this one here.

I thinking that there will soon be more different levels of that
warning that may probably not be in -Wall, so we can at least
enable finding code like this.


Bernd.

Reply via email to