diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-14 13:32:14 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-14 13:32:14 +0000 |
commit | 3755dbc5803218c7b66e96bf8330379c78cff9c6 (patch) | |
tree | 8cd5f637a3983c187a4335bba34225ba77a08a2c | |
parent | d1e3938c29a5adad649532a30a4c8f627ccc955a (diff) | |
download | gcc-3755dbc5803218c7b66e96bf8330379c78cff9c6.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160740 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 35 | ||||
-rwxr-xr-x | gcc/ada/a-envvar.ads | 2 | ||||
-rw-r--r-- | gcc/ada/ali.adb | 17 | ||||
-rw-r--r-- | gcc/ada/ali.ads | 9 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 351 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/Make-lang.in | 31 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 21 | ||||
-rw-r--r-- | gcc/ada/lib-xref.ads | 5 | ||||
-rw-r--r-- | gcc/ada/par-ch10.adb | 6 | ||||
-rw-r--r-- | gcc/ada/par-ch6.adb | 11 | ||||
-rw-r--r-- | gcc/ada/raise.h | 10 |
11 files changed, 250 insertions, 248 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5d4d98a9b58..9f8ca7dfa91 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,40 @@ 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. 2010-06-14 Thomas Quinot <quinot@adacore.com> diff --git a/gcc/ada/a-envvar.ads b/gcc/ada/a-envvar.ads index a2415603e4e..9769c9bb1ee 100755 --- a/gcc/ada/a-envvar.ads +++ b/gcc/ada/a-envvar.ads @@ -37,7 +37,7 @@ package Ada.Environment_Variables is -- environment variable with the given name and value, then -- Constraint_Error is propagated. -- 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); -- If the external execution environment supports environment variables, diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb index 27144b9215f..9effd220168 100644 --- a/gcc/ada/ali.adb +++ b/gcc/ada/ali.adb @@ -2190,10 +2190,19 @@ package body ALI is -- Start of processing for Read_Refs_For_One_Entity begin - XE.Line := Get_Nat; - XE.Etype := Getc; - XE.Col := Get_Nat; - XE.Lib := (Getc = '*'); + XE.Line := Get_Nat; + XE.Etype := Getc; + XE.Col := Get_Nat; + + case Getc is + when '*' => + XE.Visibility := Global; + when '+' => + XE.Visibility := Static; + when others => + XE.Visibility := Other; + end case; + XE.Entity := Get_Name; -- Handle the information about generic instantiations diff --git a/gcc/ada/ali.ads b/gcc/ada/ali.ads index 9056ce59cc6..74aeaed026d 100644 --- a/gcc/ada/ali.ads +++ b/gcc/ada/ali.ads @@ -811,6 +811,11 @@ package ALI is Tref_Derived, -- Derived type typeref (points to parent type) 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 type Xref_Entity_Record is record @@ -824,8 +829,8 @@ package ALI is Col : Pos; -- Column number of definition - Lib : Boolean; - -- True if entity is library level entity + Visibility : Visibility_Kind; + -- Visiblity of entity Entity : Name_Id; -- Name of entity diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 096abbde9c9..c08022051d6 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -127,6 +127,9 @@ package body Exp_Ch4 is -- Common expansion processing for Boolean operators (And, Or, Xor) for the -- case of array type arguments. + procedure Expand_Short_Circuit_Operator (N : Node_Id); + -- Common expansion processing for short-circuit boolean operators + function Expand_Composite_Equality (Nod : Node_Id; Typ : Entity_Id; @@ -3900,113 +3903,8 @@ package body Exp_Ch4 is -- Expand_N_And_Then -- ----------------------- - -- Expand into conditional expression if Actions present, and also deal - -- with optimizing case of arguments being True or False. - - procedure Expand_N_And_Then (N : Node_Id) is - Loc : constant Source_Ptr := Sloc (N); - Typ : constant Entity_Id := Etype (N); - Left : constant Node_Id := Left_Opnd (N); - Right : constant Node_Id := Right_Opnd (N); - Actlist : List_Id; - - begin - -- Deal with non-standard booleans - - if Is_Boolean_Type (Typ) then - Adjust_Condition (Left); - Adjust_Condition (Right); - Set_Etype (N, Standard_Boolean); - end if; - - -- Check for cases where left argument is known to be True or False - - if Compile_Time_Known_Value (Left) then - - -- If left argument is True, change (True and then Right) to Right. - -- Any actions associated with Right will be executed unconditionally - -- and can thus be inserted into the tree unconditionally. - - if Expr_Value_E (Left) = Standard_True then - if Present (Actions (N)) then - Insert_Actions (N, Actions (N)); - end if; - - Rewrite (N, Right); - - -- If left argument is False, change (False and then Right) to False. - -- In this case we can forget the actions associated with Right, - -- since they will never be executed. - - else pragma Assert (Expr_Value_E (Left) = Standard_False); - Kill_Dead_Code (Right); - Kill_Dead_Code (Actions (N)); - Rewrite (N, New_Occurrence_Of (Standard_False, Loc)); - end if; - - Adjust_Result_Type (N, Typ); - return; - end if; - - -- If Actions are present, we expand - - -- left and then right - - -- into - - -- if left then right else false end - - -- with the actions becoming the Then_Actions of the conditional - -- expression. This conditional expression is then further expanded - -- (and will eventually disappear) - - if Present (Actions (N)) then - Actlist := Actions (N); - Rewrite (N, - Make_Conditional_Expression (Loc, - Expressions => New_List ( - Left, - Right, - New_Occurrence_Of (Standard_False, Loc)))); - - -- If the right part of the expression is a function call then it can - -- be part of the expansion of the predefined equality operator of a - -- tagged type and we may need to adjust its SCIL dispatching node. - - if Generate_SCIL - and then Nkind (Right) = N_Function_Call - then - Adjust_SCIL_Node (N, Right); - end if; - - Set_Then_Actions (N, Actlist); - Analyze_And_Resolve (N, Standard_Boolean); - Adjust_Result_Type (N, Typ); - return; - end if; - - -- No actions present, check for cases of right argument True/False - - if Compile_Time_Known_Value (Right) then - - -- Change (Left and then True) to Left. Note that we know there are - -- no actions associated with the True operand, since we just checked - -- for this case above. - - if Expr_Value_E (Right) = Standard_True then - Rewrite (N, Left); - - -- Change (Left and then False) to False, making sure to preserve any - -- side effects associated with the Left operand. - - else pragma Assert (Expr_Value_E (Right) = Standard_False); - Remove_Side_Effects (Left); - Rewrite (N, New_Occurrence_Of (Standard_False, Loc)); - end if; - end if; - - Adjust_Result_Type (N, Typ); - end Expand_N_And_Then; + procedure Expand_N_And_Then (N : Node_Id) + renames Expand_Short_Circuit_Operator; ------------------------------------- -- Expand_N_Conditional_Expression -- @@ -7168,104 +7066,8 @@ package body Exp_Ch4 is -- Expand_N_Or_Else -- ---------------------- - -- Expand into conditional expression if Actions present, and also - -- deal with optimizing case of arguments being True or False. - - procedure Expand_N_Or_Else (N : Node_Id) is - Loc : constant Source_Ptr := Sloc (N); - Typ : constant Entity_Id := Etype (N); - Left : constant Node_Id := Left_Opnd (N); - Right : constant Node_Id := Right_Opnd (N); - Actlist : List_Id; - - begin - -- Deal with non-standard booleans - - if Is_Boolean_Type (Typ) then - Adjust_Condition (Left); - Adjust_Condition (Right); - Set_Etype (N, Standard_Boolean); - end if; - - -- Check for cases where left argument is known to be True or False - - if Compile_Time_Known_Value (Left) then - - -- If left argument is False, change (False or else Right) to Right. - -- Any actions associated with Right will be executed unconditionally - -- and can thus be inserted into the tree unconditionally. - - if Expr_Value_E (Left) = Standard_False then - if Present (Actions (N)) then - Insert_Actions (N, Actions (N)); - end if; - - Rewrite (N, Right); - - -- If left argument is True, change (True and then Right) to True. In - -- this case we can forget the actions associated with Right, since - -- they will never be executed. - - else pragma Assert (Expr_Value_E (Left) = Standard_True); - Kill_Dead_Code (Right); - Kill_Dead_Code (Actions (N)); - Rewrite (N, New_Occurrence_Of (Standard_True, Loc)); - end if; - - Adjust_Result_Type (N, Typ); - return; - end if; - - -- If Actions are present, we expand - - -- left or else right - - -- into - - -- if left then True else right end - - -- with the actions becoming the Else_Actions of the conditional - -- expression. This conditional expression is then further expanded - -- (and will eventually disappear) - - if Present (Actions (N)) then - Actlist := Actions (N); - Rewrite (N, - Make_Conditional_Expression (Loc, - Expressions => New_List ( - Left, - New_Occurrence_Of (Standard_True, Loc), - Right))); - - Set_Else_Actions (N, Actlist); - Analyze_And_Resolve (N, Standard_Boolean); - Adjust_Result_Type (N, Typ); - return; - end if; - - -- No actions present, check for cases of right argument True/False - - if Compile_Time_Known_Value (Right) then - - -- Change (Left or else False) to Left. Note that we know there are - -- no actions associated with the True operand, since we just checked - -- for this case above. - - if Expr_Value_E (Right) = Standard_False then - Rewrite (N, Left); - - -- Change (Left or else True) to True, making sure to preserve any - -- side effects associated with the Left operand. - - else pragma Assert (Expr_Value_E (Right) = Standard_True); - Remove_Side_Effects (Left); - Rewrite - (N, New_Occurrence_Of (Standard_True, Loc)); - end if; - end if; - - Adjust_Result_Type (N, Typ); - end Expand_N_Or_Else; + procedure Expand_N_Or_Else (N : Node_Id) + renames Expand_Short_Circuit_Operator; ----------------------------------- -- Expand_N_Qualified_Expression -- @@ -8909,6 +8711,145 @@ package body Exp_Ch4 is return Result; end Expand_Record_Equality; + ----------------------------------- + -- Expand_Short_Circuit_Operator -- + ----------------------------------- + + -- Expand into conditional expression if Actions present, and also deal + -- with optimizing case of arguments being True or False. + + procedure Expand_Short_Circuit_Operator (N : Node_Id) is + Loc : constant Source_Ptr := Sloc (N); + Typ : constant Entity_Id := Etype (N); + Kind : constant Node_Kind := Nkind (N); + Left : constant Node_Id := Left_Opnd (N); + Right : constant Node_Id := Right_Opnd (N); + Actlist : List_Id; + + Shortcut_Value : constant Boolean := Nkind (N) = N_Or_Else; + Shortcut_Ent : constant Entity_Id := Boolean_Literals (Shortcut_Value); + -- If Left = Shortcut_Value then Right need not be evaluated + + Expr_If_Left_True, Expr_If_Left_False : Node_Id; + + begin + -- Deal with non-standard booleans + + if Is_Boolean_Type (Typ) then + Adjust_Condition (Left); + Adjust_Condition (Right); + Set_Etype (N, Standard_Boolean); + end if; + + -- Check for cases where left argument is known to be True or False + + if Compile_Time_Known_Value (Left) then + + -- Rewrite True AND THEN Right / False OR ELSE Right to Right. + -- Any actions associated with Right will be executed unconditionally + -- and can thus be inserted into the tree unconditionally. + + if Expr_Value_E (Left) /= Shortcut_Ent then + if Present (Actions (N)) then + Insert_Actions (N, Actions (N)); + end if; + + Rewrite (N, Right); + + -- Rewrite False AND THEN Right / True OR ELSE Right to Left. + -- In this case we can forget the actions associated with Right, + -- since they will never be executed. + + else + Kill_Dead_Code (Right); + Kill_Dead_Code (Actions (N)); + Rewrite (N, New_Occurrence_Of (Shortcut_Ent, Loc)); + end if; + + Adjust_Result_Type (N, Typ); + return; + end if; + + -- If Actions are present, we expand + + -- left AND THEN right + -- left OR ELSE right + + -- into + + -- if left then right else false end + -- if left then true else right end + + -- with the actions for the right operand being transferred to the + -- approriate actions list of the conditional expression. This + -- conditional expression is then further expanded (and will eventually + -- disappear). + + if Present (Actions (N)) then + Actlist := Actions (N); + + if Kind = N_And_Then then + Expr_If_Left_True := Right; + Expr_If_Left_False := New_Occurrence_Of (Standard_False, Loc); + + else + Expr_If_Left_True := New_Occurrence_Of (Standard_True, Loc); + Expr_If_Left_False := Right; + end if; + + Rewrite (N, + Make_Conditional_Expression (Loc, + Expressions => New_List ( + Left, + Expr_If_Left_True, + Expr_If_Left_False))); + + -- If the right part of an AND THEN is a function call then it can + -- be part of the expansion of the predefined equality operator of a + -- tagged type and we may need to adjust its SCIL dispatching node. + + if Generate_SCIL + and then Kind = N_And_Then + and then Nkind (Right) = N_Function_Call + then + Adjust_SCIL_Node (N, Right); + end if; + + if Kind = N_And_Then then + Set_Then_Actions (N, Actlist); + else + Set_Else_Actions (N, Actlist); + end if; + + Analyze_And_Resolve (N, Standard_Boolean); + Adjust_Result_Type (N, Typ); + return; + end if; + + -- No actions present, check for cases of right argument True/False + + if Compile_Time_Known_Value (Right) then + + -- Change (Left and then True), (Left or else False) to Left. + -- Note that we know there are no actions associated with the right + -- operand, since we just checked for this case above. + + if Expr_Value_E (Right) /= Shortcut_Ent then + Rewrite (N, Left); + + -- Change (Left and then False), (Left or else True) to Right, + -- making sure to preserve any side effects associated with the Left + -- operand. + + else + Remove_Side_Effects (Left); + Rewrite (N, New_Occurrence_Of (Shortcut_Ent, Loc)); + end if; + end if; + + Adjust_Result_Type (N, Typ); + end Expand_Short_Circuit_Operator; + ------------------------------------- -- Fixup_Universal_Fixed_Operation -- ------------------------------------- diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index fcdb83fc816..9b6a308ae43 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -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/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/osint.ads ada/osint-c.ads ada/output.ads ada/system.ads \ - ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \ - ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ - ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \ - ada/unchdeal.ads + ada/osint.ads ada/osint-c.ads ada/output.ads ada/stringt.ads \ + ada/stringt.adb ada/system.ads ada/s-carun8.ads ada/s-exctab.ads \ + ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \ + ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ + 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/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 \ 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/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/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads \ - ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads \ - ada/table.adb ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ - ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb ada/uname.ads \ - ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads + ada/stylesw.ads ada/system.ads ada/s-casuti.ads ada/s-crc32.ads \ + ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \ + ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \ + ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ + ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \ + ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ + ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/types.ads \ + ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.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/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \ diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 1580d66b300..7ea24549e46 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -10756,7 +10756,7 @@ Each @var{filename} is the name (including the extension) of a source file to process. ``Wildcards'' are allowed, and 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{gnatelim} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, @@ -16164,7 +16164,7 @@ The @command{gnatpp} command has the form @smallexample @c $ gnatpp @ovar{switches} @var{filename} @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 @noindent @@ -16180,6 +16180,13 @@ output source file 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 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 @menu @@ -17289,7 +17296,7 @@ Including both a @option{-files} switch and one or more @var{filename} arguments is permitted. @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{gnatmetric} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, @@ -23206,7 +23213,7 @@ option @option{^--no-exception^/NO_EXCEPTION^} (see below). @smallexample @c $ gnatstub @ovar{switches} @var{filename} @ovar{directory} @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 @noindent @@ -23234,6 +23241,12 @@ indicates the directory in which the body stub is to be placed (the default is the 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 is an optional sequence of switches as described in the next section @end table diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads index 8e2dc450fab..86303d1627d 100644 --- a/gcc/ada/lib-xref.ads +++ b/gcc/ada/lib-xref.ads @@ -68,9 +68,10 @@ package Lib.Xref is -- col is the column number of the referenced entity -- 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 - -- 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 -- the canonical casing for the source file where it is defined. diff --git a/gcc/ada/par-ch10.adb b/gcc/ada/par-ch10.adb index 23cb1cd444c..c97710e8ca4 100644 --- a/gcc/ada/par-ch10.adb +++ b/gcc/ada/par-ch10.adb @@ -1028,7 +1028,11 @@ package body Ch10 is 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); elsif Token = Tok_Package then diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb index ea5df6dfb3b..2916f53d162 100644 --- a/gcc/ada/par-ch6.adb +++ b/gcc/ada/par-ch6.adb @@ -215,14 +215,17 @@ package body Ch6 is -- already been given, so no need to give another message here. -- An overriding indicator is allowed for subprogram declarations, - -- bodies, renamings, stubs, and instantiations. The test against - -- Pf_Decl_Pbod is added to account for the case of subprograms - -- declared in a protected type, where only subprogram declarations - -- and bodies can occur. + -- bodies (including subunits), renamings, stubs, and + -- instantiations. The test against Pf_Decl_Pbod is added to account + -- for the case of subprograms declared in a protected type, where + -- only subprogram declarations and bodies can occur. The Pf_Pbod + -- case is for subunits. if Pf_Flags /= Pf_Decl_Gins_Pbod_Rnam_Stub and then Pf_Flags /= Pf_Decl_Pbod + and then + Pf_Flags /= Pf_Pbod then Error_Msg_SC ("overriding indicator not allowed here!"); diff --git a/gcc/ada/raise.h b/gcc/ada/raise.h index 1321518ee7b..1ccc37bca01 100644 --- a/gcc/ada/raise.h +++ b/gcc/ada/raise.h @@ -45,16 +45,6 @@ struct Exception_Data 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_unhandled_terminate (void); extern void *__gnat_malloc (__SIZE_TYPE__); |