aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-04-27 15:25:54 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-27 15:25:54 +0200
commit57323d5bd3d3b553788a6f13217829069bf95bfe (patch)
treecadf403001fefe729cb1479ae866998d44cc4fd0 /gcc
parentac566cbe4b11e71b0c9c3b595e1787fe06487310 (diff)
downloadgcc-57323d5bd3d3b553788a6f13217829069bf95bfe.zip
gcc-57323d5bd3d3b553788a6f13217829069bf95bfe.tar.gz
gcc-57323d5bd3d3b553788a6f13217829069bf95bfe.tar.bz2
[multiple changes]
2016-04-27 Arnaud Charlet <charlet@adacore.com> * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed. 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com> * errout.adb, errutil.adb: Minor reformatting. 2016-04-27 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post): Check that the classwide version is illegal when the prefix is an operation of an untagged synchronized type. From-SVN: r235504
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/errout.adb1
-rw-r--r--gcc/ada/errutil.adb3
-rw-r--r--gcc/ada/sem_case.adb5
-rw-r--r--gcc/ada/sem_ch10.adb4
-rw-r--r--gcc/ada/sem_ch13.adb18
6 files changed, 37 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a69659d..0a0f039 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,17 @@
+2016-04-27 Arnaud Charlet <charlet@adacore.com>
+
+ * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
+
+2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * errout.adb, errutil.adb: Minor reformatting.
+
+2016-04-27 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
+ Check that the classwide version is illegal when the prefix is
+ an operation of an untagged synchronized type.
+
2016-04-27 Arnaud Charlet <charleT@adacore.com>
* sinput-l.ads, sem_ch13.adb: Minor editing.
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index a003281..1c794de 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -3082,6 +3082,7 @@ package body Errout is
begin
if Is_Serious_Error then
+
-- We always set Error_Posted on the node itself
Set_Error_Posted (N);
diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb
index d4e9510..3a8f0fb 100644
--- a/gcc/ada/errutil.adb
+++ b/gcc/ada/errutil.adb
@@ -314,8 +314,7 @@ package body Errutil is
end if;
elsif Errors.Table (Cur_Msg).Warn
- or else
- Errors.Table (Cur_Msg).Style
+ or else Errors.Table (Cur_Msg).Style
then
Warnings_Detected := Warnings_Detected + 1;
diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb
index ee845ee..8df46f06 100644
--- a/gcc/ada/sem_case.adb
+++ b/gcc/ada/sem_case.adb
@@ -1128,10 +1128,7 @@ package body Sem_Case is
procedure No_OP (C : Node_Id) is
begin
if Nkind (C) = N_Range and then Warn_On_Redundant_Constructs then
- Error_Msg_N ("choice is an empty range?", C);
-
- else
- null;
+ Error_Msg_N ("choice is an empty range?r?", C);
end if;
end No_OP;
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index c02cd4f..5ab4afb 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -557,7 +557,7 @@ package body Sem_Ch10 is
or else Used_In_Spec)
then
Error_Msg_N -- CODEFIX
- ("redundant with clause in body??", Clause);
+ ("redundant with clause in body?r?", Clause);
end if;
Used_In_Body := False;
@@ -586,7 +586,7 @@ package body Sem_Ch10 is
if Withed then
Error_Msg_N -- CODEFIX
- ("redundant with clause??", Clause);
+ ("redundant with clause?r?", Clause);
end if;
end;
end if;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 8afc542..54cc886 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -3129,6 +3129,24 @@ package body Sem_Ch13 is
Pname := Name_Postcondition;
end if;
+ -- Check that the class-wide predicate cannot be applied to
+ -- an operation of a synchronized type that is not a tagged
+ -- type. Other legality checks are performed when analyzing
+ -- the contract of the operation.
+
+ if Class_Present (Aspect)
+ and then Is_Concurrent_Type (Current_Scope)
+ and then not Is_Tagged_Type (Current_Scope)
+ and then Ekind_In (E, E_Entry, E_Function, E_Procedure)
+ then
+ Error_Msg_Name_1 := Original_Aspect_Pragma_Name (Aspect);
+ Error_Msg_N
+ ("aspect % can only be specified for a primitive "
+ & "operation of a tagged type", Aspect);
+
+ goto Continue;
+ end if;
+
-- If the expressions is of the form A and then B, then
-- we generate separate Pre/Post aspects for the separate
-- clauses. Since we allow multiple pragmas, there is no