+2009-09-18 Pascal Obry <obry@adacore.com>
+
+ * mingw32.h: Activate Unicode support for x86-64 Windows platform.
+
+2009-09-18 Vadim Godunko <godunko@adacore.com>
+
+ * s-oscons-tmplt.c: Add circuit for handling IOV_MAX macro on IRIX.
+
+2009-09-18 Javier Miranda <miranda@adacore.com>
+
+ * exp_aggr.adb (Backend_Processing_Possible): Disable backend
+ processing for array aggregates in the VM backend if the array has
+ aliased components.
+
+2009-09-18 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Analyze_Indexed_Component): Emit error if the type of
+ the prefix indicates a previous semantic error, and this is the first
+ error in the program.
+
+2009-09-18 Bob Duff <duff@adacore.com>
+
+ * gnat_ugn.texi: Minor editing.
+
2009-09-18 Vincent Celier <celier@adacore.com>
* prj.ads, prj.adb (Project_Data): New component
with Sinfo; use Sinfo;
with Snames; use Snames;
with Stand; use Stand;
+with Targparm; use Targparm;
with Tbuild; use Tbuild;
with Uintp; use Uintp;
function Backend_Processing_Possible (N : Node_Id) return Boolean;
-- This function checks if array aggregate N can be processed directly
- -- by Gigi. If this is the case True is returned.
+ -- by the backend. If this is the case True is returned.
function Build_Array_Aggr_Code
(N : Node_Id;
-- 10. No controlled actions need to be generated for components
+ -- 11. The backend is a No_VM backend and the array has aliased components
+
function Backend_Processing_Possible (N : Node_Id) return Boolean is
Typ : constant Entity_Id := Etype (N);
-- Typ is the correct constrained array subtype of the aggregate
return False;
end if;
+ -- Checks 11: Array aggregates with aliased components are currently
+ -- not well supported by the VM backend; disable temporarily this
+ -- backend processing until it is definitely supported.
+
+ if VM_Target /= No_VM
+ and then Has_Aliased_Components (Base_Type (Typ))
+ then
+ return False;
+ end if;
+
-- Backend processing is possible
Set_Size_Known_At_Compile_Time (Etype (N), True);
end if;
Aggr_In := First_Index (Etype (N));
+
if Nkind (Parent (N)) = N_Assignment_Statement then
Obj_In := First_Index (Etype (Name (Parent (N))));
@table @option
-@item -gnatem^^=^@var{path}
+@item -gnatem=@var{path}
@cindex @option{-gnatem} (@command{gcc})
A mapping file is a way to communicate to the compiler two mappings:
from unit names to file names (without any directory information) and from
sources are read over a slow network connection. In normal operation,
you need not be concerned with the format or use of mapping files,
and the @option{-gnatem} switch is not a switch that you would use
-explicitly. it is intended only for use by automatic tools such as
+explicitly. It is intended primarily for use by automatic tools such as
@command{gnatmake} running under the project file facility. The
description here of the format of mapping files is provided
for completeness and for possible use by other tools.
-A mapping file is a sequence of sets of three lines. In each set,
-the first line is the unit name, in lower case, with ``@code{%s}''
-appended for
-specs and ``@code{%b}'' appended for bodies; the second line is the
+A mapping file is a sequence of sets of three lines. In each set, the
+first line is the unit name, in lower case, with @code{%s} appended
+for specs and @code{%b} appended for bodies; the second line is the
file name; and the third line is the path name.
Example:
/gnat/project1/sources/main.2.ada
@end smallexample
-When the switch @option{-gnatem} is specified, the compiler will create
-in memory the two mappings from the specified file. If there is any problem
-(nonexistent file, truncated file or duplicate entries), no mapping will
-be created.
+When the switch @option{-gnatem} is specified, the compiler will
+create in memory the two mappings from the specified file. If there is
+any problem (nonexistent file, truncated file or duplicate entries),
+no mapping will be created.
-Several @option{-gnatem} switches may be specified; however, only the last
-one on the command line will be taken into account.
+Several @option{-gnatem} switches may be specified; however, only the
+last one on the command line will be taken into account.
-When using a project file, @command{gnatmake} create a temporary mapping file
-and communicates it to the compiler using this switch.
+When using a project file, @command{gnatmake} creates a temporary
+mapping file and communicates it to the compiler using this switch.
@end table
@item ^-C^/MAPPING^
@cindex @option{^-C^/MAPPING^} (@command{gnatmake})
-Use a temporary mapping file. A mapping file is a way to communicate to the
-compiler two mappings: from unit names to file names (without any directory
-information) and from file names to path names (with full directory
-information). These mappings are used by the compiler to short-circuit the path
-search. When @command{gnatmake} is invoked with this switch, it will create
-a temporary mapping file, initially populated by the project manager,
-if @option{^-P^/PROJECT_FILE^} is used, otherwise initially empty.
-Each invocation of the compiler will add the newly accessed sources to the
-mapping file. This will improve the source search during the next invocation
-of the compiler.
+Use a temporary mapping file. A mapping file is a way to communicate
+to the compiler two mappings: from unit names to file names (without
+any directory information) and from file names to path names (with
+full directory information). A mapping file can make the compiler's
+file searches faster, especially if there are many source directories,
+or the sources are read over a slow network connection. If
+@option{^-P^/PROJECT_FILE^} is used, a mapping file is always used, so
+@option{^-C^/MAPPING^} is unnecessary; in this case the mapping file
+is initially populated based on the project file. If
+@option{^-C^/MAPPING^} is used without
+@option{^-P^/PROJECT_FILE^},
+the mapping file is initially empty. Each invocation of the compiler
+will add any newly accessed sources to the mapping file.
@item ^-C=^/USE_MAPPING_FILE=^@var{file}
@cindex @option{^-C=^/USE_MAPPING^} (@command{gnatmake})
elsif Array_Type = Any_Type then
Set_Etype (N, Any_Type);
+
+ -- In most cases the analysis of the prefix will have emitted
+ -- an error already, but if the prefix may be interpreted as a
+ -- call in prefixed notation, the report is left to the caller.
+ -- To prevent cascaded errors, report only if no previous ones.
+
+ if Serious_Errors_Detected = 0 then
+ Error_Msg_N ("invalid prefix in indexed component", P);
+
+ if Nkind (P) = N_Expanded_Name then
+ Error_Msg_NE ("\& is not visible", P, Selector_Name (P));
+ end if;
+ end if;
+
return;
-- Here we definitely have a bad indexing
begin
return Present (Visible_Op)
+ and then Scope (Op) = Scope (Visible_Op)
and then not Comes_From_Source (Visible_Op)
and then Alias (Visible_Op) = Op
and then not Is_Hidden (Visible_Op);