+2011-08-03 Emmanuel Briot <briot@adacore.com>
+
+ * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
+
+2011-08-03 Javier Miranda <miranda@adacore.com>
+
+ * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
+ Tagged_Type_Expansion.
+
+2011-08-03 Yannick Moy <moy@adacore.com>
+
+ * sem_res.adb
+ (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
+ concatenation is the name of a constant
+
2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
with Atree; use Atree;
with Einfo; use Einfo;
with Namet; use Namet;
-with Opt; use Opt;
with Sinfo; use Sinfo;
with Snames; use Snames;
with Stand; use Stand;
+with Targparm; use Targparm;
package body Sem_Aux is
function Is_VM_By_Copy_Actual (N : Node_Id) return Boolean is
begin
- return not Tagged_Type_Expansion
+ return VM_Target /= No_VM
and then Nkind (N) = N_Identifier
and then Present (Renamed_Object (Entity (N)))
and then Nkind (Renamed_Object (Entity (N))) = N_Slice;
end if;
-- Concatenation is restricted in SPARK: each operand must be either a
- -- string literal, a static character expression, or another
- -- concatenation. Arg cannot be a concatenation here as callers of
- -- Resolve_Op_Concat_Arg call it separately on each final operand, past
- -- concatenation operations.
+ -- string literal, the name of a string constant, a static character or
+ -- string expression, or another concatenation. Arg cannot be a
+ -- concatenation here as callers of Resolve_Op_Concat_Arg call it
+ -- separately on each final operand, past concatenation operations.
if Is_Character_Type (Etype (Arg)) then
if not Is_Static_Expression (Arg) then
end if;
elsif Is_String_Type (Etype (Arg)) then
- if not Is_Static_Expression (Arg) then
+ if not (Nkind_In (Arg, N_Identifier, N_Expanded_Name)
+ and then Is_Constant_Object (Entity (Arg)))
+ and then not Is_Static_Expression (Arg)
+ then
Check_SPARK_Restriction
("string operand for concatenation should be static", N);
end if;