2010-10-18 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb: Minor reformatting.
+ * gnat_ugn.texi, ug_words: Add missing entries, fix typos.
+
+2010-10-18 Emmanuel Briot <briot@adacore.com>
+
+ * g-comlin.adb (Is_In_Config): When the switch accepts either a space
+ or equal, we output an equal every time.
+
+2010-10-18 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_res.adb (Resolve_Entry_Call): Handle call to an entry family
+ member when pre/post conditions are present.
+ * exp_ch9.adb (Build_PPC_Wrapper): The PPC_Wrapper for an entry family
+ includes an index parameter, and the name of the enclosed entry call is
+ an indexed component.
+
+2010-10-18 Robert Dewar <dewar@adacore.com>
+
+ * einfo.ads, einfo.adb: Minor reformatting.
2010-10-18 Jose Ruiz <ruiz@adacore.com>
E_Return_Statement |
E_Subprogram_Body |
E_Subprogram_Type =>
-
Write_Str ("Last_Entity");
when Scalar_Kind =>
-- S p e c --
-- --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
--- --
+-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- on the list. A stack is required to handle the case of nested select
-- statements referencing the same entry.
+-- Access_Disp_Table (Elist16) [implementation base type only]
+-- Present in record type entities. For a tagged type, points to the
+-- dispatch tables associated with the tagged type. The first two
+-- entities correspond with the primary dispatch table: 1) primary
+-- dispatch table with user-defined primitives, 2) primary dispatch table
+-- with predefined primitives. For each interface type covered by the
+-- tagged type we also have: 3) secondary dispatch table with thunks of
+-- primitives covering user-defined interface primitives, 4) secondary
+-- dispatch table with thunks of predefined primitives, 5) secondary
+-- dispatch table with user-defined primitives, and 6) secondary dispatch
+-- table with predefined primitives. The last entity of this list is an
+-- access type declaration used to expand dispatching calls through the
+-- primary dispatch table. For a non-tagged record, contains Empty.
+
-- Actual_Subtype (Node17)
-- Present in variables, constants, and formal parameters. This is the
-- subtype imposed by the value of the object, as opposed to its nominal
-- rather irregular, and the semantic checks that depend on the nominal
-- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv).
--- Access_Disp_Table (Elist16) [implementation base type only]
--- Present in record type entities. For a tagged type, points to the
--- dispatch tables associated with the tagged type. The first two
--- entities correspond with the primary dispatch table: 1) primary
--- dispatch table with user-defined primitives, 2) primary dispatch table
--- with predefined primitives. For each interface type covered by the
--- tagged type we also have: 3) secondary dispatch table with thunks of
--- primitives covering user-defined interface primitives, 4) secondary
--- dispatch table with thunks of predefined primitives, 5) secondary
--- dispatch table with user-defined primitives, and 6) secondary dispatch
--- table with predefined primitives. The last entity of this list is an
--- access type declaration used to expand dispatching calls through the
--- primary dispatch table. For a non-tagged record, contains Empty.
-
-- Address_Clause (synthesized)
-- Applies to entries, objects and subprograms. Set if an address clause
-- is present which references the object or subprogram and points to
-- object fields. A pragma Import for a component can define the
-- External_Name of the imported Java field (which is generally needed,
-- because Java names are case sensitive).
---
+
-- In_Use (Flag8)
-- Present in packages and types. Set when analyzing a use clause for
-- the corresponding entity. Reset at end of corresponding declarative
Actuals : constant List_Id := New_List;
-- the actuals in the entry call.
- Entry_Call : constant Node_Id :=
- Make_Procedure_Call_Statement (Loc,
- Name =>
- Make_Selected_Component (Loc,
- Prefix => New_Occurrence_Of (Synch_Id, Loc),
- Selector_Name => New_Occurrence_Of (E, Loc)),
- Parameter_Associations => Actuals);
+ Decls : constant List_Id := New_List;
- Decls : constant List_Id := New_List;
+ Entry_Call : Node_Id;
+ Entry_Name : Node_Id;
Specs : List_Id;
-- The specification of the wrapper procedure
In_Present => True,
Parameter_Type => New_Occurrence_Of (Scope (E), Loc)));
+ Entry_Name :=
+ Make_Selected_Component (Loc,
+ Prefix => New_Occurrence_Of (Synch_Id, Loc),
+ Selector_Name => New_Occurrence_Of (E, Loc));
+
+ -- If entity is entry family, second formal is the corresponding index,
+ -- and entry name is an indexed component.
+
+ if Ekind (E) = E_Entry_Family then
+ declare
+ Index : constant Entity_Id :=
+ Make_Defining_Identifier (Loc, Name_I);
+ begin
+ Append_To (Specs,
+ Make_Parameter_Specification (Loc,
+ Defining_Identifier => Index,
+ Parameter_Type =>
+ New_Occurrence_Of (Entry_Index_Type (E), Loc)));
+
+ Entry_Name := Make_Indexed_Component (Loc,
+ Prefix => Entry_Name,
+ Expressions => New_List (New_Occurrence_Of (Index, Loc)));
+ end;
+ end if;
+
+ Entry_Call :=
+ Make_Procedure_Call_Statement (Loc,
+ Name => Entry_Name,
+ Parameter_Associations => Actuals);
+
-- Now add formals that match those of the entry, and build actuals
-- for the nested entry call.
return False;
end if;
- when Parameter_With_Optional_Space
- | Parameter_With_Space_Or_Equal =>
+ when Parameter_With_Optional_Space =>
if Parameter /= "" then
Callback (Switch, " ", Parameter, Index => Index);
Found_In_Config := True;
return False;
end if;
+ when Parameter_With_Space_Or_Equal =>
+ if Parameter /= "" then
+ Callback (Switch, "=", Parameter, Index => Index);
+ Found_In_Config := True;
+ return False;
+ end if;
+
when Parameter_No_Space =>
if Parameter /= "" then
Callback (Switch, "", Parameter, Index);
null;
when Parameter_With_Space_Or_Equal =>
- if Switch (Param) = ' '
- or else Switch (Param) = '='
+ if Param <= Switch'Last
+ and then
+ (Switch (Param) = ' ' or else Switch (Param) = '=')
then
Callback (Switch (Switch'First .. Last),
"=", Switch (Param + 1 .. Switch'Last), Index);
@item -gnat2005
@cindex @option{-gnat2005} (@command{gcc})
-Allow full Ada 2005 features (same as @option{-gnat05}
+Allow full Ada 2005 features (same as @option{-gnat05})
@item -gnat12
@cindex @option{-gnat12} (@command{gcc})
@item -gnat2012
@cindex @option{-gnat2012} (@command{gcc})
-Allow full Ada 2012 features (same as @option{-gnat12}
+Allow full Ada 2012 features (same as @option{-gnat12})
@item -gnata
@cindex @option{-gnata} (@command{gcc})
@file{stderr} (standard error) giving the number of error messages and
warning messages generated.
-@item -^gnatl^OUTPUT_FILE^=file
-@cindex @option{^-gnatl^OUTPUT_FILE^=fname} (@command{gcc})
+@item ^-gnatl^/OUTPUT_FILE^=file
+@cindex @option{^-gnatl^/OUTPUT_FILE^=fname} (@command{gcc})
This has the same effect as @option{-gnatl} except that the output is
written to a file instead of to standard output. If the given name
@file{fname} does not start with a period, then it is the full name
of the file to be written. If @file{fname} is an extension, it is
appended to the name of the file being compiled. For example, if
-file @file{xyz.adb} is compiled with @option{^-gnatl^OUTPUT_FILE^=.lst},
+file @file{xyz.adb} is compiled with @option{^-gnatl^/OUTPUT_FILE^=.lst},
then the output is written to file ^xyz.adb.lst^xyz.adb_lst^.
@item -gnatU
and then Current_Scope /= PPC_Wrapper (Nam)
then
-- Rewrite as call to the precondition wrapper, adding the task
- -- object to the list of actuals.
+ -- object to the list of actuals. If the call is to a member of
+ -- an entry family, include the index as well.
declare
New_Call : Node_Id;
New_Actuals : List_Id;
begin
New_Actuals := New_List (Obj);
+
+ if Nkind (Entry_Name) = N_Indexed_Component then
+ Append_To (New_Actuals,
+ New_Copy_Tree (First (Expressions (Entry_Name))));
+ end if;
+
Append_List (Parameter_Associations (N), New_Actuals);
New_Call :=
Make_Procedure_Call_Statement (Loc,
-gnat83 ^ /83
-gnat95 ^ /95
-gnat05 ^ /05
+-gnat2005 ^ /2005
+-gnat12 ^ /12
+-gnat2012 ^ /2012
-gnatx ^ /XREF=SUPPRESS
-gnatX ^ /EXTENSIONS_ALLOWED
--RTS ^ /RUNTIME_SYSTEM