diff options
author | Bob Duff <duff@adacore.com> | 2020-03-27 08:26:19 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-12 04:29:32 -0400 |
commit | a3483a77e5dd55112bd97543c8dd00275c16b345 (patch) | |
tree | 4c3dd338f369a87fd909486c61f5965a6f986dc3 /gcc/ada/argv.c | |
parent | 3961bedab9b39baa27cd7844ec4a1be5db348a11 (diff) | |
download | gcc-a3483a77e5dd55112bd97543c8dd00275c16b345.zip gcc-a3483a77e5dd55112bd97543c8dd00275c16b345.tar.gz gcc-a3483a77e5dd55112bd97543c8dd00275c16b345.tar.bz2 |
[Ada] Enable Put_Image in pre-Ada-2020 modes
2020-06-12 Bob Duff <duff@adacore.com>
gcc/ada/
* exp_attr.adb (Put_Image): Remove assertion. This assertion is
False in mixed-Ada-version programs.
* exp_put_image.adb (Tagged_Put_Image_Enabled): New flag to make
it easy to experiment with Put_Image on tagged types. False in
this version.
(Enable_Put_Image): Enable in pre-2020. Workarounds: Disable
for tagged types if Tagged_Put_Image_Enabled is False. Disable
for access-to-subprogram types. Disable if errors have been
detected, or Sink is unavailable.
(Preload_Sink): Move all conditionals here, from Sem_Ch10, so
they can be nearby related code in Enable_Put_Image. Load Sink
only if we have seen a tagged type. This removes the dilemma
about calling Preload_Sink when compiling the compiler, which
caused unwanted dependences.
* exp_put_image.ads (Preload_Sink): New formal Compilation_Unit,
needed to move all conditionals here, from Sem_Ch10.
* libgnat/a-stouut.adb (Put_UTF_8): Make this suitable for
inlining, so we don't get warnings about inlining in some tests.
And so it can be inlined!
* opt.ads (Tagged_Seen): New flag (see Preload_Sink).
* scng.adb (Scan): Set new Tagged_Seen flag.
* sem_ch10.adb (Analyze_Compilation_Unit): Move conditionals and
comments regarding Preload_Sink into Preload_Sink.
Diffstat (limited to 'gcc/ada/argv.c')
0 files changed, 0 insertions, 0 deletions