* gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
delete or close the file when the call to gnatmake was successful.
2011-08-05 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
Global_Discard_Names.
2011-08-05 Ed Schonberg <schonberg@adacore.com>
* sinfo.ads: comments on use of entity field for aspect specifications.
2011-08-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Reset_Entity): If the entity field of the associated
node is not itself an entity but a selected component, it is a
rewritten parameterless call to an en enclosing synchronized operation,
and this expansion will be performed again in the instance, so there is
no global information to preserve.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177443
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-08-05 Vincent Celier <celier@adacore.com>
+
+ * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
+ delete or close the file when the call to gnatmake was successful.
+
+2011-08-05 Yannick Moy <moy@adacore.com>
+
+ * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
+ Global_Discard_Names.
+
+2011-08-05 Ed Schonberg <schonberg@adacore.com>
+
+ * sinfo.ads: comments on use of entity field for aspect specifications.
+
+2011-08-05 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch12.adb (Reset_Entity): If the entity field of the associated
+ node is not itself an entity but a selected component, it is a
+ rewritten parameterless call to an en enclosing synchronized operation,
+ and this expansion will be performed again in the instance, so there is
+ no global information to preserve.
+
2011-08-05 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
Warning_Mode := Suppress;
+ -- Suppress the generation of name tables for enumerations
+
+ Global_Discard_Names := True;
+
-- Always perform semantics and generate ALI files in ALFA mode,
-- so that a gnatmake -c -k will proceed further when possible.
end if;
end loop;
- if not Keep_Temporary_Files then
- Delete (File);
- else
- Close (File);
- end if;
+ begin
+ if not Keep_Temporary_Files then
+ Delete (File);
+ else
+ Close (File);
+ end if;
+
+ -- Don't crash if it is not possible to delete or close the file,
+ -- just ignore the situation.
+
+ exception
+ when others =>
+ null;
+ end;
end if;
end Get_Closure;
N2 := Get_Associated_Node (N);
E := Entity (N2);
- -- If the entity is an itype created as a subtype of an access type
- -- with a null exclusion restore source entity for proper visibility.
- -- The itype will be created anew in the instance.
-
if Present (E) then
+
+ -- If the node is an entry call to an entry in an enclosing task,
+ -- it is rewritten as a selected component. No global entity
+ -- to preserve in this case, the expansion will be redone in the
+ -- instance.
+
+ if not Nkind_In (E,
+ N_Defining_Identifier,
+ N_Defining_Character_Literal,
+ N_Defining_Operator_Symbol)
+ then
+ Set_Associated_Node (N, Empty);
+ Set_Etype (N, Empty);
+ return;
+ end if;
+
+ -- If the entity is an itype created as a subtype of an access
+ -- type with a null exclusion restore source entity for proper
+ -- visibility. The itype will be created anew in the instance.
+
if Is_Itype (E)
and then Ekind (E) = E_Access_Subtype
and then Is_Entity_Name (N)
-- there is no requirement that these match, and there are obscure cases
-- of generated code where they do not match.
+ -- Note: Aspect specifications, introduced in Ada2012, require additional
+ -- links between identifiers and various attributes. These attributes
+ -- can be of arbitrary types, and the entity field of identifiers that
+ -- denote aspects must be used to store arbitrary expressions for later
+ -- semantic checks. See section on Aspect specifications for details.
+
-- Entity_Or_Associated_Node (Node4-Sem)
-- A synonym for both Entity and Associated_Node. Used by convention in
-- the code when referencing this field in cases where it is not known