Commit 6465b6a7 by Arnaud Charlet

[multiple changes]

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.

From-SVN: r151844
parent 0816e70c
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> 2009-09-18 Vincent Celier <celier@adacore.com>
* prj.ads, prj.adb (Project_Data): New component * prj.ads, prj.adb (Project_Data): New component
......
...@@ -56,6 +56,7 @@ with Sem_Util; use Sem_Util; ...@@ -56,6 +56,7 @@ with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo; with Sinfo; use Sinfo;
with Snames; use Snames; with Snames; use Snames;
with Stand; use Stand; with Stand; use Stand;
with Targparm; use Targparm;
with Tbuild; use Tbuild; with Tbuild; use Tbuild;
with Uintp; use Uintp; with Uintp; use Uintp;
...@@ -216,7 +217,7 @@ package body Exp_Aggr is ...@@ -216,7 +217,7 @@ package body Exp_Aggr is
function Backend_Processing_Possible (N : Node_Id) return Boolean; function Backend_Processing_Possible (N : Node_Id) return Boolean;
-- This function checks if array aggregate N can be processed directly -- 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 function Build_Array_Aggr_Code
(N : Node_Id; (N : Node_Id;
...@@ -508,6 +509,8 @@ package body Exp_Aggr is ...@@ -508,6 +509,8 @@ package body Exp_Aggr is
-- 10. No controlled actions need to be generated for components -- 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 function Backend_Processing_Possible (N : Node_Id) return Boolean is
Typ : constant Entity_Id := Etype (N); Typ : constant Entity_Id := Etype (N);
-- Typ is the correct constrained array subtype of the aggregate -- Typ is the correct constrained array subtype of the aggregate
...@@ -634,6 +637,16 @@ package body Exp_Aggr is ...@@ -634,6 +637,16 @@ package body Exp_Aggr is
return False; return False;
end if; 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 -- Backend processing is possible
Set_Size_Known_At_Compile_Time (Etype (N), True); Set_Size_Known_At_Compile_Time (Etype (N), True);
...@@ -4622,6 +4635,7 @@ package body Exp_Aggr is ...@@ -4622,6 +4635,7 @@ package body Exp_Aggr is
end if; end if;
Aggr_In := First_Index (Etype (N)); Aggr_In := First_Index (Etype (N));
if Nkind (Parent (N)) = N_Assignment_Statement then if Nkind (Parent (N)) = N_Assignment_Statement then
Obj_In := First_Index (Etype (Name (Parent (N)))); Obj_In := First_Index (Etype (Name (Parent (N))));
......
...@@ -7389,7 +7389,7 @@ through the compilation and binding steps. ...@@ -7389,7 +7389,7 @@ through the compilation and binding steps.
@table @option @table @option
@item -gnatem^^=^@var{path} @item -gnatem=@var{path}
@cindex @option{-gnatem} (@command{gcc}) @cindex @option{-gnatem} (@command{gcc})
A mapping file is a way to communicate to the compiler two mappings: 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 from unit names to file names (without any directory information) and from
...@@ -7401,15 +7401,14 @@ compiler, but mapping files can improve efficiency, particularly when ...@@ -7401,15 +7401,14 @@ compiler, but mapping files can improve efficiency, particularly when
sources are read over a slow network connection. In normal operation, sources are read over a slow network connection. In normal operation,
you need not be concerned with the format or use of mapping files, 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 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 @command{gnatmake} running under the project file facility. The
description here of the format of mapping files is provided description here of the format of mapping files is provided
for completeness and for possible use by other tools. for completeness and for possible use by other tools.
A mapping file is a sequence of sets of three lines. In each set, A mapping file is a sequence of sets of three lines. In each set, the
the first line is the unit name, in lower case, with ``@code{%s}'' first line is the unit name, in lower case, with @code{%s} appended
appended for for specs and @code{%b} appended for bodies; the second line is the
specs and ``@code{%b}'' appended for bodies; the second line is the
file name; and the third line is the path name. file name; and the third line is the path name.
Example: Example:
...@@ -7419,16 +7418,16 @@ Example: ...@@ -7419,16 +7418,16 @@ Example:
/gnat/project1/sources/main.2.ada /gnat/project1/sources/main.2.ada
@end smallexample @end smallexample
When the switch @option{-gnatem} is specified, the compiler will create When the switch @option{-gnatem} is specified, the compiler will
in memory the two mappings from the specified file. If there is any problem create in memory the two mappings from the specified file. If there is
(nonexistent file, truncated file or duplicate entries), no mapping will any problem (nonexistent file, truncated file or duplicate entries),
be created. no mapping will be created.
Several @option{-gnatem} switches may be specified; however, only the last Several @option{-gnatem} switches may be specified; however, only the
one on the command line will be taken into account. last one on the command line will be taken into account.
When using a project file, @command{gnatmake} create a temporary mapping file When using a project file, @command{gnatmake} creates a temporary
and communicates it to the compiler using this switch. mapping file and communicates it to the compiler using this switch.
@end table @end table
...@@ -9267,16 +9266,19 @@ the objects. ...@@ -9267,16 +9266,19 @@ the objects.
@item ^-C^/MAPPING^ @item ^-C^/MAPPING^
@cindex @option{^-C^/MAPPING^} (@command{gnatmake}) @cindex @option{^-C^/MAPPING^} (@command{gnatmake})
Use a temporary mapping file. A mapping file is a way to communicate to the Use a temporary mapping file. A mapping file is a way to communicate
compiler two mappings: from unit names to file names (without any directory to the compiler two mappings: from unit names to file names (without
information) and from file names to path names (with full directory any directory information) and from file names to path names (with
information). These mappings are used by the compiler to short-circuit the path full directory information). A mapping file can make the compiler's
search. When @command{gnatmake} is invoked with this switch, it will create file searches faster, especially if there are many source directories,
a temporary mapping file, initially populated by the project manager, or the sources are read over a slow network connection. If
if @option{^-P^/PROJECT_FILE^} is used, otherwise initially empty. @option{^-P^/PROJECT_FILE^} is used, a mapping file is always used, so
Each invocation of the compiler will add the newly accessed sources to the @option{^-C^/MAPPING^} is unnecessary; in this case the mapping file
mapping file. This will improve the source search during the next invocation is initially populated based on the project file. If
of the compiler. @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} @item ^-C=^/USE_MAPPING_FILE=^@var{file}
@cindex @option{^-C=^/USE_MAPPING^} (@command{gnatmake}) @cindex @option{^-C=^/USE_MAPPING^} (@command{gnatmake})
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
#if (((__MINGW32_MAJOR_VERSION == 3 \ #if (((__MINGW32_MAJOR_VERSION == 3 \
&& __MINGW32_MINOR_VERSION >= 9) \ && __MINGW32_MINOR_VERSION >= 9) \
|| (__MINGW32_MAJOR_VERSION >= 4)) \ || (__MINGW32_MAJOR_VERSION >= 4) \
|| defined (__MINGW64)) \
&& !defined (RTX)) && !defined (RTX))
#define GNAT_UNICODE_SUPPORT #define GNAT_UNICODE_SUPPORT
......
...@@ -79,8 +79,16 @@ pragma Style_Checks ("M32766"); ...@@ -79,8 +79,16 @@ pragma Style_Checks ("M32766");
**/ **/
#if defined (__linux__) && !defined (_XOPEN_SOURCE) #if defined (__linux__) && !defined (_XOPEN_SOURCE)
/* For Linux _XOPEN_SOURCE must be defined, otherwise IOV_MAX is not defined */ /** For Linux _XOPEN_SOURCE must be defined, otherwise IOV_MAX is not defined
**/
#define _XOPEN_SOURCE 500 #define _XOPEN_SOURCE 500
#elif defined (__mips) && defined (__sgi)
/** For IRIX _XOPEN5 must be defined and _XOPEN_IOV_MAX must be used as IOV_MAX,
** otherwise IOV_MAX is not defined.
**/
#define _XOPEN5
#define IOV_MAX _XOPEN_IOV_MAX
#endif #endif
#include <stdlib.h> #include <stdlib.h>
......
...@@ -1712,6 +1712,20 @@ package body Sem_Ch4 is ...@@ -1712,6 +1712,20 @@ package body Sem_Ch4 is
elsif Array_Type = Any_Type then elsif Array_Type = Any_Type then
Set_Etype (N, Any_Type); 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; return;
-- Here we definitely have a bad indexing -- Here we definitely have a bad indexing
...@@ -6689,6 +6703,7 @@ package body Sem_Ch4 is ...@@ -6689,6 +6703,7 @@ package body Sem_Ch4 is
begin begin
return Present (Visible_Op) return Present (Visible_Op)
and then Scope (Op) = Scope (Visible_Op)
and then not Comes_From_Source (Visible_Op) and then not Comes_From_Source (Visible_Op)
and then Alias (Visible_Op) = Op and then Alias (Visible_Op) = Op
and then not Is_Hidden (Visible_Op); and then not Is_Hidden (Visible_Op);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment