public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/50356] New: Poor if condition in h8300 config code @ 2011-09-11 16:57 dcb314 at hotmail dot com 2012-10-04 9:21 ` [Bug target/50356] " manu at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: dcb314 at hotmail dot com @ 2011-09-11 16:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50356 Bug #: 50356 Summary: Poor if condition in h8300 config code Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: dcb314@hotmail.com I just tried the cppcheck tool over the source code of gcc 4.7 snapshot 20110910. The tool said [gcc/config/h8300/h8300.c:1209]: (warning) Mutual exclusion over || always evaluates to true. Did you intend to use && instead? The source code is if (-4 <= n || n <= 4) Maybe better code might be if (-4 <= n && n <= 4) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50356] Poor if condition in h8300 config code 2011-09-11 16:57 [Bug target/50356] New: Poor if condition in h8300 config code dcb314 at hotmail dot com @ 2012-10-04 9:21 ` manu at gcc dot gnu.org 2012-10-04 19:05 ` law at redhat dot com ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: manu at gcc dot gnu.org @ 2012-10-04 9:21 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50356 Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kazu at codesourcery dot | |com, law at redhat dot com, | |manu at gcc dot gnu.org --- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-04 09:20:41 UTC --- GCC would have caught this with -Wlogical-op, if it was enabled. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50356] Poor if condition in h8300 config code 2011-09-11 16:57 [Bug target/50356] New: Poor if condition in h8300 config code dcb314 at hotmail dot com 2012-10-04 9:21 ` [Bug target/50356] " manu at gcc dot gnu.org @ 2012-10-04 19:05 ` law at redhat dot com 2012-10-04 20:58 ` law at gcc dot gnu.org 2012-10-04 20:59 ` law at redhat dot com 3 siblings, 0 replies; 5+ messages in thread From: law at redhat dot com @ 2012-10-04 19:05 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50356 Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-10-04 Ever Confirmed|0 |1 --- Comment #2 from Jeffrey A. Law <law at redhat dot com> 2012-10-04 19:04:45 UTC --- Note that this bug will only effect the quality of the code we generate as this bug is in a costing function. I'll have it fixed shortly. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50356] Poor if condition in h8300 config code 2011-09-11 16:57 [Bug target/50356] New: Poor if condition in h8300 config code dcb314 at hotmail dot com 2012-10-04 9:21 ` [Bug target/50356] " manu at gcc dot gnu.org 2012-10-04 19:05 ` law at redhat dot com @ 2012-10-04 20:58 ` law at gcc dot gnu.org 2012-10-04 20:59 ` law at redhat dot com 3 siblings, 0 replies; 5+ messages in thread From: law at gcc dot gnu.org @ 2012-10-04 20:58 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50356 --- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> 2012-10-04 20:58:33 UTC --- Author: law Date: Thu Oct 4 20:58:30 2012 New Revision: 192103 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192103 Log: * PR target/50356 * config/h8300/h8300.c (h8300_rtx_costs): Fix typo in CONST_INT case. Modified: trunk/gcc/ChangeLog trunk/gcc/config/h8300/h8300.c ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50356] Poor if condition in h8300 config code 2011-09-11 16:57 [Bug target/50356] New: Poor if condition in h8300 config code dcb314 at hotmail dot com ` (2 preceding siblings ...) 2012-10-04 20:58 ` law at gcc dot gnu.org @ 2012-10-04 20:59 ` law at redhat dot com 3 siblings, 0 replies; 5+ messages in thread From: law at redhat dot com @ 2012-10-04 20:59 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50356 Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Jeffrey A. Law <law at redhat dot com> 2012-10-04 20:59:44 UTC --- Obvious typo fixed. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-04 20:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-09-11 16:57 [Bug target/50356] New: Poor if condition in h8300 config code dcb314 at hotmail dot com 2012-10-04 9:21 ` [Bug target/50356] " manu at gcc dot gnu.org 2012-10-04 19:05 ` law at redhat dot com 2012-10-04 20:58 ` law at gcc dot gnu.org 2012-10-04 20:59 ` law at redhat dot com
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).