aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-05-05 16:09:33 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-06 07:34:57 -0400
commitc54077e4538c8745abecb0c440a26573e708e100 (patch)
treefd87e94e20cbc5839f46fe9f54f96e963194e3a1
parent776afaf7fef4e8d73a2376778c648f8f9a6c536b (diff)
downloadgcc-c54077e4538c8745abecb0c440a26573e708e100.zip
gcc-c54077e4538c8745abecb0c440a26573e708e100.tar.gz
gcc-c54077e4538c8745abecb0c440a26573e708e100.tar.bz2
[Ada] Remove obsolete code in Eval_Attribute
gcc/ada/ * sem_attr.adb (Eval_Attribute): Do not apply range checks in the case of 'Pos applied to an integer type here.
-rw-r--r--gcc/ada/sem_attr.adb10
1 files changed, 0 insertions, 10 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 5041a12..81130b5 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -8354,16 +8354,6 @@ package body Sem_Attr is
if not Compile_Time_Known_Value (E)
or else not Is_Scalar_Type (Etype (E))
then
- -- An odd special case, if this is a Pos attribute, this
- -- is where we need to apply a range check since it does
- -- not get done anywhere else.
-
- if Id = Attribute_Pos then
- if Is_Integer_Type (Etype (E)) then
- Apply_Range_Check (E, Etype (N));
- end if;
- end if;
-
Check_Expressions;
return;