This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Supressing Specific Warnings in RealView Compiler

Hi everyone,

Does anyone know if it is possible to supress a specific warning (arbitrary portion of code), as opposed to all warnings of a specific type?

For instance, I am porting code that uses assignments in conditions constantly, but consciously and on purpose. I would like to supress these warning for that code I have already verified, but not altogether, as this is just a part of a bigger project for which we would like to be warned about such situations.

Any pointers? I looked in the User Guide and Quick Reference, but could not find a straightforward answer.

Regards,
George Andrew Brindeiro
Robotron Automation and Technology

Parents
  • Yes, complex source lines are seldom good. The maintainance costs are very much related to how easy the code is to read and understand.

    But there can be a number of problems with rewriting an if statement to move out the assign. The assign may be a sub-expression where evaluation order is important.

    The great thing about just adding (assign) != 0 is that it can be inlined without changing any evaluation order.

    There is a bit of a difference between designing new code, and finding good code rewrite rules for existing code.

Reply
  • Yes, complex source lines are seldom good. The maintainance costs are very much related to how easy the code is to read and understand.

    But there can be a number of problems with rewriting an if statement to move out the assign. The assign may be a sub-expression where evaluation order is important.

    The great thing about just adding (assign) != 0 is that it can be inlined without changing any evaluation order.

    There is a bit of a difference between designing new code, and finding good code rewrite rules for existing code.

Children
No data