+2009-04-10 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_attr.adb (Expand_N_Attribute_Reference, case 'Tag): If the tagged
+ type is a synchronized type, retrieve tag information from the
+ corresponding record, which has the dispatch table link.
+
+2009-04-10 Jerome Lambourg <lambourg@adacore.com>
+
+ * g-comlin.adb (Group_Analysis): Take care of switches that might be
+ decomposed afterwards, but are present as-is in the command line
+ configuration, and thus should be kept as-is.
+
2009-04-10 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document that postconditions are tested on implicit
end Group_Analysis;
begin
- -- Are we adding a switch that can in fact be expanded through aliases ?
- -- If yes, we add separately each of its expansion.
+ -- First determine if the switch corresponds to one belonging to the
+ -- configuration. If so, run callback and exit.
+
+ if Cmd.Config /= null and then Cmd.Config.Switches /= null then
+ for S in Cmd.Config.Switches'Range loop
+ declare
+ Config_Switch : String renames Cmd.Config.Switches (S).all;
+ begin
+ if Actual_Switch (Config_Switch) = Switch
+ and then
+ ((Can_Have_Parameter (Config_Switch)
+ and then Parameter /= "")
+ or else
+ (not Require_Parameter (Config_Switch)
+ and then Parameter = ""))
+ then
+ Callback (Switch, Parameter);
+ return;
+ end if;
+ end;
+ end loop;
+ end if;
+
+ -- If adding a switch that can in fact be expanded through aliases,
+ -- add separately each of its expansions.
-- This takes care of expansions like "-T" -> "-gnatwrs", where the
-- alias and its expansion do not have the same prefix. Given the order
-- in which we do things here, the expansion of the alias will itself
- -- be checked for a common prefix and further split into simple switches
+ -- be checked for a common prefix and split into simple switches.
if Unalias
and then Cmd.Config /= null
and then Cmd.Config.Aliases /= null
then
for A in Cmd.Config.Aliases'Range loop
- if Cmd.Config.Aliases (A).all = Switch
- and then Parameter = ""
- then
+ if Cmd.Config.Aliases (A).all = Switch and then Parameter = "" then
For_Each_Simple_Switch
(Cmd, Cmd.Config.Expansions (A).all, "");
return;
end loop;
end if;
- -- Are we adding a switch grouping several switches ? If yes, add each
- -- of the simple switches instead.
+ -- If adding a switch grouping several switches, add each of the simple
+ -- switches instead.
- if Cmd.Config /= null
- and then Cmd.Config.Prefixes /= null
- then
+ if Cmd.Config /= null and then Cmd.Config.Prefixes /= null then
for P in Cmd.Config.Prefixes'Range loop
if Switch'Length > Cmd.Config.Prefixes (P)'Length + 1
and then Looking_At
(Switch, Switch'First, Cmd.Config.Prefixes (P).all)
then
-- Alias expansion will be done recursively
+
if Cmd.Config.Switches = null then
for S in Switch'First + Cmd.Config.Prefixes (P)'Length
.. Switch'Last
(Switch'First + Cmd.Config.Prefixes (P)'Length
.. Switch'Last))
then
- -- Recursive calls already done on each switch of the
- -- group. Let's return to not call Callback.
+ -- Recursive calls already done on each switch of the group:
+ -- Return without executing Callback.
+
return;
end if;
end if;