aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2006-02-15 10:35:45 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2006-02-15 10:35:45 +0100
commit7a5cf1d56ac04081e82e04e4b89e1934c43ddf1b (patch)
tree236f78145523a354203e9f55dd18d01ebe51d0b1 /gcc/ada
parent858f81da8780777f57a1528578d778b61dd11d32 (diff)
downloadgcc-7a5cf1d56ac04081e82e04e4b89e1934c43ddf1b.zip
gcc-7a5cf1d56ac04081e82e04e4b89e1934c43ddf1b.tar.gz
gcc-7a5cf1d56ac04081e82e04e4b89e1934c43ddf1b.tar.bz2
erroutc.ads, [...] (Set_Message_Blank): Don't insert space after hyphen (small aesthetic change useful for a range of...
2006-02-13 Robert Dewar <dewar@adacore.com> * erroutc.ads, erroutc.adb (Set_Message_Blank): Don't insert space after hyphen (small aesthetic change useful for a range of numbers using ^-^. Suppress range checks for a couple of assignments which otherwise cause validity checks with validity checking turned on. * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Size): Improvement in error message for object. (Rep_Item_Too_Late): Remove '!' in warning message. From-SVN: r111048
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/erroutc.adb38
-rw-r--r--gcc/ada/erroutc.ads6
-rw-r--r--gcc/ada/sem_ch13.adb7
3 files changed, 35 insertions, 16 deletions
diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb
index 05d17c9..7489b29 100644
--- a/gcc/ada/erroutc.adb
+++ b/gcc/ada/erroutc.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -39,7 +39,6 @@ with Output; use Output;
with Sinput; use Sinput;
with Snames; use Snames;
with Targparm; use Targparm;
-with Table;
with Uintp; use Uintp;
package body Erroutc is
@@ -545,6 +544,7 @@ package body Erroutc is
if Msglen > 0
and then Msg_Buffer (Msglen) /= ' '
and then Msg_Buffer (Msglen) /= '('
+ and then Msg_Buffer (Msglen) /= '-'
and then not Manual_Quote_Mode
then
Set_Msg_Char (' ');
@@ -607,10 +607,16 @@ package body Erroutc is
-- The following assignments ensure that the second and third percent
-- insertion characters will correspond to the Error_Msg_Name_2 and
- -- Error_Msg_Name_3 as required.
+ -- Error_Msg_Name_3 as required. We suppress possible validity checks in
+ -- case operating in -gnatVa mode, and Error_Msg_Name_2/3 is not needed
+ -- and has not been set.
- Error_Msg_Name_1 := Error_Msg_Name_2;
- Error_Msg_Name_2 := Error_Msg_Name_3;
+ declare
+ pragma Suppress (Range_Check);
+ begin
+ Error_Msg_Name_1 := Error_Msg_Name_2;
+ Error_Msg_Name_2 := Error_Msg_Name_3;
+ end;
end Set_Msg_Insertion_File_Name;
-----------------------------------
@@ -756,10 +762,16 @@ package body Erroutc is
-- The following assignments ensure that the second and third percent
-- insertion characters will correspond to the Error_Msg_Name_2 and
- -- Error_Msg_Name_3 as required.
+ -- Error_Msg_Name_3 as required. We suppress possible validity checks in
+ -- case operating in -gnatVa mode, and Error_Msg_Name_1/2 is not needed
+ -- and has not been set.
- Error_Msg_Name_1 := Error_Msg_Name_2;
- Error_Msg_Name_2 := Error_Msg_Name_3;
+ declare
+ pragma Suppress (Range_Check);
+ begin
+ Error_Msg_Name_1 := Error_Msg_Name_2;
+ Error_Msg_Name_2 := Error_Msg_Name_3;
+ end;
end Set_Msg_Insertion_Name;
-------------------------------------
@@ -830,9 +842,15 @@ package body Erroutc is
end loop;
-- The following assignment ensures that a second carret insertion
- -- character will correspond to the Error_Msg_Uint_2 parameter.
+ -- character will correspond to the Error_Msg_Uint_2 parameter. We
+ -- suppress possible validity checks in case operating in -gnatVa mode,
+ -- and Error_Msg_Uint_2 is not needed and has not been set.
- Error_Msg_Uint_1 := Error_Msg_Uint_2;
+ declare
+ pragma Suppress (Range_Check);
+ begin
+ Error_Msg_Uint_1 := Error_Msg_Uint_2;
+ end;
end Set_Msg_Insertion_Uint;
-----------------
diff --git a/gcc/ada/erroutc.ads b/gcc/ada/erroutc.ads
index bde0574..8ad6d51 100644
--- a/gcc/ada/erroutc.ads
+++ b/gcc/ada/erroutc.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -307,8 +307,8 @@ package Erroutc is
procedure Set_Msg_Blank;
-- Sets a single blank in the message if the preceding character is a
- -- non-blank character other than a left parenthesis. Has no effect if
- -- manual quote mode is turned on.
+ -- non-blank character other than a left parenthesis or minus. Has no
+ -- effect if manual quote mode is turned on.
procedure Set_Msg_Blank_Conditional;
-- Sets a single blank in the message if the preceding character is a
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index a1e0dff..00505e6 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -981,9 +981,10 @@ package body Sem_Ch13 is
Size /= System_Storage_Unit * 8
then
Error_Msg_Uint_1 := UI_From_Int (System_Storage_Unit);
+ Error_Msg_Uint_2 := Error_Msg_Uint_1 * 8;
Error_Msg_N
("size for primitive object must be a power of 2"
- & " and at least ^", N);
+ & " in the range ^-^", N);
end if;
end if;
@@ -3353,7 +3354,7 @@ package body Sem_Ch13 is
if Present (Freeze_Node (S)) then
Error_Msg_NE
- ("?no more representation items for }!", Freeze_Node (S), S);
+ ("?no more representation items for }", Freeze_Node (S), S);
end if;
return True;