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

            Bug ID: 111270
           Summary: gcc/config/i386/i386-options.cc:3039:8: warning:
                    duplicated ‘if ’ condition [-Wduplicated-cond]
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Source code is

  if (ix86_tune_features [X86_TUNE_AVOID_256FMA_CHAINS])
    SET_OPTION_IF_UNSET (opts, opts_set, param_avoid_fma_max_bits, 512);
  else if (ix86_tune_features [X86_TUNE_AVOID_256FMA_CHAINS])
    SET_OPTION_IF_UNSET (opts, opts_set, param_avoid_fma_max_bits, 256);
  else if (ix86_tune_features [X86_TUNE_AVOID_128FMA_CHAINS])
    SET_OPTION_IF_UNSET (opts, opts_set, param_avoid_fma_max_bits, 128);

Suggest code rework. 

I got this by adding -Wduplicated-cond to a build.

If someone were brave enough to add this warning flag to -Wall, then
other developers could benefit from a well hidden but useful flag.

Reply via email to