[Ada] Put_Image: preload type Sink, change what types have it enabled
2020-06-12 Bob Duff <duff@adacore.com>
gcc/ada/
* exp_put_image.ads, exp_put_image.adb (Preload_Sink): Procedure
for preloading type Sink. This has the side effect of loading
various dependents, including Ada.Strings.UTF_Encoding.
(Enable_Put_Image): Disable Put_Image in pre-2020 versions of
Ada. This limitation can probably be lifted later. Enable for
tagged types except in predefined units. Disable for CPP types;
Put_Image is legal, just prints the type name.
* sem_attr.adb (Check_Put_Image_Attribute): Don't complain about
Put_Image of CPP types; instead call the "unknown" version of
Put_Image.
* sem_ch10.adb (Analyze_Compilation_Unit): Call Preload_Sink.