[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
This commit is contained in:
parent
0816e70ccf
commit
6465b6a71f
6 changed files with 91 additions and 27 deletions
|
@ -1,3 +1,27 @@
|
|||
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
|
||||
|
|
|
@ -56,6 +56,7 @@ with Sem_Util; use Sem_Util;
|
|||
with Sinfo; use Sinfo;
|
||||
with Snames; use Snames;
|
||||
with Stand; use Stand;
|
||||
with Targparm; use Targparm;
|
||||
with Tbuild; use Tbuild;
|
||||
with Uintp; use Uintp;
|
||||
|
||||
|
@ -216,7 +217,7 @@ package body Exp_Aggr is
|
|||
|
||||
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;
|
||||
|
@ -508,6 +509,8 @@ package body Exp_Aggr is
|
|||
|
||||
-- 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
|
||||
|
@ -634,6 +637,16 @@ package body Exp_Aggr is
|
|||
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);
|
||||
|
@ -4622,6 +4635,7 @@ package body Exp_Aggr is
|
|||
end if;
|
||||
|
||||
Aggr_In := First_Index (Etype (N));
|
||||
|
||||
if Nkind (Parent (N)) = N_Assignment_Statement then
|
||||
Obj_In := First_Index (Etype (Name (Parent (N))));
|
||||
|
||||
|
|
|
@ -7389,7 +7389,7 @@ through the compilation and binding steps.
|
|||
|
||||
@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
|
||||
|
@ -7401,15 +7401,14 @@ compiler, but mapping files can improve efficiency, particularly when
|
|||
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:
|
||||
|
@ -7419,16 +7418,16 @@ 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
|
||||
|
||||
|
@ -9267,16 +9266,19 @@ the objects.
|
|||
|
||||
@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})
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
|
||||
#if (((__MINGW32_MAJOR_VERSION == 3 \
|
||||
&& __MINGW32_MINOR_VERSION >= 9) \
|
||||
|| (__MINGW32_MAJOR_VERSION >= 4)) \
|
||||
|| (__MINGW32_MAJOR_VERSION >= 4) \
|
||||
|| defined (__MINGW64)) \
|
||||
&& !defined (RTX))
|
||||
#define GNAT_UNICODE_SUPPORT
|
||||
|
||||
|
|
|
@ -79,8 +79,16 @@ pragma Style_Checks ("M32766");
|
|||
**/
|
||||
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1712,6 +1712,20 @@ package body Sem_Ch4 is
|
|||
|
||||
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
|
||||
|
@ -6689,6 +6703,7 @@ package body Sem_Ch4 is
|
|||
|
||||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue