[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 1 Aug 2014 10:04:35 +0000 (12:04 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 1 Aug 2014 10:04:35 +0000 (12:04 +0200)
2014-08-01  Robert Dewar  <dewar@adacore.com>

* sem_res.adb: Minor comment addition.

2014-08-01  Arnaud Charlet  <charlet@adacore.com>

* s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
no longer used.
* s-os_lib.ads: Minor reformatting.

From-SVN: r213441

gcc/ada/ChangeLog
gcc/ada/adaint.c
gcc/ada/adaint.h
gcc/ada/i-cstrea.ads
gcc/ada/osint.adb
gcc/ada/s-crtl.ads
gcc/ada/s-fileio.adb
gcc/ada/s-os_lib.ads
gcc/ada/sem_res.adb

index 520f3c8ac76a9864b75b491fbef287d4e0aa4b66..f174a297681548db422d2d6966ca20d5cfa841b7 100644 (file)
@@ -1,3 +1,14 @@
+2014-08-01  Robert Dewar  <dewar@adacore.com>
+
+       * sem_res.adb: Minor comment addition.
+
+2014-08-01  Arnaud Charlet  <charlet@adacore.com>
+
+       * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
+       s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
+       no longer used.
+       * s-os_lib.ads: Minor reformatting.
+
 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
 
        * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
index 44839eab5a967e8274209bdeb656575a18278907..2fbecb4246393555ac444ec67f0619b342606375 100644 (file)
@@ -744,8 +744,7 @@ __gnat_fputwc(int c, FILE *stream)
 }
 
 FILE *
-__gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED,
-              char *vms_form ATTRIBUTE_UNUSED)
+__gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED)
 {
 #if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS)
   TCHAR wpath[GNAT_MAX_PATH_LEN];
@@ -771,8 +770,7 @@ FILE *
 __gnat_freopen (char *path,
                char *mode,
                FILE *stream,
-               int encoding ATTRIBUTE_UNUSED,
-                char *vms_form ATTRIBUTE_UNUSED)
+               int encoding ATTRIBUTE_UNUSED)
 {
 #if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS)
   TCHAR wpath[GNAT_MAX_PATH_LEN];
index 532241269c14138c87dda3589beb0451b39d6e6a..d2a838e53f5476d1ddaa26d5f155fd186ddc002a 100644 (file)
@@ -148,10 +148,9 @@ extern int    __gnat_rename                        (char *, char *);
 extern int    __gnat_chdir                         (char *);
 extern int    __gnat_rmdir                         (char *);
 
-extern FILE  *__gnat_fopen                        (char *, char *, int,
-                                                   char *);
+extern FILE  *__gnat_fopen                        (char *, char *, int);
 extern FILE  *__gnat_freopen                      (char *, char *, FILE *,
-                                                   int, char *);
+                                                   int);
 extern int    __gnat_open                          (char *, int);
 extern int    __gnat_open_read                     (char *, int);
 extern int    __gnat_open_rw                       (char *, int);
index 9a00b4961d8231c0ddb291abbbb5839c08a5c34a..5927e5f95c20edcf20796f34111063e71f77b808 100644 (file)
@@ -108,9 +108,8 @@ package Interfaces.C_Streams is
    function fopen
      (filename : chars;
       mode     : chars;
-      encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8;
-      vms_form : chars := System.Null_Address) return FILEs
-     renames System.CRTL.fopen;
+      encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8)
+     return FILEs renames System.CRTL.fopen;
    --  Note: to maintain target independence, use text_translation_required,
    --  a boolean variable defined in sysdep.c to deal with the target
    --  dependent text translation requirement. If this variable is set,
@@ -148,9 +147,8 @@ package Interfaces.C_Streams is
      (filename : chars;
       mode     : chars;
       stream   : FILEs;
-      encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8;
-      vms_form : chars := System.Null_Address) return FILEs
-     renames System.CRTL.freopen;
+      encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8)
+     return FILEs renames System.CRTL.freopen;
 
    function fseek
      (stream : FILEs;
index 5f0842c346ad943ab245296114b77c5ec3ae680d..2fb1618e6e105ef1a2f598379be61f62ca67b809 100644 (file)
@@ -1276,21 +1276,6 @@ package body Osint is
       --  Command_Name(Cindex1 .. Cindex2) is now the equivalent of the
       --  POSIX command "basename argv[0]"
 
-      --  Strip off any versioning information found on some systems. This
-      --  would take the form of TOOL.exe followed by a ";" or "." and a
-      --  sequence of one or more numbers.
-
-      if Command_Name (Cindex2) in '0' .. '9' then
-         for J in reverse Cindex1 .. Cindex2 loop
-            if Command_Name (J) = '.' or else Command_Name (J) = ';' then
-               Cindex2 := J - 1;
-               exit;
-            end if;
-
-            exit when Command_Name (J) not in '0' .. '9';
-         end loop;
-      end if;
-
       --  Strip off any executable extension (usually nothing or .exe)
       --  but formally reported by autoconf in the variable EXEEXT
 
index 15c7c92fb79f408451ba3b023423014ad1a18ac1..835bbd9e3ae4f4b13a4b307903d290cec5aadefe 100644 (file)
@@ -117,8 +117,7 @@ package System.CRTL is
    function fopen
      (filename : chars;
       mode     : chars;
-      encoding : Filename_Encoding := Unspecified;
-      vms_form : chars := System.Null_Address) return FILEs;
+      encoding : Filename_Encoding := Unspecified) return FILEs;
    pragma Import (C, fopen, "__gnat_fopen");
 
    function fputc (C : int; stream : FILEs) return int;
@@ -137,8 +136,7 @@ package System.CRTL is
      (filename : chars;
       mode     : chars;
       stream   : FILEs;
-      encoding : Filename_Encoding := Unspecified;
-      vms_form : chars := System.Null_Address) return FILEs;
+      encoding : Filename_Encoding := Unspecified) return FILEs;
    pragma Import (C, freopen, "__gnat_freopen");
 
    function fseek
index 56594689883726f0b268f9a4eefc754ec0d82c10..73838bf8e54b94113f911ffd05a6d61a2d0ae0af 100644 (file)
@@ -1068,7 +1068,7 @@ package body System.File_IO is
             --  may have changed and we do not want to delete a different file.
 
             Stream :=
-              fopen (Namestr'Address, Fopstr'Address, Encoding, Null_Address);
+              fopen (Namestr'Address, Fopstr'Address, Encoding);
 
             if Stream = NULL_Stream then
 
@@ -1222,7 +1222,7 @@ package body System.File_IO is
 
          File.Stream := freopen
            (File.Name.all'Address, Fopstr'Address, File.Stream,
-            File.Encoding, Null_Address);
+            File.Encoding);
 
          if File.Stream = NULL_Stream then
             Close (File_Ptr);
index 92314037411bfa6d479035bc71aefbf6841c0b83..77052cdb9b656c637f9b15e589344ff4cde20ccd 100644 (file)
@@ -426,7 +426,7 @@ package System.OS_Lib is
    --  to the current position (origin = SEEK_CUR), end of file (origin =
    --  SEEK_END), or start of file (origin = SEEK_SET).
 
-   type Large_File_Size is range -(2 ** 63) .. (2 ** 63) - 1;
+   type Large_File_Size is range -2 ** 63 .. 2 ** 63 - 1;
 
    function File_Length (FD : File_Descriptor) return Long_Integer;
    pragma Import (C, File_Length, "__gnat_file_length_long");
index 4d0cfe3b0c09a6e03f174fbaded3c9c87af6be4d..dd7aedd1e8f70d0967e4430f6245efc8fa3c5eee 100644 (file)
@@ -11512,7 +11512,15 @@ package body Sem_Res is
                      Remove_Interp (I);
                   end if;
 
-                  if Present (System_Aux_Id)
+                  --  When compiling for a system where Address is of a visible
+                  --  integer type, spurious ambiguities can be produced when
+                  --  arithmetic operations have a literal operand and return
+                  --  System.Address or a descendant of it. These ambiguities
+                  --  are usually resolved by the context, but for conversions
+                  --  there is no context type and the removal of the spurious
+                  --  operations must be done explicitly here.
+
+                  if not Address_Is_Private
                     and then Is_Descendent_Of_Address (It.Typ)
                   then
                      Remove_Interp (I);