aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/par-ch10.adb2
-rw-r--r--gcc/ada/scng.adb6
-rw-r--r--gcc/ada/sem_res.adb4
-rw-r--r--gcc/ada/sinfo-utils.adb4
-rw-r--r--gcc/ada/treepr.adb2
5 files changed, 7 insertions, 11 deletions
diff --git a/gcc/ada/par-ch10.adb b/gcc/ada/par-ch10.adb
index 901ad17..613be37 100644
--- a/gcc/ada/par-ch10.adb
+++ b/gcc/ada/par-ch10.adb
@@ -1194,7 +1194,7 @@ package body Ch10 is
Write_Int (Int (Line));
Write_Str (", file offset ");
- Write_Int (Int (Loc) - Int (Source_First (Sind)));
+ Write_Int (Int (Loc - Source_First (Sind)));
end Unit_Location;
end Ch10;
diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb
index 676a4f2..c50a41e 100644
--- a/gcc/ada/scng.adb
+++ b/gcc/ada/scng.adb
@@ -130,11 +130,7 @@ package body Scng is
procedure Check_End_Of_Line is
Len : constant Int :=
- Int (Scan_Ptr) -
- Int (Current_Line_Start) -
- Wide_Char_Byte_Count;
-
- -- Start of processing for Check_End_Of_Line
+ Int (Scan_Ptr - Current_Line_Start) - Wide_Char_Byte_Count;
begin
if Style_Check then
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index a59ffe7..125366b 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -11754,7 +11754,7 @@ package body Sem_Res is
Error_Msg
("literal out of range of type Standard.Character",
- Source_Ptr (Int (Loc) + J));
+ Loc + Source_Ptr (J));
return;
end if;
end loop;
@@ -11783,7 +11783,7 @@ package body Sem_Res is
Error_Msg
("literal out of range of type Standard.Wide_Character",
- Source_Ptr (Int (Loc) + J));
+ Loc + Source_Ptr (J));
return;
end if;
end loop;
diff --git a/gcc/ada/sinfo-utils.adb b/gcc/ada/sinfo-utils.adb
index 121a039..3528891 100644
--- a/gcc/ada/sinfo-utils.adb
+++ b/gcc/ada/sinfo-utils.adb
@@ -191,7 +191,7 @@ package body Sinfo.Utils is
function End_Location (N : Node_Id) return Source_Ptr is
L : constant Valid_Uint := End_Span (N);
begin
- return Source_Ptr (Int (Sloc (N)) + UI_To_Int (L));
+ return Sloc (N) + Source_Ptr (UI_To_Int (L));
end End_Location;
--------------------
@@ -214,7 +214,7 @@ package body Sinfo.Utils is
procedure Set_End_Location (N : Node_Id; S : Source_Ptr) is
begin
Set_End_Span (N,
- UI_From_Int (Int (S) - Int (Sloc (N))));
+ UI_From_Int (Int (S - Sloc (N))));
end Set_End_Location;
--------------------------
diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
index 2faf3f8..3173668 100644
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -1229,7 +1229,7 @@ package body Treepr is
else
Sfile := Get_Source_File_Index (Sloc (N));
- Print_Int (Int (Sloc (N)) - Int (Source_Text (Sfile)'First));
+ Print_Int (Int (Sloc (N) - Source_Text (Sfile)'First));
Write_Str (" ");
Write_Location (Sloc (N));
end if;