diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 11:04:40 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 11:04:40 +0200 |
commit | 1a265e7824356359788dddf51b04d85ae4f7ff04 (patch) | |
tree | 91ba915ac405b8e5b1f9aeb7989d7fd0795e94bb /gcc/ada/sem_attr.adb | |
parent | 67e28ef818ad694185e3738dad037864d2c51240 (diff) | |
download | gcc-1a265e7824356359788dddf51b04d85ae4f7ff04.zip gcc-1a265e7824356359788dddf51b04d85ae4f7ff04.tar.gz gcc-1a265e7824356359788dddf51b04d85ae4f7ff04.tar.bz2 |
[multiple changes]
2011-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Access): handle properly named
access to protected subprograms in generic bodies.
* sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
protected type, indicate that the convention of the subprogram is
Convention_Protected, because it may be used in subsequent declarations
within the protected declaration.
2011-08-01 Vincent Celier <celier@adacore.com>
* mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
and "final" procedures when the name of the library is "ada", to avoid
duplicate symbols "adainit" and "adafinal" in executables.
From-SVN: r177002
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r-- | gcc/ada/sem_attr.adb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 734c1a7..ea00352 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -7837,14 +7837,16 @@ package body Sem_Attr is if Ekind_In (Btyp, E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type, + E_Access_Protected_Subprogram_Type, E_Anonymous_Access_Protected_Subprogram_Type) then -- Deal with convention mismatch - if Convention (Btyp) /= Convention (Entity (P)) then + if Convention (Designated_Type (Btyp)) /= + Convention (Entity (P)) + then Error_Msg_FE ("subprogram & has wrong convention", P, Entity (P)); - Error_Msg_FE ("\does not match convention of access type &", P, Btyp); |