aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 12:20:53 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 12:20:53 +0200
commit80298c3b46400a8f24be35ddf9169ccc18e5cf9b (patch)
treed0113c6bb07ea51e9404e924779d8e78843f1eae /gcc/ada/sem_ch13.adb
parent0083dd669163646b53f80d35dc3c57e403ba7637 (diff)
downloadgcc-80298c3b46400a8f24be35ddf9169ccc18e5cf9b.zip
gcc-80298c3b46400a8f24be35ddf9169ccc18e5cf9b.tar.gz
gcc-80298c3b46400a8f24be35ddf9169ccc18e5cf9b.tar.bz2
[multiple changes]
2014-06-13 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change reason to Overflow. 2014-06-13 Robert Dewar <dewar@adacore.com> * makeutl.adb: Minor reformatting. 2014-06-13 Gail Schenker <schenker@adacore.com> * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and associated flag (d.z), no longer needed. 2014-06-13 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and Export aspects, do not check whether a corresponding Convention aspect has been specified. Convention is optional in Ada2012, and defaults to Convention_Ada. From-SVN: r211624
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb50
1 files changed, 6 insertions, 44 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 65fca1d..47bdff0 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -2704,50 +2704,12 @@ package body Sem_Ch13 is
Set_Never_Set_In_Source (E, False);
end if;
- -- Verify that there is an aspect Convention that will
- -- incorporate the Import/Export aspect, and eventual
- -- Link/External names.
-
- declare
- A : Node_Id;
-
- begin
- A := First (L);
- while Present (A) loop
- exit when Chars (Identifier (A)) = Name_Convention;
- Next (A);
- end loop;
-
- -- It is legal to specify Import for a variable, in
- -- order to suppress initialization for it, without
- -- specifying explicitly its convention. However this
- -- is only legal if the convention of the object type
- -- is Ada or similar.
-
- if No (A) then
- if Ekind (E) = E_Variable
- and then A_Id = Aspect_Import
- then
- declare
- C : constant Convention_Id :=
- Convention (Etype (E));
- begin
- if C = Convention_Ada or else
- C = Convention_Ada_Pass_By_Copy or else
- C = Convention_Ada_Pass_By_Reference
- then
- goto Continue;
- end if;
- end;
- end if;
-
- -- Otherwise, Convention must be specified
-
- Error_Msg_N
- ("missing Convention aspect for Export/Import",
- Aspect);
- end if;
- end;
+ -- In older versions of Ada the corresponding pragmas
+ -- specified a Convention. In Ada 2012 the convention
+ -- is specified as a separate aspect, and it is optional,
+ -- given that it defaults to Convention_Ada. The code
+ -- that verifed that there was a matching convention
+ -- is now obsolete.
goto Continue;
end if;