aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-26 12:55:01 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-26 12:55:01 +0200
commit3e5daac435e6f3da145310c2140745df5a04fd45 (patch)
tree6d7b227be61304c94ecb1dc6ac2d943020e005c4
parent232b0794a95f6dbb4c05abcd117b6973d300b490 (diff)
downloadgcc-3e5daac435e6f3da145310c2140745df5a04fd45.zip
gcc-3e5daac435e6f3da145310c2140745df5a04fd45.tar.gz
gcc-3e5daac435e6f3da145310c2140745df5a04fd45.tar.bz2
[multiple changes]
2010-10-26 Vincent Celier <celier@adacore.com> * prj.ads (Source_Data): New Boolean component Initialized, defaulted to False, set to True when Source_Data is completely initialized. * prj-env.adb: Minor comment fix. 2010-10-26 Robert Dewar <dewar@adacore.com> * sem_case.adb, sem_ch6.adb, sem_util.adb: Minor reformatting. From-SVN: r165943
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/prj-env.adb2
-rw-r--r--gcc/ada/prj.ads6
-rw-r--r--gcc/ada/sem_case.adb4
-rw-r--r--gcc/ada/sem_ch6.adb16
-rw-r--r--gcc/ada/sem_util.adb2
6 files changed, 33 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 72642c1..cdc66e4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-26 Vincent Celier <celier@adacore.com>
+
+ * prj.ads (Source_Data): New Boolean component Initialized, defaulted
+ to False, set to True when Source_Data is completely initialized.
+ * prj-env.adb: Minor comment fix.
+
+2010-10-26 Robert Dewar <dewar@adacore.com>
+
+ * sem_case.adb, sem_ch6.adb, sem_util.adb: Minor reformatting.
+
2010-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iteration_Scheme): Diagnose attempt to use thew
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb
index f6ae34c..3b49c9a 100644
--- a/gcc/ada/prj-env.adb
+++ b/gcc/ada/prj-env.adb
@@ -2084,7 +2084,7 @@ package body Prj.Env is
Has_Dot : Boolean := False;
Key : Name_Id;
- -- Start of processing for Project_Path_Name_Of
+ -- Start of processing for Find_Project
begin
Initialize_Project_Path (Self, "");
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index ccf0853..f2d1f00 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -663,6 +663,9 @@ package Prj is
-- Structure to define source data
type Source_Data is record
+ Initialized : Boolean := False;
+ -- Set to True when Source_Data is completely initialized
+
Project : Project_Id := No_Project;
-- Project of the source
@@ -784,7 +787,8 @@ package Prj is
end record;
No_Source_Data : constant Source_Data :=
- (Project => No_Project,
+ (Initialized => False,
+ Project => No_Project,
Location => No_Location,
Source_Dir_Rank => 0,
Language => No_Language_Index,
diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb
index ead21f4..400bc117 100644
--- a/gcc/ada/sem_case.adb
+++ b/gcc/ada/sem_case.adb
@@ -313,9 +313,9 @@ package body Sem_Case is
Hi := Expr_Value (Choice_Table (J).Hi);
if Lo <= Prev_Hi then
- Choice := Choice_Table (J).Node;
+ Choice := Choice_Table (J).Node;
- -- Find first previous choice that overlaps.
+ -- Find first previous choice that overlaps
for K in 1 .. J - 1 loop
if Lo <= Expr_Value (Choice_Table (K).Hi) then
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 534f323..95ca6e4 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -2326,12 +2326,24 @@ package body Sem_Ch6 is
-- Case of subprogram body with no previous spec
else
+ -- Check for style warning required
+
if Style_Check
+
+ -- Only apply check for source level subprograms for which checks
+ -- have not been suppressed.
+
and then Comes_From_Source (Body_Id)
and then not Suppress_Style_Checks (Body_Id)
+
+ -- No warnings within an instance
+
and then not In_Instance
- and then Nkind (Original_Node (Body_Id))
- /= N_Parameterized_Expression
+
+ -- No warnings for parameterized expressions
+
+ and then Nkind (Original_Node (Body_Id)) /=
+ N_Parameterized_Expression
then
Style.Body_With_No_Spec (N);
end if;
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 1ec671f..58691c4 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -5122,6 +5122,7 @@ package body Sem_Util is
-- We are interested only in components and discriminants
Exp := Empty;
+
case Ekind (Ent) is
when E_Component =>
@@ -5145,7 +5146,6 @@ package body Sem_Util is
when others =>
goto Check_Next_Entity;
-
end case;
-- A component has PI if it has no default expression and the