diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-12 12:03:35 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-12 12:03:35 +0000 |
commit | 41331dcf1619cb5f0dea97d5c653473465b6e0dd (patch) | |
tree | 289e0e4c470d0bd8ee28bc500c039a3d85d5d8c0 /gcc/ada/sem_ch6.adb | |
parent | 208fd589c78729c0dfe7aca1b75249b2e8f164ed (diff) | |
download | gcc-41331dcf1619cb5f0dea97d5c653473465b6e0dd.tar.gz |
2011-12-12 Robert Dewar <dewar@adacore.com>
* exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb,
sem_ch13.adb: Minor reformatting.
2011-12-12 Gary Dismukes <dismukes@adacore.com>
* sem_ch7.adb (Uninstall_Declarations): Don't
apply check for incomplete types used as a result type for an
access-to-function type when compiling for Ada 2012 or later.
* sem_ch6.adb (Analyze_Subprogram_Declaration):
Specialize error message for interface subprograms that are
not declared abstract nor null (functions can't be declared as
null). Also, remove "(Ada 2005)" from message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182230 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r-- | gcc/ada/sem_ch6.adb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 2cc899e934a..846f3a30066 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -3256,9 +3256,16 @@ package body Sem_Ch6 is and then Null_Present (Specification (N))) then Error_Msg_Name_1 := Chars (Defining_Entity (N)); - Error_Msg_N - ("(Ada 2005) interface subprogram % must be abstract or null", - N); + + -- Specialize error message based on procedures vs. functions, + -- since functions can't be null subprograms. + + if Ekind (Designator) = E_Procedure then + Error_Msg_N + ("interface procedure % must be abstract or null", N); + else + Error_Msg_N ("interface function % must be abstract", N); + end if; end if; end; end if; |