+2014-01-27 Ben Brosgol <brosgol@adacore.com>
+
+ * gnat_rm.texi: Minor clarifications.
+
+2014-01-27 Robert Dewar <dewar@adacore.com>
+
+ * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
+ about call that is generated as part of an Initial_Condition
+ check.
+ * sem_prag.adb: Minor spelling correction.
+
2014-01-27 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Set_Convention_From_Pragma): Check that
@end copying
@set EDITION GNAT
-@set DEFAULTLANGUAGEVERSION Ada 2005
-@set NONDEFAULTLANGUAGEVERSION Ada 95
@settitle GNAT Reference Manual
characteristics of @value{EDITION}, including all the information required by
Annex M of the Ada language standard.
-@value{EDITION} implements Ada 95 and Ada 2005, and it may also be invoked in
-Ada 83 compatibility mode.
-By default, @value{EDITION} assumes @value{DEFAULTLANGUAGEVERSION},
+@value{EDITION} implements Ada 95, Ada 2005 and Ada 2012, and it may also be
+invoked in Ada 83 compatibility mode.
+By default, @value{EDITION} assumes Ada 2012,
but you can override with a compiler switch
to explicitly specify the language version.
(Please refer to @ref{Compiling Different Versions of Ada,,, gnat_ugn,
@value{EDITION} User's Guide}, for details on these switches.)
Throughout this manual, references to ``Ada'' without a year suffix
-apply to both the Ada 95 and Ada 2005 versions of the language.
+apply to all the Ada versions of the language.
Ada is designed to be highly portable.
In general, a program will have the same effect even when compiled by
extension supplied with the compiler, for example @code{Aux_DEC} or
you can construct your own extension unit following the above
definition. Note that such a package is a child of @code{System}
-and thus is considered part of the implementation. To compile
-it you will have to use the appropriate switch for compiling
-system units.
-@xref{Top, @value{EDITION} User's Guide, About This Guide, gnat_ugn, @value{EDITION} User's Guide},
-for details.
+and thus is considered part of the implementation.
+To compile it you will have to use the @option{-gnatg} switch,
+or the @option{/GNAT_INTERNAL} qualifier on OpenVMS,
+for compiling System units, as explained in the
+@value{EDITION} User's Guide.
@node Pragma Extensions_Allowed
@unnumberedsec Pragma Extensions_Allowed
declare
P : Node_Id;
+ O : Node_Id;
+
begin
P := Parent (N);
loop
+ -- Keep looking at parents if we are still in the subexpression
+
if Nkind (P) in N_Subexpr then
P := Parent (P);
- elsif Nkind (P) = N_If_Statement
- and then Nkind (Original_Node (P)) = N_Pragma
- and then Present (Corresponding_Aspect (Original_Node (P)))
- then
- return;
+
+ -- Here P is the parent of the expression, check for special case
+
else
- exit;
+ O := Original_Node (P);
+
+ -- Definitely not the special case if orig node is not a pragma
+
+ exit when Nkind (O) /= N_Pragma;
+
+ -- Check we have an If statement or a null statement (happens
+ -- when the If has been expanded to be True).
+
+ exit when not Nkind_In (P, N_If_Statement, N_Null_Statement);
+
+ -- Our special case will be indicated either by the pragma
+ -- coming from an aspect ...
+
+ if Present (Corresponding_Aspect (O)) then
+ return;
+
+ -- Or, in the case of an initial condition, specifically by a
+ -- Check pragma specifying an Initial_Condition check.
+
+ elsif Pragma_Name (O) = Name_Check
+ and then
+ Chars
+ (Expression (First (Pragma_Argument_Associations (O)))) =
+ Name_Initial_Condition
+ then
+ return;
+
+ -- For anything else, we have an error
+
+ else
+ exit;
+ end if;
end if;
end loop;
end;