メインコンテンツ

MISRA C++:2023 Rule 8.3.1

The built-in unary - operator should not be applied to an expression of unsigned type

R2024b 以降

説明

ルール定義

The built-in unary - operator should not be applied to an expression of unsigned type. 1

Polyspace 実装

Polyspace® は、ポインター型の変数を整数型の変数に変換するキャスト操作にフラグを設定します。

トラブルシューティング

ルール違反が想定されるものの、Polyspace から報告されない場合は、コーディング規約違反が想定どおりに表示されない理由の診断を参照してください。

チェック情報

グループ: Expressions
カテゴリ: 推奨

バージョン履歴

R2024b で導入


1 All MISRA coding rules and directives are © Copyright The MISRA Consortium Limited 2021.

The MISRA coding standards referenced in the Polyspace Bug Finder™ documentation are from the following MISRA standards:

  • MISRA C:2004

  • MISRA C:2012

  • MISRA C:2023

  • MISRA C++:2008

  • MISRA C++:2023

MISRA and MISRA C are registered trademarks of The MISRA Consortium Limited 2021.