aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2020-03-30 10:20:33 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-15 04:04:24 -0400
commit6349cf36d8bb7fb83f67a7bc27fc67dca73b19dd (patch)
tree0812c36df6e46c61907a17b1bc377b3a79245b19 /gcc/ada/sem_util.adb
parentbfdb362c000c1502ca4757bb7e5ce5cb42a6a5ae (diff)
downloadgcc-6349cf36d8bb7fb83f67a7bc27fc67dca73b19dd.zip
gcc-6349cf36d8bb7fb83f67a7bc27fc67dca73b19dd.tar.gz
gcc-6349cf36d8bb7fb83f67a7bc27fc67dca73b19dd.tar.bz2
[Ada] Clean up error handling of 'Image
2020-06-15 Bob Duff <duff@adacore.com> gcc/ada/ * sem_attr.adb (Check_Image_Type): New procedure for checking the type, depending on language version. Disable the Ada 2020 support until the corresponding expander work is done. (Analyze_Image_Attribute): Call Check_Image_Type. Rearrange the code to be simplier and more logical. When P_Type is modified, modify P_Base_Type accordingly. * sem_util.adb (Is_Object_Image): Do not return False if the prefix is a type. X'Image should be considered an image of an object iff X is an object (albeit illegal pre-2020 if nonscalar).
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb7
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index d7d43c9..a1bf0ae 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -16797,13 +16797,6 @@ package body Sem_Util is
function Is_Object_Image (Prefix : Node_Id) return Boolean is
begin
- -- When the type of the prefix is not scalar, then the prefix is not
- -- valid in any scenario.
-
- if not Is_Scalar_Type (Etype (Prefix)) then
- return False;
- end if;
-
-- Here we test for the case that the prefix is not a type and assume
-- if it is not then it must be a named value or an object reference.
-- This is because the parser always checks that prefixes of attributes