aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/debug.adb
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2022-05-24 14:09:14 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-04 07:45:54 +0000
commitf7c05e82037356ac4610e9e5d1365b345a17d0f7 (patch)
treefcc31852c5d7045342defa872ea420dc03c937cf /gcc/ada/debug.adb
parente7428fff12ca000b59185c71dee511ac0c886089 (diff)
downloadgcc-f7c05e82037356ac4610e9e5d1365b345a17d0f7.zip
gcc-f7c05e82037356ac4610e9e5d1365b345a17d0f7.tar.gz
gcc-f7c05e82037356ac4610e9e5d1365b345a17d0f7.tar.bz2
[Ada] Avoid unwanted warnings for statically-known-successful assertions
The -gnatwc switch enables warnings for test condition outcomes that are known at compile time. Such warnings are unlikely to be useful in the case of an assertion expression (or a subexpression thereof), so do not generate them in that case. gcc/ada/ * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not generate a warning if the expression in question is an assertion expression, or a subexpression thereof. But do call Test_Comparison so that it can generate warnings for the cases that it generates warnings for. * sem_prag.ads: Modify Assertion_Expression_Pragma constant so that the predicate Sem_Util.In_Assertion_Expression_Pragma returns True for the expression of a Compile_Time_Error pragma.
Diffstat (limited to 'gcc/ada/debug.adb')
0 files changed, 0 insertions, 0 deletions