aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2020-09-21 06:26:17 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-10-26 04:59:14 -0400
commit10c633b7d6de86c64048ca50eef7a6f87e5ad95f (patch)
tree445790e742750af93ce69002adf08a2eb89b5007 /gcc
parent4b0fe398dbee8050a0a1cf9af8133884c6827454 (diff)
downloadgcc-10c633b7d6de86c64048ca50eef7a6f87e5ad95f.zip
gcc-10c633b7d6de86c64048ca50eef7a6f87e5ad95f.tar.gz
gcc-10c633b7d6de86c64048ca50eef7a6f87e5ad95f.tar.bz2
[Ada] Avoid crash on use of Ada 2020 feature
gcc/ada/ * sem_attr.adb (Check_Image_Type): Remove "|", so the compiler will not crash. * errout.ads: Improve comment. This has nothing to do with -gnatQ.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/errout.ads11
-rw-r--r--gcc/ada/sem_attr.adb2
2 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads
index e46433f..b49b9a9 100644
--- a/gcc/ada/errout.ads
+++ b/gcc/ada/errout.ads
@@ -381,12 +381,11 @@ package Errout is
-- continuations are being gathered into a single message.
-- Insertion character | (Vertical bar: non-serious error)
- -- By default, error messages (other than warning messages) are
- -- considered to be fatal error messages which prevent expansion or
- -- generation of code in the presence of the -gnatQ switch. If the
- -- insertion character | appears, the message is considered to be
- -- non-serious, and does not cause Serious_Errors_Detected to be
- -- incremented (so expansion is not prevented by such a msg). This
+ -- By default, error messages (but not warning messages) are considered
+ -- to be fatal error messages, which prevent expansion and generation
+ -- of code. If the insertion character | appears, the message is
+ -- considered to be nonserious, and Serious_Errors_Detected is not
+ -- incremented, so expansion is not prevented by such a msg. This
-- insertion character is ignored in continuation messages.
-- Insertion character ~ (Tilde: insert string)
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index e361601..ee65185 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -1460,7 +1460,7 @@ package body Sem_Attr is
if Ada_Version < Ada_2020
and then not Is_Scalar_Type (Image_Type)
then
- Error_Msg_Ada_2020_Feature ("|nonscalar ''Image", Sloc (P));
+ Error_Msg_Ada_2020_Feature ("nonscalar ''Image", Sloc (P));
Error_Attr;
end if;
end Check_Image_Type;