projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39521d9
)
[Ada] Simplify type conversions in source pointer arithmetic
author
Piotr Trojanek
<trojanek@adacore.com>
Tue, 7 Dec 2021 19:13:15 +0000
(20:13 +0100)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Thu, 6 Jan 2022 17:11:37 +0000
(17:11 +0000)
gcc/ada/
* sem_res.adb (Resolve_String_Literal): Simplify pointer
arithmetic.
gcc/ada/sem_res.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_res.adb
b/gcc/ada/sem_res.adb
index
d8784f1
..
9a63506
100644
(file)
--- a/
gcc/ada/sem_res.adb
+++ b/
gcc/ada/sem_res.adb
@@
-11737,7
+11737,7
@@
package body Sem_Res is
Apply_Compile_Time_Constraint_Error
(N, "character out of range??",
CE_Range_Check_Failed,
- Loc =>
Source_Ptr (Int (Loc) +
J));
+ Loc =>
Loc + Source_Ptr (
J));
end if;
end loop;