Commit 5875f8d6 by Arnaud Charlet

[multiple changes]

2010-06-14  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: Add description of '-cargs gcc_switches' to gnatstub
	and gnatppa.

2010-06-14  Thomas Quinot  <quinot@adacore.com>

	* exp_ch4.adb (Expand_Short_Circuit_Operator): New subprogram,
	factoring duplicated code between...
	(Expand_N_And_Than, Expand_N_Or_Else): Remove duplicated code.
	* a-envvar.ads: Minor reformatting

2010-06-14  Arnaud Charlet  <charlet@adacore.com>

	* ali.adb, ali.ads, lib-xref.ads: Document new '+' letter for C/C++
	static entities.
	(Scan_ALI): Take into account new Visibility field.
	(Visibility_Kind): New type.
	(Xref_Entity_Record): Replace Lib field by Visibility.

	* gcc-interface/Make-lang.in: Update dependencies.

2010-06-14  Pascal Obry  <obry@adacore.com>

	* raise.h: Remove unused defintions.

2010-06-14  Bob Duff  <duff@adacore.com>

	* par-ch10.adb (P_Subunit): If the next token after "separate(X)" is
	Tok_Not or Tok_Overriding, call P_Subprogram. We had previously given
	the incorrect error "proper body expected".
	* par-ch6.adb (P_Subprogram): Suppress "overriding indicator not
	allowed here" error in case of subunits, which was triggered by the
	above change to P_Subunit.

