This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/52124] New: config/cr16/cr16.c: possibly redundant code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52124

             Bug #: 52124
           Summary: config/cr16/cr16.c: possibly redundant code
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dcb314@hotmail.com


I just ran the static analysis checker cppcheck over the latest trunk code
and it said

[gcc/config/cr16/cr16.c:2024] -> [gcc/config/cr16/cr16.c:2024]: (style) Same
expression on both sides of '||'.

The source code is

  return (cfun->calls_alloca || crtl->calls_eh_return
      || cfun->has_nonlocal_label || crtl->calls_eh_return);

which looks to me like one too many mentions of crtl->calls_eh_return,
but may mean some other variable has been missed out.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]