* gnatls.adb (Normalize): New function.
(Gnatls): Get the target parameters. On targets other than VMS,
normalize the path names in the source search path, the object search
path and the project search path.
2014-07-16 Ed Schonberg <schonberg@adacore.com>
* sem_case.adb: Avoid self-checking of case expressions in
dynamic predicates.
2014-07-16 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document effect of Suppress_Initialization on tags and
discriminants.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212658
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-07-16 Vincent Celier <celier@adacore.com>
+
+ * gnatls.adb (Normalize): New function.
+ (Gnatls): Get the target parameters. On targets other than VMS,
+ normalize the path names in the source search path, the object search
+ path and the project search path.
+
+2014-07-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_case.adb: Avoid self-checking of case expressions in
+ dynamic predicates.
+
+2014-07-16 Robert Dewar <dewar@adacore.com>
+
+ * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
+ discriminants.
+
2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
* switch-b.adb (Scan_Binder_Switches): Add missing guard.
for other than a first subtype, then it applies only to the given subtype.
The pragma may not be given after the type is frozen.
+Note that this includes eliminating initialization of discriminants
+for discriminated types, and tags for tagged types. In these cases,
+you will have to use some non-portable mechanism (e.g. address
+overlays or unchecked conversion) to achieve required initialization
+of these fields before accessing any object of the corresponding type.
+
@node Pragma Task_Name
@unnumberedsec Pragma Task_Name
@findex Task_Name
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
with Rident; use Rident;
with Sdefault;
with Snames;
+with Stringt;
with Switch; use Switch;
+with Targparm; use Targparm;
with Types; use Types;
with GNAT.Case_Util; use GNAT.Case_Util;
function Image (Restriction : Restriction_Id) return String;
-- Returns the capitalized image of Restriction
+ function Normalize (Path : String) return String;
+ -- Returns a normalized path name, except on VMS where the argument Path
+ -- is returned, to keep the host pathname syntax. On Windows, the directory
+ -- separators are set to '\' in Normalize_Pathname.
+
------------------------------------------
-- GNATDIST specific output subprograms --
------------------------------------------
return Result;
end Image;
+ ---------------
+ -- Normalize --
+ ---------------
+
+ function Normalize (Path : String) return String is
+ begin
+ if OpenVMS_On_Target then
+ return Path;
+ else
+ return Normalize_Pathname (Path);
+ end if;
+ end Normalize;
+
--------------------------------
-- Output_License_Information --
--------------------------------
Csets.Initialize;
Snames.Initialize;
+ Stringt.Initialize;
-- First check for --version or --help
Check_Version_And_Help ("GNATLS", "1992");
+ Osint.Add_Default_Search_Dirs;
+ Get_Target_Parameters;
+
-- Loop to scan out arguments
Next_Arg := 1;
if Dir_In_Src_Search_Path (J)'Length = 0 then
Write_Str ("<Current_Directory>");
else
- Write_Str (To_Host_Dir_Spec
- (Dir_In_Src_Search_Path (J).all, True).all);
+ Write_Str
+ (Normalize
+ (To_Host_Dir_Spec
+ (Dir_In_Src_Search_Path (J).all, True).all));
end if;
Write_Eol;
if Dir_In_Obj_Search_Path (J)'Length = 0 then
Write_Str ("<Current_Directory>");
else
- Write_Str (To_Host_Dir_Spec
- (Dir_In_Obj_Search_Path (J).all, True).all);
+ Write_Str
+ (Normalize
+ (To_Host_Dir_Spec
+ (Dir_In_Obj_Search_Path (J).all, True).all));
end if;
Write_Eol;
Write_Str (" ");
Write_Str
- (Normalize_Pathname
+ (Normalize
(To_Host_Dir_Spec
(Project_Path (First .. Last), True).all));
Write_Eol;
-- --
-- B o d y --
-- --
--- Copyright (C) 1996-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2014, 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- --
-- --
------------------------------------------------------------------------------
+with Aspects; use Aspects;
with Atree; use Atree;
with Einfo; use Einfo;
with Errout; use Errout;
Bounds_Hi : constant Node_Id := Type_High_Bound (Bounds_Type);
Bounds_Lo : constant Node_Id := Type_Low_Bound (Bounds_Type);
- Has_Predicate : constant Boolean :=
- Is_Static_Subtype (Bounds_Type)
- and then Present (Static_Predicate (Bounds_Type));
Num_Choices : constant Nat := Choice_Table'Last;
Choice : Node_Id;
Sorting.Sort (Positive (Choice_Table'Last));
- -- The type covered by the list of choices is actually a static subtype
- -- subject to a static predicate. The predicate defines subsets of legal
- -- values and requires finer grained analysis.
-
- if Has_Predicate then
+ -- If the type covered by the list of choices is actually a static
+ -- subtype subject to a static predicate, then the predicate defines
+ -- subsets of legal values and we must verify that the branches of the
+ -- case match those subsets. If there is no static_predicate there is no
+ -- compiler check to perform. In particular we don't want any checks on
+ -- a case expression that itself appears as the expression of a dynamic
+ -- predicate. A case expression that defines a static predicate is
+ -- expanded earlier into a membership test and is not subject to this
+ -- spurious self-check either.
+
+ if Has_Aspect (Bounds_Type, Aspect_Static_Predicate) then
Pred := First (Static_Predicate (Bounds_Type));
Prev_Lo := Uint_Minus_1;
Prev_Hi := Uint_Minus_1;