[Bug c/59203] New: config/cris/cris.c:2491: possible typo ?
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 20 08:36:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59203
Bug ID: 59203
Summary: config/cris/cris.c:2491: possible typo ?
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
I just ran cppcheck over the trunk source code.
It said
[trunk/gcc/config/cris/cris.c:2491] -> [trunk/gcc/config/cris/cris.c:2491]:
(style) Same expression on both sides of '||'.
Source code is
enum cris_pic_symbol_type t1 = cris_pic_symbol_type_of (XEXP (x, 0));
enum cris_pic_symbol_type t2 = cris_pic_symbol_type_of (XEXP (x, 1));
gcc_assert (t1 == cris_no_symbol || t2 == cris_no_symbol);
if (t1 == cris_got_symbol || t1 == cris_got_symbol)
return cris_got_symbol_needing_fixup;
Suggest code rework. It might be as simple as changing t1 to t2 after
the ||, but given the assert, I doubt it.
More information about the Gcc-bugs
mailing list