aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-24 16:02:48 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-24 16:02:48 +0100
commitab986406d5de916252f13068d3ea5402e8b27461 (patch)
tree4c313edbb10b708f9b35aa93db411411bd2d4e93 /gcc
parent979b94ea4d04a42e00b11d5bb9aa415410f31b06 (diff)
downloadgcc-ab986406d5de916252f13068d3ea5402e8b27461.zip
gcc-ab986406d5de916252f13068d3ea5402e8b27461.tar.gz
gcc-ab986406d5de916252f13068d3ea5402e8b27461.tar.bz2
[multiple changes]
2014-01-24 Robert Dewar <dewar@adacore.com> * sinfo.ads, make.adb, prj-env.adb: Minor reformatting. 2014-01-24 Vincent Celier <celier@adacore.com> * prj.adb (Add_Aggregated_Project): Do not add a project in the list if it is already there. 2014-01-24 Yannick Moy <moy@adacore.com> * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Correct the search for a subrogram declaration to which a pragma is attached. 2014-01-24 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Document --decimal-grouping and --based-grouping switches in gnatpp. From-SVN: r207042
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog20
-rw-r--r--gcc/ada/gnat_ugn.texi16
-rw-r--r--gcc/ada/lib-xref-spark_specific.adb31
-rw-r--r--gcc/ada/make.adb7
-rw-r--r--gcc/ada/prj-env.adb4
-rw-r--r--gcc/ada/prj.adb18
-rw-r--r--gcc/ada/sinfo.ads24
7 files changed, 81 insertions, 39 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 59072a6..576d306 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,23 @@
+2014-01-24 Robert Dewar <dewar@adacore.com>
+
+ * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
+
+2014-01-24 Vincent Celier <celier@adacore.com>
+
+ * prj.adb (Add_Aggregated_Project): Do not add a project in
+ the list if it is already there.
+
+2014-01-24 Yannick Moy <moy@adacore.com>
+
+ * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
+ Correct the search for a subrogram declaration to which a pragma is
+ attached.
+
+2014-01-24 Bob Duff <duff@adacore.com>
+
+ * gnat_ugn.texi: Document --decimal-grouping and
+ --based-grouping switches in gnatpp.
+
2014-01-24 Ed Schonberg <schonberg@adacore.com>
* sinfo.ads: Documentation update.
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 11286ef..ca3eacc 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -14324,9 +14324,23 @@ line indentation is also 1)
@noindent
These switches control the inclusion of missing end/exit labels, and
-the indentation level in @b{case} statements.
+the indentation level in @b{case} statements, etc.
@table @option
+@item --decimal-grouping=@var{n}
+@cindex @option{--decimal-grouping} @command{gnatpp}
+Put underscores in decimal literals (numeric literals without a base)
+every @var{n} characters. If a literal already has one or more
+underscores, it is not modified. For example, with
+@code{--decimal-grouping=3}, @code{1000000} will be changed to
+@code{1_000_000}.
+
+@item --based-grouping=@var{n}
+@cindex @option{--based-grouping} @command{gnatpp}
+Same as @code{--decimal-grouping}, but for based literals. For
+example, with @code{--based-grouping=4}, @code{16#0001FFFE#} will be
+changed to @code{16#0001_FFFE#}.
+
@item ^-e^/NO_MISSED_LABELS^
@cindex @option{^-e^/NO_MISSED_LABELS^} (@command{gnatpp})
Do not insert missing end/exit labels. An end label is the name of
diff --git a/gcc/ada/lib-xref-spark_specific.adb b/gcc/ada/lib-xref-spark_specific.adb
index 849ff0e..9328be8 100644
--- a/gcc/ada/lib-xref-spark_specific.adb
+++ b/gcc/ada/lib-xref-spark_specific.adb
@@ -1023,25 +1023,18 @@ package body SPARK_Specific is
when N_Pragma =>
-- The enclosing subprogram for a precondition, postcondition,
- -- or contract case should be the subprogram to which the
- -- pragma is attached, which can be found by following
- -- previous elements in the list to which the pragma belongs.
-
- if Get_Pragma_Id (Result) = Pragma_Precondition
- or else
- Get_Pragma_Id (Result) = Pragma_Postcondition
- or else
- Get_Pragma_Id (Result) = Pragma_Contract_Cases
- then
- if Is_List_Member (Result)
- and then Present (Prev (Result))
- then
- Result := Prev (Result);
- else
- Result := Parent (Result);
- end if;
-
- else
+ -- or contract case should be the declaration preceding the
+ -- pragma (skipping any other pragmas between this pragma and
+ -- this declaration.
+
+ while Nkind (Result) = N_Pragma
+ and then Is_List_Member (Result)
+ and then Present (Prev (Result))
+ loop
+ Result := Prev (Result);
+ end loop;
+
+ if Nkind (Result) = N_Pragma then
Result := Parent (Result);
end if;
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 84b7a3b..c8c6053 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -4556,14 +4556,13 @@ package body Make is
if Main_Project /= No_Project then
- -- Put all the source directories in ADA_INCLUDE_PATH,
- -- and all the object directories in ADA_OBJECTS_PATH,
- -- except those of library projects.
+ -- Put all the source directories in ADA_INCLUDE_PATH, and all the
+ -- object directories in ADA_OBJECTS_PATH.
Prj.Env.Set_Ada_Paths
(Project => Main_Project,
In_Tree => Project_Tree,
- Including_Libraries => False,
+ Including_Libraries => True,
Include_Path => Use_Include_Path_File);
-- If switch -C was specified, create a binder mapping file
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb
index b3a5d79..b50481e 100644
--- a/gcc/ada/prj-env.adb
+++ b/gcc/ada/prj-env.adb
@@ -147,8 +147,8 @@ package body Prj.Env is
begin
if Recursive then
- -- If it is the first time we call this function for
- -- this project, compute the source path
+ -- If it is the first time we call this function for this project,
+ -- compute the source path
if Project.Ada_Include_Path = null then
Buffer := new String (1 .. Buffer_Initial);
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index e3a4c49..d7e2bc7 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -1083,8 +1083,24 @@ package body Prj is
----------------------------
procedure Add_Aggregated_Project
- (Project : Project_Id; Path : Path_Name_Type) is
+ (Project : Project_Id;
+ Path : Path_Name_Type)
+ is
+ Aggregated : Aggregated_Project_List;
+
begin
+ -- Check if the project is already in the aggregated project list. If it
+ -- is, do not add it again.
+
+ Aggregated := Project.Aggregated_Projects;
+ while Aggregated /= null loop
+ if Path = Aggregated.Path then
+ return;
+ else
+ Aggregated := Aggregated.Next;
+ end if;
+ end loop;
+
Project.Aggregated_Projects := new Aggregated_Project'
(Path => Path,
Project => No_Project,
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index f71fdd0..61c7da4 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -517,7 +517,7 @@ package Sinfo is
-- form that meets additional requirements.
-- This light expansion does two transformations of the tree that cannot
- -- be postponed after semantic analysis:
+ -- be postponed till after semantic analysis:
-- 1. Replace object renamings by renamed object. This requires the
-- introduction of temporaries at the point of the renaming, which
@@ -555,15 +555,15 @@ package Sinfo is
-- The following flag fields appear in expression nodes:
- -- Do_Division_Check
- -- Do_Overflow_Check
- -- Do_Range_Check
+ -- Do_Division_Check
+ -- Do_Overflow_Check
+ -- Do_Range_Check
-- These three flags are always set by the front end during semantic
-- analysis, on expression nodes that may trigger the corresponding
- -- check. The front end then inserts or not the check during expansion.
- -- In particular, these flags should also be correctly set in ASIS mode
- -- and GNATprove mode.
+ -- check. The front end then inserts or not the check during expansion. In
+ -- particular, these flags should also be correctly set in ASIS mode and
+ -- GNATprove mode.
-- Note that this accounts for all nodes that trigger the corresponding
-- checks, except for range checks on subtype_indications, which may be
@@ -572,11 +572,11 @@ package Sinfo is
-- The following flag fields appear in various nodes:
- -- Do_Accessibility_Check
- -- Do_Discriminant_Check
- -- Do_Length_Check
- -- Do_Storage_Check
- -- Do_Tag_Check
+ -- Do_Accessibility_Check
+ -- Do_Discriminant_Check
+ -- Do_Length_Check
+ -- Do_Storage_Check
+ -- Do_Tag_Check
-- These flags are used in some specific cases by the front end, either
-- during semantic analysis or during expansion, and cannot be expected