aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/namet.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 15:19:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 15:19:23 +0200
commit634a926b69be65a7b7db39f74538a91a98a89eab (patch)
tree530e84594a50d84c8b9b035436abbf141e1cd7c6 /gcc/ada/namet.adb
parent884f97cc82df643671e6df4ed43a49518311022a (diff)
downloadgcc-634a926b69be65a7b7db39f74538a91a98a89eab.zip
gcc-634a926b69be65a7b7db39f74538a91a98a89eab.tar.gz
gcc-634a926b69be65a7b7db39f74538a91a98a89eab.tar.bz2
[multiple changes]
2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings On/Off to defend against a spurious warning in conditional compilation. * exp_ch4.adb (Rewrite_Comparison): Reimplemented. * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to defend against a spurious warning in conditional compilation. * output.adb Add a pair of pragma Warnings On/Off to defend against a spurious warning in conditional compilation. * sem_eval.adb (Eval_Relational_Op): Major code clean up. (Fold_General_Op): New routine. (Fold_Static_Real_Op): New routine. (Test_Comparison): New routine. * sem_eval.ads (Test_Comparison): New routine. * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine. (Warn_On_Constant_Valid_Condition): New routine. (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison to detect a specific case. * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine. * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off to defend against a spurious warning in conditional compilation. (Tree_Write): Add a pair of pragma Warnings On/Off to defend against a spurious warning in conditional compilation. * usage.adb Add a pair of pragma Warnings On/Off to defend against a spurious warning in conditional compilation. 2017-04-25 Arnaud Charlet <charlet@adacore.com> * sinfo.ads, sem_ch13.adb: Update comment. From-SVN: r247224
Diffstat (limited to 'gcc/ada/namet.adb')
-rw-r--r--gcc/ada/namet.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/namet.adb b/gcc/ada/namet.adb
index 6e59909..a161046 100644
--- a/gcc/ada/namet.adb
+++ b/gcc/ada/namet.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2017, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -672,6 +672,12 @@ package body Namet is
Max_Chain_Length := C;
end if;
+ -- Disable the warnings emitted by -gnatwc because the tests
+ -- involving Verbosity involve conditional compilation.
+
+ pragma Warnings
+ (Off, "condition can only be * if invalid values present");
+
if Verbosity >= 2 then
Write_Str ("Hash_Table (");
Write_Int (J);
@@ -703,6 +709,9 @@ package body Namet is
N := Name_Entries.Table (N).Hash_Link;
end loop;
end if;
+
+ pragma Warnings
+ (On, "condition can only be * if invalid values present");
end;
end if;
end loop;