From-SVN: r160740
parent 395993ce
2010-06-14 Sergey Rybin <rybin@adacore.com> 2010-06-14 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Add description of '-cargs gcc_switches' to gnatstub
and gnatppa.
2010-06-14 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb (Expand_Short_Circuit_Operator): New subprogram,
factoring duplicated code between...
(Expand_N_And_Than, Expand_N_Or_Else): Remove duplicated code.
* a-envvar.ads: Minor reformatting
2010-06-14 Arnaud Charlet <charlet@adacore.com>
* ali.adb, ali.ads, lib-xref.ads: Document new '+' letter for C/C++
static entities.
(Scan_ALI): Take into account new Visibility field.
(Visibility_Kind): New type.
(Xref_Entity_Record): Replace Lib field by Visibility.
* gcc-interface/Make-lang.in: Update dependencies.
2010-06-14 Pascal Obry <obry@adacore.com>
* raise.h: Remove unused defintions.
2010-06-14 Bob Duff <duff@adacore.com>
* par-ch10.adb (P_Subunit): If the next token after "separate(X)" is
Tok_Not or Tok_Overriding, call P_Subprogram. We had previously given
the incorrect error "proper body expected".
* par-ch6.adb (P_Subprogram): Suppress "overriding indicator not
allowed here" error in case of subunits, which was triggered by the
above change to P_Subunit.
2010-06-14 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi, vms_data.ads: Update gnatelim doc. * gnat_ugn.texi, vms_data.ads: Update gnatelim doc.
2010-06-14 Thomas Quinot <quinot@adacore.com> 2010-06-14 Thomas Quinot <quinot@adacore.com>
......
...@@ -37,7 +37,7 @@ package Ada.Environment_Variables is ...@@ -37,7 +37,7 @@ package Ada.Environment_Variables is
-- environment variable with the given name and value, then -- environment variable with the given name and value, then
-- Constraint_Error is propagated. -- Constraint_Error is propagated.
-- It is implementation defined whether there exist values for which the -- It is implementation defined whether there exist values for which the
-- call Set(Name, Value) has the same effect as Clear (Name). -- call Set (Name, Value) has the same effect as Clear (Name).
procedure Clear (Name : String); procedure Clear (Name : String);
-- If the external execution environment supports environment variables, -- If the external execution environment supports environment variables,
......
...@@ -2190,10 +2190,19 @@ package body ALI is ...@@ -2190,10 +2190,19 @@ package body ALI is
-- Start of processing for Read_Refs_For_One_Entity -- Start of processing for Read_Refs_For_One_Entity
begin begin
XE.Line := Get_Nat; XE.Line := Get_Nat;
XE.Etype := Getc; XE.Etype := Getc;
XE.Col := Get_Nat; XE.Col := Get_Nat;
XE.Lib := (Getc = '*');
case Getc is
when '*' =>
XE.Visibility := Global;
when '+' =>
XE.Visibility := Static;
when others =>
XE.Visibility := Other;
end case;
XE.Entity := Get_Name; XE.Entity := Get_Name;
-- Handle the information about generic instantiations -- Handle the information about generic instantiations
......
...@@ -811,6 +811,11 @@ package ALI is ...@@ -811,6 +811,11 @@ package ALI is
Tref_Derived, -- Derived type typeref (points to parent type) Tref_Derived, -- Derived type typeref (points to parent type)
Tref_Type); -- All other cases Tref_Type); -- All other cases
type Visibility_Kind is
(Global, -- Library level entity
Static, -- Static C/C++ entity
Other); -- Local and other entity
-- The following table records entities for which xrefs are recorded -- The following table records entities for which xrefs are recorded
type Xref_Entity_Record is record type Xref_Entity_Record is record
...@@ -824,8 +829,8 @@ package ALI is ...@@ -824,8 +829,8 @@ package ALI is
Col : Pos; Col : Pos;
-- Column number of definition -- Column number of definition
Lib : Boolean; Visibility : Visibility_Kind;
-- True if entity is library level entity -- Visiblity of entity
Entity : Name_Id; Entity : Name_Id;
-- Name of entity -- Name of entity
......
...@@ -2653,12 +2653,13 @@ ada/lib-load.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ...@@ -2653,12 +2653,13 @@ ada/lib-load.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/lib-util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ada/lib-util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads \ ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads \
ada/lib.ads ada/lib-util.ads ada/lib-util.adb ada/namet.ads ada/opt.ads \ ada/lib.ads ada/lib-util.ads ada/lib-util.adb ada/namet.ads ada/opt.ads \
ada/osint.ads ada/osint-c.ads ada/output.ads ada/system.ads \ ada/osint.ads ada/osint-c.ads ada/output.ads ada/stringt.ads \
ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \ ada/stringt.adb ada/system.ads ada/s-carun8.ads ada/s-exctab.ads \
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/unchdeal.ads ada/tree_io.ads ada/types.ads ada/types.adb ada/uintp.ads \
ada/unchconv.ads ada/unchdeal.ads
ada/lib-writ.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ada/lib-writ.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/ali.ads ada/alloc.ads ada/atree.ads ada/atree.adb \ ada/a-uncdea.ads ada/ali.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
...@@ -2674,15 +2675,15 @@ ada/lib-writ.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ...@@ -2674,15 +2675,15 @@ ada/lib-writ.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem_aux.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ ada/sem_aux.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \ ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
ada/stringt.adb ada/style.ads ada/styleg.ads ada/styleg.adb \ ada/stringt.adb ada/style.ads ada/styleg.ads ada/styleg.adb \
ada/stylesw.ads ada/system.ads ada/s-casuti.ads ada/s-carun8.ads \ ada/stylesw.ads ada/system.ads ada/s-casuti.ads ada/s-crc32.ads \
ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads \ ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \ ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads \ ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/table.adb ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/types.ads \
ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/lib-xref.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ada/lib-xref.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \ ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
......
...@@ -10756,7 +10756,7 @@ Each @var{filename} is the name (including the extension) of a source ...@@ -10756,7 +10756,7 @@ Each @var{filename} is the name (including the extension) of a source
file to process. ``Wildcards'' are allowed, and file to process. ``Wildcards'' are allowed, and
the file name may contain path information. the file name may contain path information.
@samp{-cargs @var{gcc_switches}} is a list of switches for @samp{@var{gcc_switches}} is a list of switches for
@command{gcc}. They will be passed on to all compiler invocations made by @command{gcc}. They will be passed on to all compiler invocations made by
@command{gnatelim} to generate the ASIS trees. Here you can provide @command{gnatelim} to generate the ASIS trees. Here you can provide
@option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path,
...@@ -16164,7 +16164,7 @@ The @command{gnatpp} command has the form ...@@ -16164,7 +16164,7 @@ The @command{gnatpp} command has the form
@smallexample @smallexample
@c $ gnatpp @ovar{switches} @var{filename} @c $ gnatpp @ovar{switches} @var{filename}
@c Expanding @ovar macro inline (explanation in macro def comments) @c Expanding @ovar macro inline (explanation in macro def comments)
$ gnatpp @r{[}@var{switches}@r{]} @var{filename} $ gnatpp @r{[}@var{switches}@r{]} @var{filename} @r{[}-cargs @var{gcc_switches}@r{]}
@end smallexample @end smallexample
@noindent @noindent
...@@ -16180,6 +16180,13 @@ output source file ...@@ -16180,6 +16180,13 @@ output source file
reformat; ``wildcards'' or several file names on the same gnatpp command are reformat; ``wildcards'' or several file names on the same gnatpp command are
allowed. The file name may contain path information; it does not have to allowed. The file name may contain path information; it does not have to
follow the GNAT file naming rules follow the GNAT file naming rules
@item
@samp{@var{gcc_switches}} is a list of switches for
@command{gcc}. They will be passed on to all compiler invocations made by
@command{gnatelim} to generate the ASIS trees. Here you can provide
@option{^-I^/INCLUDE_DIRS=^} switches to form the source search path,
use the @option{-gnatec} switch to set the configuration file etc.
@end itemize @end itemize
@menu @menu
...@@ -17289,7 +17296,7 @@ Including both a @option{-files} switch and one or more ...@@ -17289,7 +17296,7 @@ Including both a @option{-files} switch and one or more
@var{filename} arguments is permitted. @var{filename} arguments is permitted.
@item @item
@samp{-cargs @var{gcc_switches}} is a list of switches for @samp{@var{gcc_switches}} is a list of switches for
@command{gcc}. They will be passed on to all compiler invocations made by @command{gcc}. They will be passed on to all compiler invocations made by
@command{gnatmetric} to generate the ASIS trees. Here you can provide @command{gnatmetric} to generate the ASIS trees. Here you can provide
@option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path,
...@@ -23206,7 +23213,7 @@ option @option{^--no-exception^/NO_EXCEPTION^} (see below). ...@@ -23206,7 +23213,7 @@ option @option{^--no-exception^/NO_EXCEPTION^} (see below).
@smallexample @smallexample
@c $ gnatstub @ovar{switches} @var{filename} @ovar{directory} @c $ gnatstub @ovar{switches} @var{filename} @ovar{directory}
@c Expanding @ovar macro inline (explanation in macro def comments) @c Expanding @ovar macro inline (explanation in macro def comments)
$ gnatstub @r{[}@var{switches}@r{]} @var{filename} @r{[}@var{directory}@r{]} $ gnatstub @r{[}@var{switches}@r{]} @var{filename} @r{[}@var{directory}@r{]} @r{[}-cargs @var{gcc_switches}@r{]}
@end smallexample @end smallexample
@noindent @noindent
...@@ -23234,6 +23241,12 @@ indicates the directory in which the body stub is to be placed (the default ...@@ -23234,6 +23241,12 @@ indicates the directory in which the body stub is to be placed (the default
is the is the
current directory) current directory)
@item @samp{@var{gcc_switches}} is a list of switches for
@command{gcc}. They will be passed on to all compiler invocations made by
@command{gnatelim} to generate the ASIS trees. Here you can provide
@option{^-I^/INCLUDE_DIRS=^} switches to form the source search path,
use the @option{-gnatec} switch to set the configuration file etc.
@item switches @item switches
is an optional sequence of switches as described in the next section is an optional sequence of switches as described in the next section
@end table @end table
...@@ -68,9 +68,10 @@ package Lib.Xref is ...@@ -68,9 +68,10 @@ package Lib.Xref is
-- col is the column number of the referenced entity -- col is the column number of the referenced entity
-- level is a single character that separates the col and -- level is a single character that separates the col and
-- entity fields. It is an asterisk for a top level library -- entity fields. It is an asterisk (*) for a top level library
-- entity that is publicly visible, as well for an entity declared -- entity that is publicly visible, as well for an entity declared
-- in the visible part of a generic package, and space otherwise. -- in the visible part of a generic package, the plus sign (+) for
-- a C/C++ static entity, and space otherwise.
-- entity is the name of the referenced entity, with casing in -- entity is the name of the referenced entity, with casing in
-- the canonical casing for the source file where it is defined. -- the canonical casing for the source file where it is defined.
......
...@@ -1028,7 +1028,11 @@ package body Ch10 is ...@@ -1028,7 +1028,11 @@ package body Ch10 is
Ignore (Tok_Semicolon); Ignore (Tok_Semicolon);
if Token = Tok_Function or else Token = Tok_Procedure then if Token = Tok_Function
or else Token = Tok_Not
or else Token = Tok_Overriding
or else Token = Tok_Procedure
then
Body_Node := P_Subprogram (Pf_Pbod); Body_Node := P_Subprogram (Pf_Pbod);
elsif Token = Tok_Package then elsif Token = Tok_Package then
......
...@@ -215,14 +215,17 @@ package body Ch6 is ...@@ -215,14 +215,17 @@ package body Ch6 is
-- already been given, so no need to give another message here. -- already been given, so no need to give another message here.
-- An overriding indicator is allowed for subprogram declarations, -- An overriding indicator is allowed for subprogram declarations,
-- bodies, renamings, stubs, and instantiations. The test against -- bodies (including subunits), renamings, stubs, and
-- Pf_Decl_Pbod is added to account for the case of subprograms -- instantiations. The test against Pf_Decl_Pbod is added to account
-- declared in a protected type, where only subprogram declarations -- for the case of subprograms declared in a protected type, where
-- and bodies can occur. -- only subprogram declarations and bodies can occur. The Pf_Pbod
-- case is for subunits.
if Pf_Flags /= Pf_Decl_Gins_Pbod_Rnam_Stub if Pf_Flags /= Pf_Decl_Gins_Pbod_Rnam_Stub
and then and then
Pf_Flags /= Pf_Decl_Pbod Pf_Flags /= Pf_Decl_Pbod
and then
Pf_Flags /= Pf_Pbod
then then
Error_Msg_SC ("overriding indicator not allowed here!"); Error_Msg_SC ("overriding indicator not allowed here!");
......
...@@ -45,16 +45,6 @@ struct Exception_Data ...@@ -45,16 +45,6 @@ struct Exception_Data
typedef struct Exception_Data *Exception_Id; typedef struct Exception_Data *Exception_Id;
struct Exception_Occurrence
{
int Max_Length;
Exception_Id Id;
int Msg_Length;
char Msg[0];
};
typedef struct Exception_Occurrence *Exception_Occurrence_Access;
extern void _gnat_builtin_longjmp (void *, int); extern void _gnat_builtin_longjmp (void *, int);
extern void __gnat_unhandled_terminate (void); extern void __gnat_unhandled_terminate (void);
extern void *__gnat_malloc (__SIZE_TYPE__); extern void *__gnat_malloc (__SIZE_TYPE__);
......
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