https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105435

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The problem is clang tries to be smart and then recusively warn but that is
broken.

Take:
TARGET_VFP_DOUBLE ? (TARGET_FP16 ? 14 : 12) : 0

clang will even warn about that case.

That is:
#define TARGET_ARM_FP                   \
  (TARGET_VFP_DOUBLE ? (TARGET_FP16 ? 14 : 12) : 0)

#define TARGET_VFP_DOUBLE (1)
#define TARGET_FP16 (1)

int f(int t, int tt)
{
    if (TARGET_ARM_FP) return 1;
    return 2;
}

And yes just changing it to:
if (TARGET_ARM_FP != 0)

fixes the "warning" but the warning should really be fixed instead.

Reply via email to