+2016-06-22 Bob Duff <duff@adacore.com>
+
+ * g-comlin.ads (Parameter_Type): Change subtype of Last to
+ Natural.
+ * g-comlin.adb (Set_Parameter): Change subtype of Last to
+ Natural.
+ (Getopt): Check for Arg = "", and Switches /= "".
+ (Internal_Initialize_Option_Scan): Check for Argument (Parser,
+ Index) /= "".
+
+2016-06-22 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_prag.adb, sem_ch8.adb: Minor reformatting.
+
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Is_Actual_Subtype): New flag, defined
(Variable : out Parameter_Type;
Arg_Num : Positive;
First : Positive;
- Last : Positive;
+ Last : Natural;
Extra : Character := ASCII.NUL);
pragma Inline (Set_Parameter);
-- Set the parameter that will be returned by Parameter below
-- If we are on a new item, test if this might be a switch
if Parser.Current_Index = Arg'First then
- if Arg (Arg'First) /= Parser.Switch_Character then
+ if Arg = "" or else Arg (Arg'First) /= Parser.Switch_Character then
-- If it isn't a switch, return it immediately. We also know it
-- isn't the parameter to a previous switch, since that has
(if Concatenate then Parser.Current_Index else Arg'Last);
end if;
- if Switches (Switches'First) = '*' then
+ if Switches /= "" and then Switches (Switches'First) = '*' then
-- Always prepend the switch character, so that users know
-- that this comes from a switch on the command line. This
Section_Num := Section_Num + 1;
for Index in 1 .. Parser.Arg_Count loop
- if Argument (Parser, Index)(1) = Parser.Switch_Character
+ pragma Assert (Argument (Parser, Index)'First = 1);
+ if Argument (Parser, Index) /= ""
+ and then Argument (Parser, Index)(1) = Parser.Switch_Character
and then
Argument (Parser, Index) = Parser.Switch_Character &
Section_Delimiters
(Variable : out Parameter_Type;
Arg_Num : Positive;
First : Positive;
- Last : Positive;
+ Last : Natural;
Extra : Character := ASCII.NUL)
is
begin
-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2015, AdaCore --
+-- Copyright (C) 1999-2016, 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- --
type Parameter_Type is record
Arg_Num : Positive;
First : Positive;
- Last : Positive;
+ Last : Natural;
Extra : Character;
end record;
and then not Is_Access_Constant (Etype (Nam))
then
Error_Msg_N
- ("(Ada 2005): the renamed object is not access-to-constant "
- & "(RM 8.5.1(6))", N);
+ ("(Ada 2005): the renamed object is not access-to-constant "
+ & "(RM 8.5.1(6))", N);
elsif not Constant_Present (Access_Definition (N))
and then Is_Access_Constant (Etype (Nam))