]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Sep 2010 14:34:26 +0000 (16:34 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Sep 2010 14:34:26 +0000 (16:34 +0200)
2010-09-10  Robert Dewar  <dewar@adacore.com>

* frontend.adb: Minor reformatting.

2010-09-10  Robert Dewar  <dewar@adacore.com>

* par-ch4.adb (P_Conditional_Expression): Use P_Condition for condition
* par-ch5.adb (P_Condition): Move from body to spec
* par.adb (Ch5.P_Condition): Move from body to spec

2010-09-10  Ed Schonberg  <schonberg@adacore.com>

* exp_cg.adb (Write_Call_Info): If a type that has been registered in
the call table is private, use its full view to generate information
on its operations.

From-SVN: r164181

gcc/ada/ChangeLog
gcc/ada/exp_cg.adb
gcc/ada/frontend.adb
gcc/ada/par-ch4.adb
gcc/ada/par-ch5.adb
gcc/ada/par.adb

index 04c73a9fda2fec7a639080ec86613645b4716ab6..11ff5dcffa9c5d3d24a36c6f003fd4303e831d07 100644 (file)
@@ -1,3 +1,19 @@
+2010-09-10  Robert Dewar  <dewar@adacore.com>
+
+       * frontend.adb: Minor reformatting.
+
+2010-09-10  Robert Dewar  <dewar@adacore.com>
+
+       * par-ch4.adb (P_Conditional_Expression): Use P_Condition for condition
+       * par-ch5.adb (P_Condition): Move from body to spec
+       * par.adb (Ch5.P_Condition): Move from body to spec
+
+2010-09-10  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_cg.adb (Write_Call_Info): If a type that has been registered in
+       the call table is private, use its full view to generate information
+       on its operations.
+
 2010-09-10  Jose Ruiz  <ruiz@adacore.com>
 
        * exp_cg.adb (Is_Predefined_Dispatching_Operation): When trying the
index 376f9cadf609477404571bd337363033a0fbb1bd..425ae540526d25a9f568316f83452ba65f3a5249 100644 (file)
@@ -129,6 +129,14 @@ package body Exp_CG is
             Write_Call_Info (N);
 
          else pragma Assert (Nkind (N) = N_Defining_Identifier);
+
+            --  The type may be a private untagged type whose completion is
+            --  tagged, in which case we must use the full tagged view.
+
+            if not Is_Tagged_Type (N) and then Is_Private_Type (N) then
+               N := Full_View (N);
+            end if;
+
             pragma Assert (Is_Tagged_Type (N));
 
             Write_Type_Info (N);
index bea0bdc396ef6f48740b2ab1d48cda9a6c44e140..54616feae744891ecdac31b9195545ebf88f925b 100644 (file)
@@ -161,7 +161,6 @@ begin
          if Source_gnat_adc /= No_Source_File then
             Initialize_Scanner (No_Unit, Source_gnat_adc);
             Config_Pragmas := Par (Configuration_Pragmas => True);
-
          else
             Config_Pragmas := Empty_List;
          end if;
index 6de5e84aed93f6ba6c429bc8648d118c9ca8d808..2d388f67b5a03626bdfa03065e6745bfd18ad5d9 100644 (file)
@@ -2788,7 +2788,7 @@ package body Ch4 is
       end if;
 
       Scan; -- past IF or ELSIF
-      Append_To (Exprs, P_Expression_No_Right_Paren);
+      Append_To (Exprs, P_Condition);
       TF_Then;
       Append_To (Exprs, P_Expression);
 
index bbac0327ebcd5db4cd539a8a06ec97b95e99d78a..30433ef208ef6bbe6c79f483ec09a15960345b43 100644 (file)
@@ -34,7 +34,6 @@ package body Ch5 is
 
    function P_Case_Statement                     return Node_Id;
    function P_Case_Statement_Alternative         return Node_Id;
-   function P_Condition                          return Node_Id;
    function P_Exit_Statement                     return Node_Id;
    function P_Goto_Statement                     return Node_Id;
    function P_If_Statement                       return Node_Id;
index bf3dc1e6b51819845b44f747b0e89ee5f9c58894..28c2ca789eee9d4f87cb7bdca56e4fee197b803e 100644 (file)
@@ -709,6 +709,9 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is
    -------------
 
    package Ch5 is
+      function P_Condition return Node_Id;
+      --  Scan out and return a condition
+
       function P_Statement_Name (Name_Node : Node_Id) return Node_Id;
       --  Given a node representing a name (which is a call), converts it
       --  to the syntactically corresponding procedure call statement.
@@ -1255,6 +1258,7 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is
 --  Start of processing for Par
 
 begin
+   Compiler_State := Parsing;
 
    --  Deal with configuration pragmas case first
 
@@ -1266,10 +1270,12 @@ begin
       begin
          loop
             if Token = Tok_EOF then
+               Compiler_State := Analyzing;
                return Pragmas;
 
             elsif Token /= Tok_Pragma then
                Error_Msg_SC ("only pragmas allowed in configuration file");
+               Compiler_State := Analyzing;
                return Error_List;
 
             else
@@ -1479,6 +1485,7 @@ begin
 
       Restore_Opt_Config_Switches (Save_Config_Switches);
       Set_Comes_From_Source_Default (False);
+      Compiler_State := Analyzing;
       return Empty_List;
    end if;
 end Par;