+2011-08-29 Robert Dewar <dewar@adacore.com>
+
+ * exp_attr.adb: Minor reformatting.
+ Minor code reorganization and commenting.
+ * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
+ reformatting.
+
2011-08-29 Thomas Quinot <quinot@adacore.com>
* get_scos.adb: Ignore chaining indicators not currently supported
Target_Type : constant Entity_Id := Etype (N);
Target_Base : constant Entity_Id := Base_Type (Target_Type);
Expr : constant Node_Id := Expression (N);
- Expr_Type : constant Entity_Id := Underlying_Type (Etype (Expr));
+
+ Expr_Type : constant Entity_Id := Underlying_Type (Etype (Expr));
-- Note: if Etype (Expr) is a private type without discriminants, its
-- full view might have discriminants with defaults, so we need the
-- full view here to retrieve the constraints.
-- to this defining identifier.
when Attribute_Elab_Body |
- Attribute_Elab_Subp_Body |
Attribute_Elab_Spec =>
-- Leave attribute unexpanded in CodePeer mode: the gnat2scil
- -- back-end knows how to handle this attribute directly.
+ -- back-end knows how to handle these attributes directly.
- if CodePeer_Mode or else Id = Attribute_Elab_Subp_Body then
+ if CodePeer_Mode then
return;
end if;
Rewrite (N, New_Occurrence_Of (Ent, Loc));
end Elab_Body;
+ --------------------
+ -- Elab_Subp_Body --
+ --------------------
+
+ -- Always ignored. In CodePeer mode, gnat2scil knows how to handle
+ -- this attribute directly, and if we are not in CodePeer mode it is
+ -- entirely ignored ???
+
+ when Attribute_Elab_Subp_Body =>
+ return;
+
----------------
-- Elaborated --
----------------
------------------------------------------------------------------------------
pragma Ada_2005;
+-- This unit is not part of the compiler proper, it is used in tools that
+-- read SCO information from ALI files (Xcov and sco_test). Ada 2005
+-- constructs may therefore be used freely (and are indeed).
with SCOs; use SCOs;
with Snames; use Snames;
exit when Nextc = ':';
N := N + 1;
end loop;
+
begin
Pid := Pragma_Id'Value (Buf (1 .. N));
exception
when Constraint_Error =>
Pid := Unknown_Pragma;
end;
+
Skipc;
end if;
end if;
-- must generate a P entry for the decision. Note
-- that this is done unconditionally at this stage.
-- Output for disabled pragmas is suppressed later
- -- on, when we output the decision line in
- -- Put_SCOs, depending on marker sets by
- -- Set_SCO_Pragma_Enabled.
+ -- on when we output the decision line in Put_SCOs,
+ -- depending on setting by Set_SCO_Pragma_Enabled.
if Nam = Name_Check then
Next (Arg);
-- Elab_Body --
---------------
- -- Also handles processing for Elab_Spec
+ -- Also handles processing for Elab_Spec and Elab_Subp_Body
when Attribute_Elab_Body |
Attribute_Elab_Spec |