diff options
author | Alexandre Oliva <oliva@adacore.com> | 2022-02-03 23:00:09 -0300 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-12 12:38:35 +0000 |
commit | d4fc83c642213b4362533ef548c8fffe208ea59a (patch) | |
tree | 5e088ee898189fd9f50fcea7a9245296b26efe46 /gcc/ada/gcc-interface/utils.cc | |
parent | bb1c939d9b800ef9aadf8a82cbafdfae5c88210c (diff) | |
download | gcc-d4fc83c642213b4362533ef548c8fffe208ea59a.zip gcc-d4fc83c642213b4362533ef548c8fffe208ea59a.tar.gz gcc-d4fc83c642213b4362533ef548c8fffe208ea59a.tar.bz2 |
[Ada] Introduce hardbool Machine_Attribute for Ada
Implement and document hardened booleans, from nonstandard boolean types
with representation clauses to the extra validity checking performed on
boolean types annotated with the "hardbool" Machine_Attribute pragma.
gcc/ada/
* doc/gnat_rm/security_hardening_features.rst (Hardened
Booleans): New.
* exp_util.adb (Adjust_Condition): Perform validity checking on
hardbool-annotated types even with -gnatVT.
* gnat_rm.texi: Regenerate.
* gcc-interface/utils.cc (gnat_internal_attribute_table): Ignore
hardbool.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.cc')
-rw-r--r-- | gcc/ada/gcc-interface/utils.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc index 049cf74..5722ed2 100644 --- a/gcc/ada/gcc-interface/utils.cc +++ b/gcc/ada/gcc-interface/utils.cc @@ -208,6 +208,10 @@ const struct attribute_spec gnat_internal_attribute_table[] = { "format_arg", 1, 1, false, true, true, false, fake_attribute_handler, NULL }, + /* This is handled entirely in the front end. */ + { "hardbool", 0, 0, false, true, false, true, + fake_attribute_handler, NULL }, + { NULL, 0, 0, false, false, false, false, NULL, NULL } }; |