aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/opt.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-09 12:32:50 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-09 12:32:50 +0200
commitbd29d5193a42a7fbe92c5052fa8d28f35290c823 (patch)
tree29c9bde6be0184567a5d781848146e9b3c6e96b3 /gcc/ada/opt.ads
parent0e35524dec6e62dfe35360f11eee7c7031c5ab2e (diff)
downloadgcc-bd29d5193a42a7fbe92c5052fa8d28f35290c823.zip
gcc-bd29d5193a42a7fbe92c5052fa8d28f35290c823.tar.gz
gcc-bd29d5193a42a7fbe92c5052fa8d28f35290c823.tar.bz2
[multiple changes]
2010-09-09 Vincent Celier <celier@adacore.com> * osint.adb (Canonical_Case_File_Name): Use procedure To_Lower in System.Case_Util (Canonical_Case_Env_Var_Name): Ditto 2010-09-09 Bob Duff <duff@adacore.com> * g-pehage.adb (Allocate): Initialize the allocated elements of IT. 2010-09-09 Robert Dewar <dewar@adacore.com> * cstand.adb: Mark Boolean and Character types as Ordered * einfo.adb (Has_Pragma_Ordered): New flag * einfo.ads (Has_Pragma_Ordered): New flag * g-calend.ads: Mark Day_Name as Ordered * opt.ads: Mark Ada_Version_Type as Ordered (Warn_On_Unordered_Enumeration_Type): New flag * par-prag.adb: Add procdessing for pragma Ordered * s-ficobl.ads (Read_File_Mode): New subtype * s-fileio.adb: Use Read_File_Mode instead of explicit ranges * s-taskin.ads: Mark Entry_Call_State as ordered * sem_ch3.adb (Build_Derived_Enumeration_Type): Inherit Has_Pragma_Ordered. * sem_ch6.ads: Mark Conformance_Type as Ordered * sem_prag.adb: Implement pragma Ordered * sem_res.adb (Bad_Unordered_Enumeration_Reference): New function (Resolve_Comparison_Op): Diagnose unordered comparison (Resolve_Range): Diagnose unordered range * sem_warn.adb (Warn_On_Unordered_Enumeration_Type): New flag (from -gnatw.u/U) * snames.ads-tmpl: Add entry for pragma Ordered * style.ads (Check_Enumeration_Subrange): Removed * styleg.adb (Check_Enumeration_Subrange): Removed * styleg.ads (Check_Enumeration_Subrange): Removed * stylesw.adb: Remove handling of -gnatyE switch * stylesw.ads: (Style_Check_Enumeration_Subranges): Removed * vms_data.ads: Remove -gnatyE entries Add -gnatw.u entries * ug_words: Entries for -gnatw.u and -gnatw.U * gnat_ugn.texi: Document -gnatw.u/-gnatw.U switches * gnat_rm.texi: Document pragma Ordered. * s-tasren.adb: Avoid unnecessary comparison on unordered enumeration. * s-tpobop.adb: Remove comparison on unordered enumeration type. From-SVN: r164070
Diffstat (limited to 'gcc/ada/opt.ads')
-rw-r--r--gcc/ada/opt.ads8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 6f0b6d9..4107b0c 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -65,6 +65,7 @@ package Opt is
-- Set True if binder file to be generated in Ada rather than C
type Ada_Version_Type is (Ada_83, Ada_95, Ada_05, Ada_12);
+ pragma Ordered (Ada_Version_Type);
-- Versions of Ada for Ada_Version below. Note that these are ordered,
-- so that tests like Ada_Version >= Ada_95 are legitimate and useful.
@@ -1456,6 +1457,13 @@ package Opt is
-- non-portable semantics (e.g. because sizes of types differ). The default
-- is that this warning is enabled.
+ Warn_On_Unordered_Enumeration_Type : Boolean := False;
+ -- GNAT
+ -- Set to True to generate warnings for inappropriate uses (comparisons
+ -- and explicit ranges) on unordered enumeration types (which includes
+ -- all enumeration types for which pragma Ordered is not given). The
+ -- default is that this warning is disabled.
+
Warn_On_Unrecognized_Pragma : Boolean := True;
-- GNAT
-- Set to True to generate warnings for unrecognized pragmas. The default