public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111270] New: gcc/config/i386/i386-options.cc:3039:8: warning: duplicated ‘if ’ condition [-Wduplicated-cond] Date: Fri, 01 Sep 2023 14:54:28 +0000 [thread overview] Message-ID: <bug-111270-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
next reply other threads:[~2023-09-01 14:54 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-01 14:54 dcb314 at hotmail dot com [this message] 2023-09-01 15:05 ` [Bug target/111270] " dcb314 at hotmail dot com 2023-09-01 20:43 ` redi at gcc dot gnu.org 2023-09-01 20:44 ` redi at gcc dot gnu.org 2023-09-01 21:02 ` dcb314 at hotmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-111270-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).