diff options
author | Bob Duff <duff@adacore.com> | 2019-08-19 08:36:12 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-08-19 08:36:12 +0000 |
commit | dafa2ae46c9f0d95821fd365e8c554008b934819 (patch) | |
tree | 6556de1317772ac7eefd9f6c2b0b063164a6b8b2 /gcc/ada/errout.ads | |
parent | 27b2fbc95cea0512e71a4cd3090e68ae2bf4fe1d (diff) | |
download | gcc-dafa2ae46c9f0d95821fd365e8c554008b934819.zip gcc-dafa2ae46c9f0d95821fd365e8c554008b934819.tar.gz gcc-dafa2ae46c9f0d95821fd365e8c554008b934819.tar.bz2 |
[Ada] Factor out the "size for& too small..." error message
Use a constant for the Size_Too_Small_Message, so if it changes, it
won't change in one place but not another. DRY. It might be better to
move this code out of errout.adb, but that's for another day.
2019-08-19 Bob Duff <duff@adacore.com>
gcc/ada/
* errout.ads (Size_Too_Small_Message): New constant.
* errout.adb, freeze.adb, sem_ch13.adb: Use it.
From-SVN: r274648
Diffstat (limited to 'gcc/ada/errout.ads')
-rw-r--r-- | gcc/ada/errout.ads | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index 10a43b1..9a54c7c 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -948,4 +948,10 @@ package Errout is -- This name is the identifier name as passed, cased according to the -- default identifier casing for the given file. + Size_Too_Small_Message : constant String := + "size for& too small, minimum allowed is ^"; + -- This message is explicitly tested in Special_Msg_Delete in the package + -- body, which is somewhat questionable, but at least by using a constant + -- we are obeying the DRY principle. + end Errout; |