diff options
author | Thomas Quinot <quinot@adacore.com> | 2005-03-29 18:19:33 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-03-29 18:19:33 +0200 |
commit | 6332d8420e1069330ec15e58d97702c20fe856d6 (patch) | |
tree | 6e697df86b5a439af1b9009cca5a2ae1fd79e0f8 /gcc/ada/sem_util.adb | |
parent | 73e69194b512e909a964bd389904b520658490cc (diff) | |
download | gcc-6332d8420e1069330ec15e58d97702c20fe856d6.zip gcc-6332d8420e1069330ec15e58d97702c20fe856d6.tar.gz gcc-6332d8420e1069330ec15e58d97702c20fe856d6.tar.bz2 |
sem_cat.adb (Validate_Remote_Types_Type_Conversion): Perform check to forbid conversion of a local access-to-subprogram type to a...
2005-03-29 Thomas Quinot <quinot@adacore.com>
* sem_cat.adb (Validate_Remote_Types_Type_Conversion): Perform check to
forbid conversion of a local access-to-subprogram type to a remote one.
* sem_util.adb (Wrong_Type): For a record type that is the expanded
equivalent type for a remote access-to-subprogram type, go back to the
original RAS entity when displaying an error message, so the casing is
the original source casing.
From-SVN: r97182
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 00fc1a1..fe35434 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -6770,16 +6770,20 @@ package body Sem_Util is Found_Scope := Scope (Found_Scope); exit when Expec_Scope = Standard_Standard - or else - Found_Scope = Standard_Standard - or else - not Comes_From_Source (Expec_Scope) - or else - not Comes_From_Source (Found_Scope); + or else Found_Scope = Standard_Standard + or else not Comes_From_Source (Expec_Scope) + or else not Comes_From_Source (Found_Scope); end loop; end; - Error_Msg_NE ("expected}!", Expr, Expec_Type); + if Is_Record_Type (Expec_Type) + and then Present (Corresponding_Remote_Type (Expec_Type)) + then + Error_Msg_NE ("expected}!", Expr, + Corresponding_Remote_Type (Expec_Type)); + else + Error_Msg_NE ("expected}!", Expr, Expec_Type); + end if; if Is_Entity_Name (Expr) and then Is_Package (Entity (Expr)) |