Commit 5e9d6f05 by Arnaud Charlet

[multiple changes]

2014-11-20  Robert Dewar  <dewar@adacore.com>

	* freeze.adb, exp_dbug.adb, sem_ch13.adb: Minor reformatting.

2014-11-20  Thomas Quinot  <quinot@adacore.com>

	* einfo.ads: Fix minor typo in comment.

From-SVN: r217844
parent 73e5aa55
2014-11-20 Robert Dewar <dewar@adacore.com> 2014-11-20 Robert Dewar <dewar@adacore.com>
* freeze.adb, exp_dbug.adb, sem_ch13.adb: Minor reformatting.
2014-11-20 Thomas Quinot <quinot@adacore.com>
* einfo.ads: Fix minor typo in comment.
2014-11-20 Robert Dewar <dewar@adacore.com>
* inline.adb, sem_util.adb: Minor reformatting. * inline.adb, sem_util.adb: Minor reformatting.
2014-11-20 Pierre-Marie Derodat <derodat@adacore.com> 2014-11-20 Pierre-Marie Derodat <derodat@adacore.com>
......
...@@ -4159,7 +4159,7 @@ package Einfo is ...@@ -4159,7 +4159,7 @@ package Einfo is
-- the full view of a private type T is derived from another private type -- the full view of a private type T is derived from another private type
-- with discriminants Td, the full view of T is also private, and there -- with discriminants Td, the full view of T is also private, and there
-- is no way to attach to it a further full view that would convey the -- is no way to attach to it a further full view that would convey the
-- structure of T to the backend. The Underlying_Full_ View is an -- structure of T to the backend. The Underlying_Full_View is an
-- attribute of the full view that is a subtype of Td with the same -- attribute of the full view that is a subtype of Td with the same
-- constraint as the declaration for T. The declaration for this subtype -- constraint as the declaration for T. The declaration for this subtype
-- is built at the point of the declaration of T, either as completion, -- is built at the point of the declaration of T, either as completion,
......
...@@ -134,8 +134,9 @@ package body Exp_Dbug is ...@@ -134,8 +134,9 @@ package body Exp_Dbug is
-- used to determine whether encoding is required for a discrete type. -- used to determine whether encoding is required for a discrete type.
function Is_Handled_Scale_Factor (U : Ureal) return Boolean; function Is_Handled_Scale_Factor (U : Ureal) return Boolean;
-- Determine whether the back-end can handle some scale factor. When it -- The argument U is the Small_Value of a fixed-point type. This function
-- cannot, we have to output a GNAT encoding for the correspondig type. -- determines whether the back-end can handle this scale factor. When it
-- cannot, we have to output a GNAT encoding for the corresponding type.
procedure Output_Homonym_Numbers_Suffix; procedure Output_Homonym_Numbers_Suffix;
-- If homonym numbers are stored, then output them into Name_Buffer -- If homonym numbers are stored, then output them into Name_Buffer
...@@ -547,17 +548,17 @@ package body Exp_Dbug is ...@@ -547,17 +548,17 @@ package body Exp_Dbug is
begin begin
-- Keep in sync with gigi (see E_*_Fixed_Point_Type handling in -- Keep in sync with gigi (see E_*_Fixed_Point_Type handling in
-- decl.c:gnat_to_gnu_entity). -- decl.c:gnat_to_gnu_entity).
if UI_Eq (Numerator (U), Uint_1) then if UI_Eq (Numerator (U), Uint_1) then
if Rbase (U) = 2 if Rbase (U) = 2 or else Rbase (U) = 10 then
or else Rbase (U) = 10
then
return True; return True;
end if; end if;
end if; end if;
return return
(UI_Is_In_Int_Range (Norm_Num (U)) (UI_Is_In_Int_Range (Norm_Num (U))
and then UI_Is_In_Int_Range (Norm_Den (U))); and then
UI_Is_In_Int_Range (Norm_Den (U)));
end Is_Handled_Scale_Factor; end Is_Handled_Scale_Factor;
---------------------- ----------------------
...@@ -622,9 +623,8 @@ package body Exp_Dbug is ...@@ -622,9 +623,8 @@ package body Exp_Dbug is
-- know the back-end will not be able to handle the scale factor. -- know the back-end will not be able to handle the scale factor.
if Is_Fixed_Point_Type (E) if Is_Fixed_Point_Type (E)
and then and then (GNAT_Encodings /= DWARF_GNAT_Encodings_Minimal
(GNAT_Encodings /= DWARF_GNAT_Encodings_Minimal or else not Is_Handled_Scale_Factor (Small_Value (E)))
or else not Is_Handled_Scale_Factor (Small_Value (E)))
then then
Get_External_Name (E, True, "XF_"); Get_External_Name (E, True, "XF_");
Add_Real_To_Buffer (Delta_Value (E)); Add_Real_To_Buffer (Delta_Value (E));
......
...@@ -7701,15 +7701,13 @@ package body Freeze is ...@@ -7701,15 +7701,13 @@ package body Freeze is
if Is_Base_Type (T) if Is_Base_Type (T)
and then (Is_Array_Type (T) and then (Is_Array_Type (T)
or else or else (Is_Record_Type (T)
(Is_Record_Type (T) and then not (Is_Tagged_Type (T)
and then not (Is_Tagged_Type (T) and then Is_Derived_Type (T))))
and then
Is_Derived_Type (T))))
then then
if ((Bytes_Big_Endian and then SSO_Set_Low_By_Default (T)) if ((Bytes_Big_Endian and then SSO_Set_Low_By_Default (T))
or else or else
((not Bytes_Big_Endian) and then SSO_Set_High_By_Default (T))) ((not Bytes_Big_Endian) and then SSO_Set_High_By_Default (T)))
-- For a record type, if native bit order is specified explicitly, -- For a record type, if native bit order is specified explicitly,
-- then never set reverse SSO from default. -- then never set reverse SSO from default.
......
...@@ -3798,8 +3798,7 @@ package body Sem_Ch13 is ...@@ -3798,8 +3798,7 @@ package body Sem_Ch13 is
("variable indexing must return a reference type"); ("variable indexing must return a reference type");
return; return;
elsif Is_Access_Constant elsif Is_Access_Constant (Etype (First_Discriminant (Ret_Type)))
(Etype (First_Discriminant (Ret_Type)))
then then
Illegal_Indexing Illegal_Indexing
("variable indexing must return an access to variable"); ("variable indexing must return an access to variable");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment