aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2010-08-05 08:52:20 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-08-05 10:52:20 +0200
commitd2f25cd144ad67f5b5b08a610e149aaeb4a75471 (patch)
tree60f8139f84dce304d15abced1e03ebf8951bf516 /gcc
parent9316258dcb09219753a9cb0864c7d493bb7d3b31 (diff)
downloadgcc-d2f25cd144ad67f5b5b08a610e149aaeb4a75471.zip
gcc-d2f25cd144ad67f5b5b08a610e149aaeb4a75471.tar.gz
gcc-d2f25cd144ad67f5b5b08a610e149aaeb4a75471.tar.bz2
sem.adb: Minor reformatting
* sem.adb: Minor reformatting * sem_ch4.adb (Analyze_Reference): Disable error message in CodePeer mode, not useful. From-SVN: r162901
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/sem.adb9
-rw-r--r--gcc/ada/sem_ch4.adb4
3 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7e7dd1e..7db14d0 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-05 Arnaud Charlet <charlet@adacore.com>
+
+ * sem.adb: Minor reformatting
+ * sem_ch4.adb (Analyze_Reference): Disable error message in CodePeer
+ mode, not useful.
+
2010-08-04 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c: Do not undefine IN_GCC_FRONTEND and do not
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index 5e6d8b2..7f71cad 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -1796,8 +1796,8 @@ package body Sem is
-- The body of a unit that is withed by the spec of the main unit
-- may in turn have a with_clause on that spec. In that case do not
-- traverse the body, to prevent loops. It can also happen that the
- -- main body as a with_clause on a child, which of course has an
- -- implicit with on its parent. It's ok to traverse the child body
+ -- main body has a with_clause on a child, which of course has an
+ -- implicit with on its parent. It's OK to traverse the child body
-- if the main spec has been processed, otherwise we also have a
-- circularity to avoid.
@@ -1811,7 +1811,7 @@ package body Sem is
begin
CL := First (Context_Items (CU));
- -- Problem does not arise with main subprograms.
+ -- Problem does not arise with main subprograms
if Nkind (Unit (Main_CU)) /= N_Package_Body then
return False;
@@ -1820,8 +1820,7 @@ package body Sem is
while Present (CL) loop
if Nkind (CL) = N_With_Clause
and then Library_Unit (CL) = Library_Unit (Main_CU)
- and then
- not Done (Get_Cunit_Unit_Number (Library_Unit (CL)))
+ and then not Done (Get_Cunit_Unit_Number (Library_Unit (CL)))
then
return True;
end if;
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 743d128..ca85389 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -3244,12 +3244,14 @@ package body Sem_Ch4 is
-- It is not clear if that can ever occur, but in case it does, we will
-- generate an error message. Not clear if this message can ever be
-- generated, and pretty clear that it represents a bug if it is, still
- -- seems worth checking!
+ -- seems worth checking, except in CodePeer mode where we do not really
+ -- care and don't want to bother the user.
T := Etype (P);
if Is_Entity_Name (P)
and then Is_Object_Reference (P)
+ and then not CodePeer_Mode
then
E := Entity (P);
T := Etype (P);