aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-10-31 12:43:09 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-31 12:43:09 +0100
commit715e529d70b264c2392fab72bb4b17ec18fb93fd (patch)
treebf9d7a859d74f52e68daa61936080f0142af7728 /gcc/ada/sem_attr.adb
parent88305f176dd10ea3f8c60ed65ca7eb189591e069 (diff)
downloadgcc-715e529d70b264c2392fab72bb4b17ec18fb93fd.zip
gcc-715e529d70b264c2392fab72bb4b17ec18fb93fd.tar.gz
gcc-715e529d70b264c2392fab72bb4b17ec18fb93fd.tar.bz2
[multiple changes]
2014-10-31 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Analyze_Access_Attribute): Do not emit error message if reference does not come from source, as in the case for the controlling argument of a dispatching call. Error is diagnosed when call is resolved. * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM reference in error message. * sem_res.adb (Check_Prefixed_Call): ditto. 2014-10-31 Yannick Moy <moy@adacore.com> * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not suppress checks when pragma Restrictions (No_Exception) is used in CodePeer or GNATprove mode. 2014-10-31 Yannick Moy <moy@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language checks as not suppressed in GNATprove mode. 2014-10-31 Ed Schonberg <schonberg@adacore.com> * sem_elab.adb (Check_Elab_Call): Nothing to check if call is being pre-analyzed. * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full view are those of the base, use rep_item chain of partial view, which may include aspects. * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type of base type, to handle properly declared subtypes. From-SVN: r216969
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 071399b..ced9831 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -1041,12 +1041,17 @@ package body Sem_Attr is
if not Is_Aliased_View (P)
and then not In_Instance
and then not In_Inlined_Body
+ and then Comes_From_Source (N)
then
-- Here we have a non-aliased view. This is illegal unless we
-- have the case of Unrestricted_Access, where for now we allow
-- this (we will reject later if expected type is access to an
-- unconstrained array with a thin pointer).
+ -- No need for an error message on a generated access reference
+ -- for the controlling argument in a dispatching call: error will
+ -- be reported when resolving the call.
+
if Aname /= Name_Unrestricted_Access then
Error_Attr_P ("prefix of % attribute must be aliased");
Check_No_Implicit_Aliasing (P);