aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2015-02-20 14:38:28 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-02-20 15:38:28 +0100
commitab260a3e0cd3fd1d95050e10474223e03784e9b6 (patch)
treea952cd666c79a4d6f5595f92e0b0431692512374 /gcc
parent2290a0fec1ffaa96f33dcc79bef60ed3c00fd947 (diff)
downloadgcc-ab260a3e0cd3fd1d95050e10474223e03784e9b6.zip
gcc-ab260a3e0cd3fd1d95050e10474223e03784e9b6.tar.gz
gcc-ab260a3e0cd3fd1d95050e10474223e03784e9b6.tar.bz2
sem_prag.adb (Analyze_Pragma, [...]): Pragma legally applies to an abstract subprogram declaration.
2015-02-20 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma legally applies to an abstract subprogram declaration. * freeze.adb: Minor comment addition. From-SVN: r220870
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/freeze.adb8
-rw-r--r--gcc/ada/sem_prag.adb5
3 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 60acc83..cc49e4c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
+ legally applies to an abstract subprogram declaration.
+ * freeze.adb: Minor comment addition.
+
2015-02-20 Robert Dewar <dewar@adacore.com>
* errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index c16a4e2..e01b9cc6 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -8035,7 +8035,13 @@ package body Freeze is
end if;
-- If a pragma Import follows, we assume that it is for the current
- -- target of the address clause, and skip the warning.
+ -- target of the address clause, and skip the warning. There may be
+ -- a source pragma or an aspect that specifies import and generates
+ -- the corresponding pragma. These will indicate that the entity is
+ -- imported and that is checked above so that the spurious warning
+ -- (generated when the entity is frozen) will be suppressed. The
+ -- pragma may be attached to the aspect, so it is not yet a list
+ -- member.
if Is_List_Member (Parent (Expr)) then
Decl := Next (Parent (Expr));
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index ac745e7..dd3e78b 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -17233,13 +17233,16 @@ package body Sem_Prag is
end;
end if;
- -- Cases where we must follow a declaration
+ -- Cases where we must follow a declaration, including an
+ -- abstract subprogram declaration, which is not in the
+ -- other node subtypes.
else
if Nkind (Decl) not in N_Declaration
and then Nkind (Decl) not in N_Later_Decl_Item
and then Nkind (Decl) not in N_Generic_Declaration
and then Nkind (Decl) not in N_Renaming_Declaration
+ and then Nkind (Decl) /= N_Abstract_Subprogram_Declaration
then
Error_Pragma
("pragma% misplaced, "