diff options
author | Ronan Desplanques <desplanques@adacore.com> | 2024-02-19 17:19:27 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-14 10:20:00 +0200 |
commit | 4a45c99302b688cacf788946b9a88ea8593bb395 (patch) | |
tree | e6605f5bc9bd8185ce47a821e0227d73c85c50d6 | |
parent | 0ec8c070f3ccebc9a58ecb593c2e5cfdb6bcfd5c (diff) | |
download | gcc-4a45c99302b688cacf788946b9a88ea8593bb395.zip gcc-4a45c99302b688cacf788946b9a88ea8593bb395.tar.gz gcc-4a45c99302b688cacf788946b9a88ea8593bb395.tar.bz2 |
ada: Fix crash with -gnatdJ and -gnatf
This patch fixes a crash when the compiler emits a warning about
an unchecked conversion and -gnatdJ is enabled.
gcc/ada/
* sem_ch13.adb (Validate_Unchecked_Conversions): Add node
parameters to Error_Msg calls.
-rw-r--r-- | gcc/ada/sem_ch13.adb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 0470ce1..1ad5c4c 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -18401,7 +18401,8 @@ package body Sem_Ch13 is Error_Msg_Uint_1 := Source_Siz; Error_Msg_Name_2 := Chars (Target); Error_Msg_Uint_2 := Target_Siz; - Error_Msg ("\size of % is ^, size of % is ^?z?", Eloc); + Error_Msg + ("\size of % is ^, size of % is ^?z?", Eloc, Act_Unit); Error_Msg_Uint_1 := UI_Abs (Source_Siz - Target_Siz); @@ -18412,17 +18413,17 @@ package body Sem_Ch13 is if Source_Siz > Target_Siz then Error_Msg ("\?z?^ high order bits of source will " - & "be ignored!", Eloc); + & "be ignored!", Eloc, Act_Unit); elsif Is_Unsigned_Type (Source) then Error_Msg ("\?z?source will be extended with ^ high order " - & "zero bits!", Eloc); + & "zero bits!", Eloc, Act_Unit); else Error_Msg ("\?z?source will be extended with ^ high order " - & "sign bits!", Eloc); + & "sign bits!", Eloc, Act_Unit); end if; elsif Source_Siz < Target_Siz then |