diff options
author | Bob Duff <duff@adacore.com> | 2022-08-23 12:51:01 -0400 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-12 10:16:50 +0200 |
commit | 65d76c55931c076d674def3e6bd035f875e2c55c (patch) | |
tree | 5aebbe99d816bd4ebee54ff68c778910609ebac2 /gcc/ada/debug.adb | |
parent | 635e98b86497d8c017ea437725b6620572c9de5c (diff) | |
download | gcc-65d76c55931c076d674def3e6bd035f875e2c55c.zip gcc-65d76c55931c076d674def3e6bd035f875e2c55c.tar.gz gcc-65d76c55931c076d674def3e6bd035f875e2c55c.tar.bz2 |
[Ada] Fix bugs in check-related warnings.
Make sure warnings about wrong-length aggregates don't get
suppressed. Such a warning (in a with-ed unit) can be the only
explanation for an error about No_Elaboration_Code violations.
Avoid passing a bogus "#" to Error_Msg. We really should never
construct message templates by concatenating strings that can
come from input data, but there are too many cases of that to
clean up. The message template parameters should really be
of a type other than String, to avoid these kinds of bugs,
but again, that's too much work to clean up now.
gcc/ada/
* checks.adb
(Selected_Length_Checks): In the message for an aggregate that has
too few or too many elements, add "!!" to make sure the warning
gets printed in with'ed units. Note that we have to put "!!"
before the "??", because Compile_Time_Constraint_Error detects
warnings by comparing the last character of the message with '?'
(which is bit dubious, but we're not changing that here).
(Length_Mismatch_Info_Message): Use Unat for some things that
can't be negative. Specify Decimal instead of Auto in calls to
UI_Image.
* sem_util.adb
(Compile_Time_Constraint_Error): Minor.
* uintp.adb
(Image_Uint): It's always better to initialize objects on their
declaration.
Diffstat (limited to 'gcc/ada/debug.adb')
0 files changed, 0 insertions, 0 deletions