The macro was only defined for VMS and VMS is no longer supported in Ada.
gcc/
* config/vms/vms.h (ADA_LONG_TYPE_SIZE): Delete.
* doc/tm.texi.in (ADA_LONG_TYPE_SIZE): Likewise.
* doc/tm.texi: Regenerate.
* system.h (ADA_LONG_TYPE_SIZE): Poison.
gcc/ada/
* gnatlink.adb: Remove clause for System.CRTL.
(Store_File_Context): Remove clause for System.CRTL.long.
* gcc-interface/targtyps.cc (ADA_LONG_TYPE_SIZE): Delete.
(get_target_long_size): Use LONG_TYPE_SIZE.
* libgnat/i-c.ads: Remove clause for System.Parameters.
(long): Declare as derived from Long_Integer.
* libgnat/i-cstrin.ads: Add clause for System.Parameters.
* libgnat/s-crtl.ads: Remove clause for System.Parameters.
(long): Declare as subtype of Long_Integer.
* libgnat/s-parame.ads (long_bits): Delete.
* libgnat/s-parame__hpux.ads (long_bits): Likewise.
* libgnat/s-parame__vxworks.ads (long_bits): Likewise.
#include "ada-tree.h"
#include "gigi.h"
-/* If we don't have a specific size for Ada's equivalent of `long', use that
- of C. */
-#ifndef ADA_LONG_TYPE_SIZE
-#define ADA_LONG_TYPE_SIZE LONG_TYPE_SIZE
-#endif
-
/* The following provide a functional interface for the front end Ada code
to determine the sizes that are used for various C types. */
Pos
get_target_long_size (void)
{
- return ADA_LONG_TYPE_SIZE;
+ return LONG_TYPE_SIZE;
}
Pos
with Ada.Strings.Fixed;
with System.OS_Lib; use System.OS_Lib;
-with System.CRTL;
with Interfaces.C_Streams; use Interfaces.C_Streams;
with Interfaces.C.Strings; use Interfaces.C.Strings;
------------------------
procedure Store_File_Context is
- use type System.CRTL.long;
-
begin
RB_Next_Line := Next_Line;
RB_Nfirst := Nfirst;
-- in order to work around an internal limitation of the compiler.
with System;
-with System.Parameters;
package Interfaces.C with
SPARK_Mode,
-- avoid ambiguities when compiling in the presence of s-auxdec.ads and
-- a non-private system.address type.
- type int is new Integer;
- type short is new Short_Integer;
- type long is range -(2 ** (System.Parameters.long_bits - Integer'(1)))
- .. +(2 ** (System.Parameters.long_bits - Integer'(1))) - 1;
+ type int is new Integer;
+ type short is new Short_Integer;
+ type long is new Long_Integer;
type long_long is new Long_Long_Integer;
type signed_char is range SCHAR_MIN .. SCHAR_MAX;
pragma Assertion_Policy (Pre => Ignore);
+with System.Parameters;
+
package Interfaces.C.Strings with
SPARK_Mode => On,
Abstract_State => (C_Memory, (C_Addresses with Synchronous)),
-- This package provides the low level interface to the C runtime library
-with System.Parameters;
-
package System.CRTL is
pragma Preelaborate;
type unsigned is mod 2 ** 32;
for unsigned'Size use 32;
- type long is range -(2 ** (System.Parameters.long_bits - 1))
- .. +(2 ** (System.Parameters.long_bits - 1)) - 1;
+ subtype long is Long_Integer;
subtype off_t is Long_Integer;
-- Characteristics of types in Interfaces.C --
----------------------------------------------
- long_bits : constant := Long_Integer'Size;
- -- Number of bits in type long and unsigned_long. The normal convention
- -- is that this is the same as type Long_Integer, but this may not be true
- -- of all targets.
-
ptr_bits : constant := Standard'Address_Size;
subtype C_Address is System.Address;
-- Number of bits in Interfaces.C pointers, normally a standard address
-- Characteristics of Types in Interfaces.C --
----------------------------------------------
- long_bits : constant := Long_Integer'Size;
- -- Number of bits in type long and unsigned_long. The normal convention
- -- is that this is the same as type Long_Integer, but this may not be true
- -- of all targets.
-
ptr_bits : constant := Standard'Address_Size;
subtype C_Address is System.Address;
-- Number of bits in Interfaces.C pointers, normally a standard address
-- Characteristics of types in Interfaces.C --
----------------------------------------------
- long_bits : constant := Long_Integer'Size;
- -- Number of bits in type long and unsigned_long. The normal convention
- -- is that this is the same as type Long_Integer, but this may not be true
- -- of all targets.
-
ptr_bits : constant := Standard'Address_Size;
subtype C_Address is System.Address;
-- Number of bits in Interfaces.C pointers, normally a standard address
#undef TARGET_ABI_OPEN_VMS
#define TARGET_ABI_OPEN_VMS 1
-/* "long" is 32 bits, but 64 bits for Ada. */
+/* "long" is 32 bits. */
#undef LONG_TYPE_SIZE
#define LONG_TYPE_SIZE 32
-#define ADA_LONG_TYPE_SIZE 64
/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */
#undef POINTER_SIZE
target machine. If you don't define this, the default is one word.
@end defmac
-@defmac ADA_LONG_TYPE_SIZE
-On some machines, the size used for the Ada equivalent of the type
-@code{long} by a native Ada compiler differs from that used by C@. In
-that situation, define this macro to be a C expression to be used for
-the size of that type. If you don't define this, the default is the
-value of @code{LONG_TYPE_SIZE}.
-@end defmac
-
@defmac LONG_LONG_TYPE_SIZE
A C expression for the size in bits of the type @code{long long} on the
target machine. If you don't define this, the default is two
target machine. If you don't define this, the default is one word.
@end defmac
-@defmac ADA_LONG_TYPE_SIZE
-On some machines, the size used for the Ada equivalent of the type
-@code{long} by a native Ada compiler differs from that used by C@. In
-that situation, define this macro to be a C expression to be used for
-the size of that type. If you don't define this, the default is the
-value of @code{LONG_TYPE_SIZE}.
-@end defmac
-
@defmac LONG_LONG_TYPE_SIZE
A C expression for the size in bits of the type @code{long long} on the
target machine. If you don't define this, the default is two
JCR_SECTION_NAME TARGET_USE_JCR_SECTION SDB_DEBUGGING_INFO \
SDB_DEBUG NO_IMPLICIT_EXTERN_C NOTICE_UPDATE_CC \
CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS SLOW_SHORT_ACCESS \
- WIDEST_HARDWARE_FP_SIZE
+ WIDEST_HARDWARE_FP_SIZE ADA_LONG_TYPE_SIZE
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \