aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/accessibility.adb
diff options
context:
space:
mode:
authorSheri Bernstein <bernstein@adacore.com>2023-08-01 16:36:14 +0000
committerMarc Poulhiès <poulhies@adacore.com>2023-09-05 13:05:11 +0200
commit105891ca1beda7aecb2b637cc62f5c8a3ac49386 (patch)
tree99c79874cb37f833c549af5d9b274e83c6e80687 /gcc/ada/accessibility.adb
parent8950360830f0d7f5f356ec447e8493be7b98c2cb (diff)
downloadgcc-105891ca1beda7aecb2b637cc62f5c8a3ac49386.zip
gcc-105891ca1beda7aecb2b637cc62f5c8a3ac49386.tar.gz
gcc-105891ca1beda7aecb2b637cc62f5c8a3ac49386.tar.bz2
ada: Handle GNATcheck violations
For the GNATcheck rule "Improper_Returns", either use pragma Annotate to exempt the violation with the rationale "early returns for performance", or refactor the code by replacing multiple returns by a single return statement with a conditional expression; this is more readable and maintainable, and also conformant with a Highly Recommended design principle of ISO 26262-6. For the GNATcheck rule "Discriminated_Records", use pragma Annotate to exempt the violation with the rationale "only variant records are disallowed". gcc/ada/ * libgnarl/a-reatim.adb (Time_Of): Add pragma to exempt Discriminated_Records. * libgnat/s-imguti.adb (Round, Set_Decimal_Digits): Likewise. * libgnat/s-multip.adb (Number_Of_CPUs): Likewise. * libgnarl/s-tpopsp__posix-foreign.adb (Self): Refactor multiple returns.
Diffstat (limited to 'gcc/ada/accessibility.adb')
0 files changed, 0 insertions, 0 deletions