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/60811] New: arc/arc.c:2135: possible bad argument to abs


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

            Bug ID: 60811
           Summary: arc/arc.c:2135: possible bad argument to abs
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

Static analyser cppcheck says

[trunk/gcc/config/arc/arc.c:2135]: (error) Invalid abs() argument nr 1. A
non-boolean value is required.

Source code is

    gcc_assert (epilogue_p || abs (*first_offset <= 127));

Maybe better code might be

    gcc_assert (epilogue_p || abs (*first_offset) <= 127);


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