[Ada] Clean up error handling of 'Image
Pierre-Marie de Rodat
derodat@adacore.com
Mon Jun 15 08:05:22 GMT 2020
...in preparation for enabling 'Image for all types in Ada 2020, and
having it call 'Put_Image for nonscalar types, and for types with
user-defined 'Put_Image.
Tested on x86_64-pc-linux-gnu, committed on trunk
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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 4609 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200615/9ce7e8ad/attachment-0001.bin>
More information about the Gcc-patches
mailing list