aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-17 08:47:15 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-17 08:47:15 +0200
commitbb01279084cc4ed7c7894d16be6af502fb5ad914 (patch)
tree4d92ba93eaafdfb64c5c62d90193677f7811f7c7
parentee10c0ec8875d997a4892fbbdf5f49c2d6d824b9 (diff)
downloadgcc-bb01279084cc4ed7c7894d16be6af502fb5ad914.zip
gcc-bb01279084cc4ed7c7894d16be6af502fb5ad914.tar.gz
gcc-bb01279084cc4ed7c7894d16be6af502fb5ad914.tar.bz2
[multiple changes]
2014-07-17 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document new restriction No_Long_Long_Integers. * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we could do this by actually expanding a real generic. * a-tags.ads: Add comments about performance. * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration): Print Etype of defining identifier, rather than the object definition. More information. 2014-07-17 Thomas Quinot <quinot@adacore.com> * exp_dist.adb: Minor documentation clarification. 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb (Is_Aliased): Revert previous change. 2014-07-17 Vincent Celier <celier@adacore.com> * g-comlin.adb (Try_Help): New procedure. (Getopt): Use new procedure Try_Help. * g-comlin.ads (Try_Help): New procedure. 2014-07-17 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Minor update. From-SVN: r212728
-rw-r--r--gcc/ada/ChangeLog28
-rw-r--r--gcc/ada/a-tags.ads23
-rw-r--r--gcc/ada/clean.adb3
-rw-r--r--gcc/ada/exp_ch4.adb3
-rw-r--r--gcc/ada/exp_dist.adb5
-rw-r--r--gcc/ada/exp_util.adb83
-rw-r--r--gcc/ada/g-comlin.adb21
-rw-r--r--gcc/ada/g-comlin.ads9
-rw-r--r--gcc/ada/gnat_rm.texi10
-rw-r--r--gcc/ada/gnat_ugn.texi56
-rw-r--r--gcc/ada/gnatbind.adb2
-rw-r--r--gcc/ada/gnatchop.adb2
-rw-r--r--gcc/ada/gnatfind.adb12
-rw-r--r--gcc/ada/gnatls.adb7
-rw-r--r--gcc/ada/gnatname.adb7
-rw-r--r--gcc/ada/gnatxref.adb10
-rw-r--r--gcc/ada/gprep.adb6
-rw-r--r--gcc/ada/make.adb3
-rw-r--r--gcc/ada/restrict.ads2
-rw-r--r--gcc/ada/s-rident.ads2
-rw-r--r--gcc/ada/sem_ch3.adb4
-rw-r--r--gcc/ada/sem_util.adb2
-rw-r--r--gcc/ada/sem_util.ads2
-rw-r--r--gcc/ada/sprint.adb10
24 files changed, 227 insertions, 85 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index f70dcf8..2105a7e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,33 @@
2014-07-17 Robert Dewar <dewar@adacore.com>
+ * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
+ * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
+ could do this by actually expanding a real generic.
+ * a-tags.ads: Add comments about performance.
+ * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
+ Print Etype of defining identifier, rather than the object
+ definition. More information.
+
+2014-07-17 Thomas Quinot <quinot@adacore.com>
+
+ * exp_dist.adb: Minor documentation clarification.
+
+2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_util.adb (Is_Aliased): Revert previous change.
+
+2014-07-17 Vincent Celier <celier@adacore.com>
+
+ * g-comlin.adb (Try_Help): New procedure.
+ (Getopt): Use new procedure Try_Help.
+ * g-comlin.ads (Try_Help): New procedure.
+
+2014-07-17 Bob Duff <duff@adacore.com>
+
+ * gnat_ugn.texi: Minor update.
+
+2014-07-17 Robert Dewar <dewar@adacore.com>
+
* gnat_rm.texi: Improve documentation of Unrestricted_Access.
* sinfo.ads: Document restriction on aggregates (must expand to
assignments if one or more assignments needs expansion, e.g. for
diff --git a/gcc/ada/a-tags.ads b/gcc/ada/a-tags.ads
index 0a0a375..9239c99 100644
--- a/gcc/ada/a-tags.ads
+++ b/gcc/ada/a-tags.ads
@@ -33,7 +33,28 @@
-- --
------------------------------------------------------------------------------
-with System;
+-- The operations in this package provide the guarantee that all dispatching
+-- calls on primitive operations of tagged types and interfaces take constant
+-- time (in terms of source lines executed), that is to say, the cost of these
+-- calls is independent of the number of primitives of the type or interface,
+-- and independent of the number of ancestors or interface progenitors that a
+-- tagged type may have.
+
+-- The following subprograms of the public part of this package take constant
+-- time (in terms of source lines executed):
+
+-- Expanded_Name, Wide_Expanded_Name, Wide_Wide_Expanded_Name, External_Tag,
+-- Is_Descendant_At_Same_Level, Parent_Tag
+-- Descendant_Tag (when used with a library-level tagged type),
+-- Internal_Tag (when used with a library-level tagged type).
+
+-- The following subprograms of the public part of this package take non
+-- constant time (in terms of sources line executed):
+
+-- Descendant_Tag (when used with a locally defined tagged type)
+-- Internal_Tag (when used with a locally defined tagged type)
+-- Interface_Ancestor_Tagswith System
+
with System.Storage_Elements;
package Ada.Tags is
diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb
index dd216cd..0a7108d 100644
--- a/gcc/ada/clean.adb
+++ b/gcc/ada/clean.adb
@@ -47,6 +47,7 @@ with Types; use Types;
with Ada.Command_Line; use Ada.Command_Line;
+with GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.IO; use GNAT.IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
@@ -1467,7 +1468,7 @@ package body Clean is
if Argument_Count = 0 then
Usage;
else
- Put_Line ("type ""gnatclean --help"" for help");
+ Try_Help;
end if;
return;
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 9a86fb4..3aec3b1 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -11805,6 +11805,9 @@ package body Exp_Ch4 is
-- do not need to generate an actual or formal generic part, just the
-- instantiated function itself.
+ -- Perhaps we could have the actual generic available in the run-time,
+ -- obtained by rtsfind, and actually expand a real instantiation ???
+
function Make_Array_Comparison_Op
(Typ : Entity_Id;
Nod : Node_Id) return Node_Id
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
index 9e8b32d..ae8a390 100644
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -2036,7 +2036,10 @@ package body Exp_Dist is
Append_To (Decls, RPC_Receiver_Decl);
else
- -- Comments required here???
+ -- Case of RACW implementing a RAS with the GARLIC PCS: there is
+ -- no RPC receiver in that case, this is just an indication of
+ -- where to insert code in the tree (see comment in declaration of
+ -- type Stub_Structure).
RPC_Receiver_Decl := Last (Decls);
end if;
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 6eb4243..acd1073 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -4238,9 +4238,9 @@ package body Exp_Util is
-- When a function call appears in Object.Operation format, the
-- original representation has two possible forms depending on the
-- availability of actual parameters:
- --
- -- Obj.Func_Call -- N_Selected_Component
- -- Obj.Func_Call (Param) -- N_Indexed_Component
+
+ -- Obj.Func_Call N_Selected_Component
+ -- Obj.Func_Call (Param) N_Indexed_Component
else
if Nkind (Expr) = N_Indexed_Component then
@@ -4557,15 +4557,6 @@ package body Exp_Util is
-- Start of processing for Is_Aliased
begin
- -- Aliasing in expression with actions does not matter because the
- -- scope of the transient object is always limited by the scope of
- -- the EWA. Such objects are always hooked and always finalized at
- -- the end of the EWA's scope.
-
- if Nkind (Rel_Node) = N_Expression_With_Actions then
- return False;
- end if;
-
Stmt := First_Stmt;
while Present (Stmt) loop
if Nkind (Stmt) = N_Object_Declaration then
@@ -5295,18 +5286,34 @@ package body Exp_Util is
function Is_Volatile_Reference (N : Node_Id) return Boolean is
begin
- if Nkind (N) in N_Has_Etype
- and then Present (Etype (N))
- and then Treat_As_Volatile (Etype (N))
- then
+ -- Only source references are to be treated as volatile, internally
+ -- generated stuff cannot have volatile external effects.
+
+ if not Comes_From_Source (N) then
+ return False;
+
+ -- Never true for reference to a type
+
+ elsif Is_Entity_Name (N) and then Is_Type (Entity (N)) then
+ return False;
+
+ -- True if object reference with volatile type
+
+ elsif Is_Volatile_Object (N) then
return True;
+ -- True if reference to volatile entity
+
elsif Is_Entity_Name (N) then
return Treat_As_Volatile (Entity (N));
+ -- True for slice of volatile array
+
elsif Nkind (N) = N_Slice then
return Is_Volatile_Reference (Prefix (N));
+ -- True if volatile component
+
elsif Nkind_In (N, N_Indexed_Component, N_Selected_Component) then
if (Is_Entity_Name (Prefix (N))
and then Has_Volatile_Components (Entity (Prefix (N))))
@@ -5318,6 +5325,8 @@ package body Exp_Util is
return Is_Volatile_Reference (Prefix (N));
end if;
+ -- Otherwise false
+
else
return False;
end if;
@@ -6844,9 +6853,7 @@ package body Exp_Util is
-- (this happens because routines Duplicate_Subexpr_XX implicitly invoke
-- Remove_Side_Effects).
- if No (Exp_Type)
- or else Ekind (Exp_Type) = E_Access_Attribute_Type
- then
+ if No (Exp_Type) or else Ekind (Exp_Type) = E_Access_Attribute_Type then
return;
-- No action needed for side-effect free expressions
@@ -6913,9 +6920,12 @@ package body Exp_Util is
Insert_Action (Exp, E);
-- If the expression has the form v.all then we can just capture the
- -- pointer, and then do an explicit dereference on the result.
+ -- pointer, and then do an explicit dereference on the result, but
+ -- this is not right if this is a volatile reference.
- elsif Nkind (Exp) = N_Explicit_Dereference then
+ elsif Nkind (Exp) = N_Explicit_Dereference
+ and then not Is_Volatile_Reference (Exp)
+ then
Def_Id := Make_Temporary (Loc, 'R', Exp);
Res :=
Make_Explicit_Dereference (Loc, New_Occurrence_Of (Def_Id, Loc));
@@ -6987,17 +6997,21 @@ package body Exp_Util is
-- This is needed for correctness in the case of a volatile object of
-- a non-volatile type because the Make_Reference call of the "default"
-- approach would generate an illegal access value (an access value
- -- cannot designate such an object - see Analyze_Reference). We skip
- -- using this scheme if we have an object of a volatile type and we do
- -- not have Name_Req set true (see comments for Side_Effect_Free).
-
- -- In Ada 2012 a qualified expression is an object, but for purposes of
- -- removing side effects it still need to be transformed into a separate
- -- declaration, particularly if the expression is an aggregate.
+ -- cannot designate such an object - see Analyze_Reference).
elsif Is_Object_Reference (Exp)
and then Nkind (Exp) /= N_Function_Call
+
+ -- In Ada 2012 a qualified expression is an object, but for purposes
+ -- of removing side effects it still need to be transformed into a
+ -- separate declaration, particularly in the case of an aggregate.
+
and then Nkind (Exp) /= N_Qualified_Expression
+
+ -- We skip using this scheme if we have an object of a volatile
+ -- type and we do not have Name_Req set true (see comments for
+ -- Side_Effect_Free).
+
and then (Name_Req or else not Treat_As_Volatile (Exp_Type))
then
Def_Id := Make_Temporary (Loc, 'R', Exp);
@@ -8030,6 +8044,12 @@ package body Exp_Util is
-- Start of processing for Side_Effect_Free
begin
+ -- If volatile reference, always consider it to have side effects
+
+ if Is_Volatile_Reference (N) then
+ return False;
+ end if;
+
-- Note on checks that could raise Constraint_Error. Strictly, if we
-- take advantage of 11.6, these checks do not count as side effects.
-- However, we would prefer to consider that they are side effects,
@@ -8043,12 +8063,17 @@ package body Exp_Util is
if Is_Entity_Name (N) then
+ -- A type reference is always side effect free
+
+ if Is_Type (Entity (N)) then
+ return True;
+
-- Variables are considered to be a side effect if Variable_Ref
-- is set or if we have a volatile reference and Name_Req is off.
-- If Name_Req is True then we can't help returning a name which
-- effectively allows multiple references in any case.
- if Is_Variable (N, Use_Original_Node => False) then
+ elsif Is_Variable (N, Use_Original_Node => False) then
return not Variable_Ref
and then (not Is_Volatile_Reference (N) or else Name_Req);
diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb
index 4359294..d472ee5 100644
--- a/gcc/ada/g-comlin.adb
+++ b/gcc/ada/g-comlin.adb
@@ -3534,10 +3534,7 @@ package body GNAT.Command_Line is
& ": unrecognized option '"
& Full_Switch (Parser)
& "'");
- Put_Line (Standard_Error,
- "Try `"
- & Base_Name (Ada.Command_Line.Command_Name)
- & " --help` for more information.");
+ Try_Help;
raise;
@@ -3588,4 +3585,20 @@ package body GNAT.Command_Line is
end loop;
end Build;
+ --------------
+ -- Try_Help --
+ --------------
+
+ -- Note: Any change to the message displayed should also be done in
+ -- gnatbind.adb that does not use this interface.
+
+ procedure Try_Help is
+ begin
+ Put_Line
+ (Standard_Error,
+ "try `" &
+ Base_Name (Ada.Command_Line.Command_Name) &
+ " --help` for more information.");
+ end Try_Help;
+
end GNAT.Command_Line;
diff --git a/gcc/ada/g-comlin.ads b/gcc/ada/g-comlin.ads
index c3bfe30..109e836 100644
--- a/gcc/ada/g-comlin.ads
+++ b/gcc/ada/g-comlin.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2013, AdaCore --
+-- Copyright (C) 1999-2014, AdaCore --
-- --
-- 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- --
@@ -1000,6 +1000,13 @@ package GNAT.Command_Line is
--
-- Expanded has the same meaning as in Start.
+ procedure Try_Help;
+ -- Output a message on standard error to indicate how to get the usage for
+ -- the executable. This procedure should only be called when the executable
+ -- accepts switch --help. When this procedure is called by executable xxx,
+ -- the following message is displayed on standard error:
+ -- try `xxx --help` for more information.
+
private
Max_Depth : constant := 100;
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 05b3cb4..48d7ea4 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -444,6 +444,7 @@ Partition-Wide Restrictions
* No_Local_Allocators::
* No_Local_Protected_Objects::
* No_Local_Timing_Events::
+* No_Long_Long_Integers::
* No_Nested_Finalization::
* No_Protected_Type_Allocators::
* No_Protected_Types::
@@ -9918,6 +9919,7 @@ then all compilation units in the partition must obey the restriction).
* No_Local_Allocators::
* No_Local_Protected_Objects::
* No_Local_Timing_Events::
+* No_Long_Long_Integers::
* No_Nested_Finalization::
* No_Protected_Type_Allocators::
* No_Protected_Types::
@@ -10367,6 +10369,14 @@ only declared at the library level.
[RM D.7] All objects of type Ada.Timing_Events.Timing_Event are
declared at the library level.
+@node No_Long_Long_Integers
+@unnumberedsubsec No_Long_Long_Integers
+@findex No_Long_Long_Integers
+[GNAT] This partition-wide restriction forbids any explicit reference to
+type Standard.Long_Long_Integer, and also forbids declaring range types whose
+implicit base type is Long_Long_Integer, and modular types whose size exceeds
+Long_Integer'Size.
+
@node No_Nested_Finalization
@unnumberedsubsec No_Nested_Finalization
@findex No_Nested_Finalization
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 501b576..5d0c8e4 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -14620,6 +14620,13 @@ as output file.
The output may be redirected by the following switches:
@table @option
+@item ^--output-dir=@var{dir}^/OUTPUT_DIR=@var{dir}^
+@cindex @option{^--output-dir^/OUTPUT_DIR^} (@command{gnatpp})
+Generate output file in directory @file{dir} with the same name as the input
+file. If @file{dir} is the same as the directory containing the input file,
+the input file is not processed; use @option{^-rnb^/REPLACE_NO_BACKUP^}
+if you want to update the input file in place.
+
@item ^-pipe^/STANDARD_OUTPUT^
@cindex @option{^-pipe^/STANDARD_OUTPUT^} (@command{gnatpp})
Send the output to @code{Standard_Output}
@@ -14745,6 +14752,13 @@ Indicates that external variable @var{name} in the argument project
has the value @var{value}. Has no effect if no project is specified as
tool argument.
+@item --incremental
+@cindex @option{--incremental} @command{gnatpp}
+Incremental processing on a per-file basis. Source files are only
+processed if they have been modified, or if files they depend on have
+been modified. This is similar to the way gnatmake/gprbuild only
+compiles files that need to be recompiled.
+
@item --pp-off=@var{xxx}
@cindex @option{--pp-off} @command{gnatpp}
Use @code{--xxx} as the command to turn off pretty printing, instead
@@ -14769,14 +14783,21 @@ files.
@item ^-j^/PROCESSES=^@var{n}
@cindex @option{^-j^/PROCESSES^} (@command{gnatpp})
-Use @var{n} processes to carry out the tree creations (internal representations
-of the argument sources). On a multiprocessor machine this speeds up processing
-of big sets of argument sources. If @var{n} is 0, then the maximum number of
-parallel tree creations is the number of core processors on the platform.
-This option cannot be used together with @option{^-r^/REPLACE^},
+Without @option{--incremental}, use @var{n} processes to carry out the
+tree creations (internal representations of the argument sources). On
+a multiprocessor machine this speeds up processing of big sets of
+argument sources. If @var{n} is 0, then the maximum number of parallel
+tree creations is the number of core processors on the platform. This
+option cannot be used together with @option{^-r^/REPLACE^},
@option{^-rf^/OVERRIDING_REPLACE^} or
@option{^-rnb^/REPLACE_NO_BACKUP^} option.
+With @option{--incremental}, use @var{n} @command{gnatpp} processes to
+perform pretty-printing in parallel. @var{n} = 0 means the same as
+above. In this case, @option{^-r^/REPLACE^},
+@option{^-rf^/OVERRIDING_REPLACE^} or
+@option{^-rnb^/REPLACE_NO_BACKUP^} options are allowed.
+
@cindex @option{^-t^/TIME^} (@command{gnatpp})
@item ^-t^/TIME^
Print out execution time.
@@ -15155,16 +15176,15 @@ that conforms to the schema.
Usage:
@smallexample
-gnat2xml [options] files
+gnat2xml [options] filenames [-files filename] [-cargs gcc_switches]
@end smallexample
-``files'' are the Ada source file names.
-
@noindent
-Options:
+options:
@smallexample
-h
--help -- generate usage information and quit, ignoring all other options
+--version -- print version and quit, ignoring all other options
-P @file{file} -- indicates the name of the project file that describes
the set of sources to be processed. The exact set of argument
@@ -15186,25 +15206,25 @@ Options:
--incremental -- incremental processing on a per-file basis. Source files are
only processed if they have been modified, or if files they depend
on have been modified. This is similar to the way gnatmake/gprbuild
- only compiles files that need to be recompiled. You need to use a project
- file for this to work.
+ only compiles files that need to be recompiled.
--output-dir=@var{dir} -- generate one .xml file for each Ada source file, in
directory @file{dir}. (Default is to generate the XML to standard
output.)
+-I <include-dir>
+ directories to search for dependencies
+ You can also set the ADA_INCLUDE_PATH environment variable for this.
+
--compact -- debugging version, with interspersed source, and a more
compact representation of "sloc". This version does not conform
to any schema.
--I <include-dir>
- directories to search for dependencies
- You can also set the ADA_INCLUDE_PATH environment variable for this.
+-files=filename - the name of a text file containing a list
+ of Ada source files to process
-q -- quiet
-
--v -- verbose (print out the command line options, and the names of
- output files as they are generated).
+-v -- verbose
-cargs ... -- options to pass to gcc
@end smallexample
@@ -15217,7 +15237,7 @@ sources is all the immediate units of the argument project.
Example:
@smallexample
-gnat2xml -v -mxml-files *.ad[sb] -cargs -gnat2012
+gnat2xml -v -output-dir=xml-files *.ad[sb]
@end smallexample
@noindent
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb
index 527fc4c..82da065 100644
--- a/gcc/ada/gnatbind.adb
+++ b/gcc/ada/gnatbind.adb
@@ -672,7 +672,7 @@ begin
if Argument_Count = 0 then
Bindusg.Display;
else
- Write_Line ("type ""gnatbind --help"" for help");
+ Write_Line ("try `gnatbind --help` for more information.");
end if;
Exit_Program (E_Fatal);
diff --git a/gcc/ada/gnatchop.adb b/gcc/ada/gnatchop.adb
index 6017c56..3d953a2 100644
--- a/gcc/ada/gnatchop.adb
+++ b/gcc/ada/gnatchop.adb
@@ -1251,7 +1251,7 @@ procedure Gnatchop is
if Argument_Count = 0 then
Usage;
else
- Put_Line ("type ""gnatchop --help"" for help");
+ Try_Help;
end if;
return False;
diff --git a/gcc/ada/gnatfind.adb b/gcc/ada/gnatfind.adb
index a09df21..adde084 100644
--- a/gcc/ada/gnatfind.adb
+++ b/gcc/ada/gnatfind.adb
@@ -228,7 +228,7 @@ procedure Gnatfind is
end if;
when others =>
- Put_Line ("type ""gnatfind --help"" for help");
+ Try_Help;
raise Usage_Error;
end case;
end loop;
@@ -268,18 +268,18 @@ procedure Gnatfind is
when GNAT.Command_Line.Invalid_Switch =>
Ada.Text_IO.Put_Line ("Invalid switch : "
& GNAT.Command_Line.Full_Switch);
- Put_Line ("type ""gnatfind --help"" for help");
+ Try_Help;
raise Usage_Error;
when GNAT.Command_Line.Invalid_Parameter =>
Ada.Text_IO.Put_Line ("Parameter missing for : "
& GNAT.Command_Line.Full_Switch);
- Put_Line ("type ""gnatfind --help"" for help");
+ Try_Help;
raise Usage_Error;
when Xref_Lib.Invalid_Argument =>
Ada.Text_IO.Put_Line ("Invalid line or column in the pattern");
- Put_Line ("type ""gnatfind --help"" for help");
+ Try_Help;
raise Usage_Error;
end Parse_Cmd_Line;
@@ -352,7 +352,7 @@ begin
if Argument_Count = 0 then
Write_Usage;
else
- Put_Line ("type ""gnatfind --help"" for help");
+ Try_Help;
raise Usage_Error;
end if;
end if;
@@ -382,7 +382,7 @@ begin
Ada.Text_IO.Put_Line ("Error: for type hierarchy output you must "
& "specify only one file.");
Ada.Text_IO.New_Line;
- Put_Line ("type ""gnatfind --help"" for help");
+ Try_Help;
raise Usage_Error;
end if;
diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb
index 4df2503..4a7c217 100644
--- a/gcc/ada/gnatls.adb
+++ b/gcc/ada/gnatls.adb
@@ -47,7 +47,8 @@ with Types; use Types;
with Ada.Command_Line; use Ada.Command_Line;
-with GNAT.Case_Util; use GNAT.Case_Util;
+with GNAT.Command_Line; use GNAT.Command_Line;
+with GNAT.Case_Util; use GNAT.Case_Util;
procedure Gnatls is
pragma Ident (Gnat_Static_Version_String);
@@ -1601,7 +1602,7 @@ begin
Set_Standard_Error;
Write_Str ("Can't use -l with another switch");
Write_Eol;
- Write_Line ("type ""gnatls --help"" for help");
+ Try_Help;
Exit_Program (E_Fatal);
end if;
@@ -1753,7 +1754,7 @@ begin
if Argument_Count = 0 then
Usage;
else
- Write_Line ("type ""gnatls --help"" for help");
+ Try_Help;
end if;
end if;
diff --git a/gcc/ada/gnatname.adb b/gcc/ada/gnatname.adb
index efc8427..47ed2e5 100644
--- a/gcc/ada/gnatname.adb
+++ b/gcc/ada/gnatname.adb
@@ -26,6 +26,7 @@
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;
+with GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.Dynamic_Tables;
with GNAT.OS_Lib; use GNAT.OS_Lib;
@@ -289,7 +290,7 @@ procedure Gnatname is
Patterns.Last
(Arguments.Table (Arguments.Last).Foreign_Patterns) = 0
then
- Put_Line ("type ""gnatname --help"" for help");
+ Try_Help;
return;
end if;
@@ -621,8 +622,8 @@ begin
then
if Argument_Count = 0 then
Usage;
- else
- Put_Line ("type ""gnatname --help"" for help");
+ elsif not Usage_Output then
+ Try_Help;
end if;
return;
diff --git a/gcc/ada/gnatxref.adb b/gcc/ada/gnatxref.adb
index 2912b4f..1611ed9 100644
--- a/gcc/ada/gnatxref.adb
+++ b/gcc/ada/gnatxref.adb
@@ -210,7 +210,7 @@ procedure Gnatxref is
end if;
when others =>
- Put_Line ("type ""gnatxref --help"" for help");
+ Try_Help;
raise Usage_Error;
end case;
end loop;
@@ -227,7 +227,7 @@ procedure Gnatxref is
if Ada.Strings.Fixed.Index (S, ":") /= 0 then
Ada.Text_IO.Put_Line
("Only file names are allowed on the command line");
- Put_Line ("type ""gnatxref --help"" for help");
+ Try_Help;
raise Usage_Error;
end if;
@@ -240,13 +240,13 @@ procedure Gnatxref is
when GNAT.Command_Line.Invalid_Switch =>
Ada.Text_IO.Put_Line ("Invalid switch : "
& GNAT.Command_Line.Full_Switch);
- Put_Line ("type ""gnatxref --help"" for help");
+ Try_Help;
raise Usage_Error;
when GNAT.Command_Line.Invalid_Parameter =>
Ada.Text_IO.Put_Line ("Parameter missing for : "
& GNAT.Command_Line.Full_Switch);
- Put_Line ("type ""gnatxref --help"" for help");
+ Try_Help;
raise Usage_Error;
end Parse_Cmd_Line;
@@ -304,7 +304,7 @@ begin
if Argument_Count = 0 then
Write_Usage;
else
- Put_Line ("type ""gnatxref --help"" for help");
+ Try_Help;
raise Usage_Error;
end if;
end if;
diff --git a/gcc/ada/gprep.adb b/gcc/ada/gprep.adb
index 63286ca..c4bf8e9 100644
--- a/gcc/ada/gprep.adb
+++ b/gcc/ada/gprep.adb
@@ -209,7 +209,7 @@ package body GPrep is
if Argument_Count = 0 then
Usage;
else
- Put_Line ("type ""gnatprep --help"" for help");
+ GNAT.Command_Line.Try_Help;
end if;
return;
@@ -218,7 +218,7 @@ package body GPrep is
-- No output file specified, exit
- Put_Line ("type ""gnatprep --help"" for help");
+ GNAT.Command_Line.Try_Help;
return;
end if;
@@ -773,7 +773,7 @@ package body GPrep is
when GNAT.Command_Line.Invalid_Switch =>
Write_Str ("Invalid Switch: -");
Write_Line (GNAT.Command_Line.Full_Switch);
- Put_Line ("type ""gnatprep --help"" for help");
+ GNAT.Command_Line.Try_Help;
OS_Exit (1);
end;
end loop;
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 15b6330..a426df6 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -73,6 +73,7 @@ with Ada.Directories;
with Ada.Exceptions; use Ada.Exceptions;
with GNAT.Case_Util; use GNAT.Case_Util;
+with GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.Dynamic_HTables; use GNAT.Dynamic_HTables;
with GNAT.OS_Lib; use GNAT.OS_Lib;
@@ -5861,7 +5862,7 @@ package body Make is
if Argument_Count = 0 then
Usage;
else
- Write_Line ("type ""gnatmake --help"" for help");
+ Try_Help;
end if;
Finish_Program (Project_Tree, E_Success);
diff --git a/gcc/ada/restrict.ads b/gcc/ada/restrict.ads
index ef5c2c7..c71eb2b1 100644
--- a/gcc/ada/restrict.ads
+++ b/gcc/ada/restrict.ads
@@ -129,7 +129,7 @@ package Restrict is
No_Implicit_Loops => True,
No_Initialize_Scalars => True,
No_Local_Protected_Objects => True,
- No_Long_Long_Integer => True,
+ No_Long_Long_Integers => True,
No_Protected_Type_Allocators => True,
No_Relative_Delay => True,
No_Requeue_Statements => True,
diff --git a/gcc/ada/s-rident.ads b/gcc/ada/s-rident.ads
index 181530d..3e6e25c 100644
--- a/gcc/ada/s-rident.ads
+++ b/gcc/ada/s-rident.ads
@@ -124,7 +124,7 @@ package System.Rident is
No_Local_Allocators, -- (RM H.4(8))
No_Local_Timing_Events, -- (RM D.7(10.2/2))
No_Local_Protected_Objects, -- Ada 2012 (D.7(10/1.3))
- No_Long_Long_Integer, -- GNAT
+ No_Long_Long_Integers, -- GNAT
No_Nested_Finalization, -- (RM D.7(4))
No_Protected_Type_Allocators, -- Ada 2012 (D.7 (10.3/2))
No_Protected_Types, -- (RM H.4(5))
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 8c67472..1a02abf 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -17446,7 +17446,7 @@ package body Sem_Ch3 is
end if;
if M_Val > 2 ** Standard_Long_Integer_Size then
- Check_Restriction (No_Long_Long_Integer, Mod_Expr);
+ Check_Restriction (No_Long_Long_Integers, Mod_Expr);
end if;
Set_Modulus (T, M_Val);
@@ -20626,7 +20626,7 @@ package body Sem_Ch3 is
Base_Typ := Base_Type (Standard_Long_Integer);
elsif Can_Derive_From (Standard_Long_Long_Integer) then
- Check_Restriction (No_Long_Long_Integer, Def);
+ Check_Restriction (No_Long_Long_Integers, Def);
Base_Typ := Base_Type (Standard_Long_Long_Integer);
else
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index d85e903..7ac496c 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -15981,7 +15981,7 @@ package body Sem_Util is
end if;
if Val = Standard_Long_Long_Integer then
- Check_Restriction (No_Long_Long_Integer, Post_Node);
+ Check_Restriction (No_Long_Long_Integers, Post_Node);
end if;
-- Check for violation of No_Dynamic_Attachment
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index efaa63c..623e992 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -1796,7 +1796,7 @@ package Sem_Util is
-- If restriction No_Dynamic_Attachment is set, then it checks that the
-- entity is not one of the restricted names for this restriction.
--
- -- If restriction No_Long_Long_Integer is set, then it checks that the
+ -- If restriction No_Long_Long_Integers is set, then it checks that the
-- entity is not Standard.Long_Long_Integer.
--
-- If restriction No_Implementation_Identifiers is set, then it checks
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 8e33462..f2ad1ec 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -2247,7 +2247,15 @@ package body Sprint is
Write_Str_With_Col_Check ("not null ");
end if;
- Sprint_Node (Object_Definition (Node));
+ -- Print type, we used to print the Object_Definition from
+ -- the node, but it is much more useful to print the Etype
+ -- of the defining identifier. For example, this will be a
+ -- clear reference to the Itype with the bounds in the case
+ -- of an unconstrained array type like String. The object
+ -- after all is constrained, even if its nominal subtype is
+ -- unconstrained.
+
+ Sprint_Node (Etype (Def_Id));
if Present (Expression (Node)) then
Write_Str (" := ");