Skip to content
Snippets Groups Projects
Commit 9b6a2de0 authored by Bob Duff's avatar Bob Duff Committed by Pierre-Marie de Rodat
Browse files

[Ada] Do not "optimize" by converting Positive to Unsigned

gcc/ada/

	* exp_ch4.adb (Expand_Concatenate): Remove the non-optimization.
parent d20bab53
No related branches found
No related tags found
No related merge requests found
...@@ -3025,14 +3025,6 @@ package body Exp_Ch4 is ...@@ -3025,14 +3025,6 @@ package body Exp_Ch4 is
if Is_Enumeration_Type (Ityp) then if Is_Enumeration_Type (Ityp) then
Artyp := Standard_Integer; Artyp := Standard_Integer;
   
-- If index type is Positive, we use the standard unsigned type, to give
-- more room on the top of the range, obviating the need for an overflow
-- check when creating the upper bound. This is needed to avoid junk
-- overflow checks in the common case of String types.
elsif Istyp = Standard_Positive then
Artyp := Standard_Unsigned;
-- For modular types, we use a 32-bit modular type for types whose size -- For modular types, we use a 32-bit modular type for types whose size
-- is in the range 1-31 bits. For 32-bit unsigned types, we use the -- is in the range 1-31 bits. For 32-bit unsigned types, we use the
-- identity type, and for larger unsigned types we use a 64-bit type. -- identity type, and for larger unsigned types we use a 64-bit type.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment