This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

committed: Ada updates


Tested on x86-linux
--
2004-04-06  Pascal Obry  <obry@gnat.com>

	* adaint.c (DIR_SEPARATOR): Properly set DIR_SEPARATOR on Win32.

	* osint.adb (Program_Name): Do not look past a directory separator.

2004-04-06  Thomas Quinot  <quinot@act-europe.fr>

	* atree.adb: Update comment (Rewrite_Substitute_Node no longer exists).

	* exp_ch6.adb (Rewrite_Function_Call): Clarify documentation of
	requirement for preserving a copy of the original assignment node.

	* sinfo.ads: Update comment (Original_Tree -> Original_Node).

2004-04-06  Olivier Hainque  <hainque@act-europe.fr>

	(__gnat_initialize [Vxworks]): Enable references to the crtstuff bits
	when supported.

2004-04-06  Ed Schonberg  <schonberg@gnat.com>

	* sem_ch4.adb (Remove_Abstract_Operations): Extend previous changes to
	operator calls in functional notation, and apply
	Universal_Interpretation to operands, not to their type.

2004-04-06  Robert Dewar  <dewar@gnat.com>

	* 5wdirval.adb: Minor reformatting

2004-04-06  Ed Falis  <falis@gnat.com>

	* gnat_rm.texi: Improve a reference to the GCC manual
--
Index: adaint.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/adaint.c,v
retrieving revision 1.29
diff -u -p -r1.29 adaint.c
--- adaint.c	5 Apr 2004 14:57:32 -0000	1.29
+++ adaint.c	6 Apr 2004 13:36:09 -0000
@@ -147,6 +147,8 @@ struct vstring
 #if defined (_WIN32)
 #include <dir.h>
 #include <windows.h>
+#undef DIR_SEPARATOR
+#define DIR_SEPARATOR '\\'
 #endif
 
 #include "adaint.h"
@@ -2525,4 +2527,3 @@ get_gcc_version (void)
 {
   return 3;
 }
-
Index: atree.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/atree.adb,v
retrieving revision 1.12
diff -u -p -r1.12 atree.adb
--- atree.adb	12 Feb 2004 13:28:09 -0000	1.12
+++ atree.adb	6 Apr 2004 13:36:10 -0000
@@ -2114,8 +2114,7 @@ package body Atree is
 
       --  Since we are doing a replace, we assume that the original node
       --  is intended to become the new replaced node. The call would be
-      --  to Rewrite_Substitute_Node if there were an intention to save
-      --  the original node.
+      --  to Rewrite if there were an intention to save the original node.
 
       Orig_Nodes.Table (Old_Node) := Old_Node;
 
Index: exp_ch6.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/exp_ch6.adb,v
retrieving revision 1.24
diff -u -p -r1.24 exp_ch6.adb
--- exp_ch6.adb	5 Apr 2004 14:57:34 -0000	1.24
+++ exp_ch6.adb	6 Apr 2004 13:36:10 -0000
@@ -2466,6 +2466,9 @@ package body Exp_Ch6 is
                --  complete assignment subtree consistent enough for
                --  Analyze_Assignment to proceed. We do not use the
                --  saved value, the point was just to do the relocation.
+               --  We cannot rely on Original_Node to go back from the
+               --  block node to the assignment node, because the
+               --  assignment might already be a rewrite substitution.
 
             begin
                Rewrite (Original_Assignment, Blk);
Index: init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/init.c,v
retrieving revision 1.29
diff -u -p -r1.29 init.c
--- init.c	5 Apr 2004 14:57:35 -0000	1.29
+++ init.c	6 Apr 2004 13:36:11 -0000
@@ -1797,13 +1797,16 @@ __gnat_initialize (void)
      call the appropriate function here. We'll never unload that, so there is
      no de-registration to worry about.
 
-     We can differentiate between the two cases by looking at the
-     __module_has_ctors value provided by each class of crt objects. As of
-     today, selecting the crt set intended for applications to be statically
-     linked with the kernel is triggered by adding "-static" to the gcc *link*
-     command line options.  */
+     We can differentiate by looking at the __module_has_ctors value provided
+     by each class of crt objects. As of today, selecting the crt set intended
+     for applications to be statically linked with the kernel is triggered by
+     adding "-static" to the gcc *link* command line options.
 
