-- char_array. The lower bound of this array is required to be zero
-- (RM B.3(50)) but that is of course impossible given that size_t
-- is unsigned. According to Ada 2005 AI-258, the result is to raise
- -- Constraint_Error.
+ -- Constraint_Error. This is also the appropriate behavior in Ada 95,
+ -- since nothing else makes sense.
if Item'Length = 0 then
raise Constraint_Error;
-- wchar_array. The lower bound of this array is required to be zero
-- (RM B.3(50)) but that is of course impossible given that size_t
-- is unsigned. According to Ada 2005 AI-258, the result is to raise
- -- Constraint_Error.
+ -- Constraint_Error. This is also the appropriate behavior in Ada 95,
+ -- since nothing else makes sense.
if Item'Length = 0 then
raise Constraint_Error;
-- char16_array. The lower bound of this array is required to be zero
-- (RM B.3(50)) but that is of course impossible given that size_t
-- is unsigned. According to Ada 2005 AI-258, the result is to raise
- -- Constraint_Error.
+ -- Constraint_Error. This is also the appropriate behavior in Ada 95,
+ -- since nothing else makes sense.
if Item'Length = 0 then
raise Constraint_Error;
(Full));
Set_Is_Volatile (Priv, Is_Volatile (Full));
Set_Treat_As_Volatile (Priv, Treat_As_Volatile (Full));
+ Set_Is_Ada_2005 (Priv, Is_Ada_2005 (Full));
+ -- Why is atomic not copied here ???
if Referenced (Full) then
Set_Referenced (Priv);
with Hostparm;
with Namet; use Namet;
+with Opt; use Opt;
with Osint; use Osint;
with Output; use Output;
with System.WCh_Con; use System.WCh_Con;
Write_Switch_Char ("83");
Write_Line ("Enforce Ada 83 restrictions");
+ -- Line for -gnat95 switch
+
+ Write_Switch_Char ("95");
+
+ if Ada_Version_Default = Ada_95 then
+ Write_Line ("Ada 95 mode (default)");
+ else
+ Write_Line ("Enforce Ada 95 restrictions");
+ end if;
+
-- Line for -gnat05 switch
Write_Switch_Char ("05");
- Write_Line ("Allow Ada 2005 extensions");
+
+ if Ada_Version_Default = Ada_05 then
+ Write_Line ("Ada 2005 mode (default)");
+ else
+ Write_Line ("Allow Ada 2005 extensions");
+ end if;
end Usage;