-#if 0
+     This is a first approach, tightly synchronized with a number of GCC
+     configuration and crtstuff changes. We need to ensure that those changes
+     are there to activate this circuitry.  */
+
+#if DWARF2_UNWIND_INFO && defined (_ARCH_PPC)
  {
    extern const int __module_has_ctors;
    extern void __do_global_ctors ();
Index: osint.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/osint.adb,v
retrieving revision 1.19
diff -u -p -r1.19 osint.adb
--- osint.adb	1 Apr 2004 10:04:38 -0000	1.19
+++ osint.adb	6 Apr 2004 13:36:11 -0000
@@ -1794,7 +1794,17 @@ package body Osint is
       --  "alpha-dec-vxworks-"
 
       while Name_Len > 0  loop
+
+         --  All done if we find the last hyphen
+
          if Name_Buffer (Name_Len) = '-' then
+            exit;
+
+         --  If directory separator found, we don't want to look further
+         --  since in this case, no prefix has been found.
+
+         elsif Is_Directory_Separator (Name_Buffer (Name_Len)) then
+            Name_Len := 0;
             exit;
          end if;
 
Index: sem_ch4.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/sem_ch4.adb,v
retrieving revision 1.16
diff -u -p -r1.16 sem_ch4.adb
--- sem_ch4.adb	5 Apr 2004 14:57:40 -0000	1.16
+++ sem_ch4.adb	6 Apr 2004 13:36:11 -0000
@@ -4359,20 +4359,18 @@ package body Sem_Ch4 is
          --  always added to the overload set, unless it is a universal
          --  operation.
 
-         if Nkind (N) in N_Op
-           and then Has_Abstract_Op
-         then
+         if not Has_Abstract_Op then
+            return;
+
+         elsif Nkind (N) in N_Op then
             if Nkind (N) in N_Unary_Op
-              and then
-                Present (Universal_Interpretation (Etype (Right_Opnd (N))))
+              and then Present (Universal_Interpretation (Right_Opnd (N)))
             then
                return;
 
             elsif Nkind (N) in N_Binary_Op
-              and then
-                Present (Universal_Interpretation (Etype (Right_Opnd (N))))
-              and then
-                Present (Universal_Interpretation (Etype (Left_Opnd (N))))
+              and then Present (Universal_Interpretation (Right_Opnd (N)))
+              and then Present (Universal_Interpretation (Left_Opnd  (N)))
             then
                return;
 
@@ -4386,6 +4384,38 @@ package body Sem_Ch4 is
                   Get_Next_Interp (I, It);
                end loop;
             end if;
+
+         elsif Nkind (N) = N_Function_Call
+           and then
+             (Nkind (Name (N)) = N_Operator_Symbol
+                or else
+                  (Nkind (Name (N)) = N_Expanded_Name
+                     and then
+                       Nkind (Selector_Name (Name (N))) = N_Operator_Symbol))
+         then
+            declare
+               Arg1 : constant Node_Id := First (Parameter_Associations (N));
+
+            begin
+               if Present (Universal_Interpretation (Arg1))
+                 or else
+                   (Present (Next (Arg1))
+                     and then
+                       Present (Universal_Interpretation (Next (Arg1))))
+               then
+                  return;
+
+               else
+                  Get_First_Interp (N, I, It);
+                  while Present (It.Nam) loop
+                     if Scope (It.Nam) = Standard_Standard then
+                        Remove_Interp (I);
+                     end if;
+
+                     Get_Next_Interp (I, It);
+                  end loop;
+               end if;
+            end;
          end if;
       end if;
    end Remove_Abstract_Operations;
Index: sinfo.ads
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/sinfo.ads,v
retrieving revision 1.25
diff -u -p -r1.25 sinfo.ads
--- sinfo.ads	5 Apr 2004 14:57:41 -0000	1.25
+++ sinfo.ads	6 Apr 2004 13:36:11 -0000
@@ -1519,7 +1519,7 @@ package Sinfo is
    --    stub. During the analysis procedure, stubs in some situations
    --    get rewritten by the corresponding bodies, and we set this flag
    --    to remember that this happened. Note that it is not good enough
-   --    to rely on the use of Original_Tree here because of the case of
+   --    to rely on the use of Original_Node here because of the case of
    --    nested instantiations where the substituted node can be copied.
 
    --  Zero_Cost_Handling (Flag5-Sem)
Index: 5wdirval.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/5wdirval.adb,v
retrieving revision 1.1
diff -u -p -r1.1 5wdirval.adb
--- 5wdirval.adb	5 Apr 2004 14:57:42 -0000	1.1
+++ 5wdirval.adb	6 Apr 2004 13:36:12 -0000
@@ -52,6 +52,7 @@ package body Ada.Directories.Validity is
    function Is_Valid_Path_Name (Name : String) return Boolean is
       Start : Positive := Name'First;
       Last  : Natural;
+
    begin
       --  A path name cannot be empty, cannot contain more than 256 characters,
       --  cannot contain invalid characters and each directory/file name need
@@ -114,7 +115,8 @@ package body Ada.Directories.Validity is
    --------------------------
 
    function Is_Valid_Simple_Name (Name : String) return Boolean is
-      Only_Spaces : Boolean := True;
+      Only_Spaces : Boolean;
+
    begin
       --  A file name cannot be empty, cannot contain more than 256 characters,
       --  and cannot contain invalid characters, including '\'
@@ -122,20 +124,22 @@ package body Ada.Directories.Validity is
       if Name'Length = 0 or else Name'Length > 256 then
          return False;
 
+      --  Name length is OK
+
       else
+         Only_Spaces := True;
          for J in Name'Range loop
             if Invalid_Character (Name (J)) or else Name (J) = '\' then
                return False;
-
             elsif Name (J) /= ' ' then
                Only_Spaces := False;
             end if;
          end loop;
-      end if;
 
-      --  If Name follows the rules, it is valid
+         --  If no invalid chars, and not all spaces, file name is valid.
 
-      return not Only_Spaces;
+         return not Only_Spaces;
+      end if;
    end Is_Valid_Simple_Name;
 
 end Ada.Directories.Validity;
Index: gnat_rm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/gnat_rm.texi,v
retrieving revision 1.15
diff -u -p -r1.15 gnat_rm.texi
--- gnat_rm.texi	2 Apr 2004 08:52:48 -0000	1.15
+++ gnat_rm.texi	6 Apr 2004 13:36:23 -0000
@@ -62,7 +62,7 @@ GNAT Reference Manual
 
 @noindent
 GNAT, The GNU Ada 95 Compiler@*
-Version for GCC @value{version-GCC}@*
+GCC version @value{version-GCC}@*
 
 @noindent
 Ada Core Technologies, Inc.
@@ -12688,15 +12688,17 @@ including machine instructions in a subp
 @end itemize
 
 @noindent
-The two features are similar, and both closely related to the mechanism
+The two features are similar, and both are closely related to the mechanism
 provided by the asm instruction in the GNU C compiler.  Full understanding
 and use of the facilities in this package requires understanding the asm
-instruction as described in
-@cite{Using and Porting the GNU Compiler Collection (GCC)} by Richard
-Stallman.  Calls to the function @code{Asm} and the procedure @code{Asm}
-have identical semantic restrictions and effects as described below.
-Both are provided so that the procedure call can be used as a statement,
-and the function call can be used to form a code_statement.
+instruction as described in @cite{Using the GNU Compiler Collection (GCC)} 
+by Richard Stallman. The relevant section is titled ``Extensions to the C
+Language Family'' -> ``Assembler Instructions with C Expression Operands''.
+
+Calls to the function @code{Asm} and the procedure @code{Asm} have identical
+semantic restrictions and effects as described below.  Both are provided so
+that the procedure call can be used as a statement, and the function call
+can be used to form a code_statement.
 
 The first example given in the GCC documentation is the C @code{asm}
 instruction:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]