home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-os2-bin-20010916.zip / emx / gnat / features < prev    next >
Text File  |  1999-09-24  |  14KB  |  290 lines

  1. GNAT NEW FEATURES LIST
  2. Current as of June 30th, 1999
  3.  
  4. Here is a list of the latest new features in GNAT. A full description of all
  5. GNAT features can be found in the GNAT User Guide and GNAT Reference Manual.
  6.  
  7. Latest features in GNAT version 3.12p
  8. =====================================
  9.  
  10.   The compiler is now built with options -gnatpn instead of -gnata.
  11.   This means that the front end of the compiler is considerably
  12.   faster, up to 2-3 times faster in some cases. The cases where you
  13.   will see the biggest speed up are in -gnatc compilations with no
  14.   code generation, or if very large specs are with'ed from smaller
  15.   units.
  16.  
  17.   The binder now generates an Ada package as the main program by default
  18.   instead of a C program. The generated files are called b~xxx.ads/adb,
  19.   where xxx is the name of the main program. The -C switch for both
  20.   gnatbind and gnatlink can be used to get the old behavior of generating
  21.   the main program in C.
  22.  
  23.   The location (file and line number) at which an exception was raised now
  24.   appears by default in the exception message, and the message for an
  25.   unhandled exception includes this information.
  26.  
  27.   The handling of aggregates has been optimized in many cases, generating
  28.   more efficient code and less memory usage.
  29.  
  30.   The handling of protected objects with no entries has been simplified and
  31.   optimized.
  32.  
  33.   A new optimization circuit removes many subscript checks in loops in
  34.   the cases where the range of the loop can be determined to be in range
  35.   of the subscript.
  36.  
  37.   A restricted version of the run time is now provided. This version of
  38.   the run time is automatically used if the appropriate set of restrictions
  39.   is used. A new pragma Restricted_Run_Time sets this set of restrictions.
  40.   The restricted run-time is more efficient for the set of allowed operations.
  41.  
  42.   Shared passive partitions are fully implemented, including support for
  43.   protected objects that provide global locking capability. The implementation
  44.   allows the use of shared passive partitions to communicate between separate
  45.   programs as well as between partitions of a single distibuted program, and
  46.   also provides for automatic persistance from one run to another.
  47.  
  48.   The -gnatR switch can now be used in conjunction with the -gnatc switch
  49.   to obtain representation information without requiring a full compile.
  50.  
  51.   In -gnatc mode, an existing up to date ali file is no longer destroyed.
  52.   In particular this means that the -gnatc -gnatt compilations used by
  53.   ASIS do not destroy existing ali files.
  54.  
  55.   A new switch -gnaty activates style checking features in the compiler.
  56.   These roughly correspond to the checking done by the special internal
  57.   -gnatg flag, except that -gnaty allows extensive choice of which checks
  58.   are to be performed, and also allows parametrization, e.g. of the indent
  59.   level that is enforced.
  60.  
  61.   New switches -nostdinc and -nostdlib for gnatmake and gnatbind. New
  62.   switch -nostdinc for gcc/gnat1 and gnatls. -nostdinc turns off looking
  63.   for sources in the system default directory. -nostdlib turns off looking
  64.   for library files in the system default directory.
  65.  
  66.   A new switch -gnatR causes the compiler to output representation information
  67.   for declared arrays and records.
  68.  
  69.   A new switch -gnatD causes the compiler to generate files with names
  70.   x.dg (where x is the source file name) that contain the expanded (-gnatG)
  71.   code and to force debugging information to refer to these files. This
  72.   allows source level debugging using the expanded code.
  73.  
  74.   A new flag -O for gnatbind gives a complete list of objects that are
  75.   needed by the Ada part of the program. 
  76.  
  77.   A new flag -z for gnatmake and gnatbind allows the more convenient 
  78.   compilation/binding/linking of an Ada program without a main subprogram.
  79.   The execution of such a program is identical to the one of the program
  80.   with an empty main subprogram with a "with" clause on the main package.
  81.  
  82.   The list of switches printed out when the -gnath option is used now includes
  83.   common gcc switches.
  84.  
  85.   The compilation switches are now stored in the ali file (lines starting
  86.   with A). This is used to implement the corresponding ASIS option to
  87.   retrieve the command line arguments.
  88.  
  89.   Enum_Rep can now be applied to integer types and objects. This allows its
  90.   use on (<>) formal discrete types in generic packages and subprograms.
  91.  
  92.   A new attribute System'To_Address (X) has exactly the same result value
  93.   as System.Storage_Elements.To_Address (X), except that the result is a
  94.   static value if the input value is static, allowing its use in a package
  95.   to which pragma Preelaborate applies.
  96.  
  97.   A new pragma Finalize_Storage_Only has been implemented. It indicates
  98.   that a Finalize routine is present only for the purposes of releasing
  99.   storage, and that thus the Finalize call can be omitted in some cases
  100.   (e.g. for objects declared at the library level).
  101.  
  102.   A new pragma Ravenscar establishes the set of restrictions that corresponds
  103.   with the Ravenscar profile for limited tasking. This is a more restrictive
  104.   set than Restricted_Run_Time, so use of pragma Ravenscar will also cause the
  105.   restricted run time to be used.
  106.  
  107.   If pragma Suppress is used in the gnat.adc file, this now properly
  108.   suppresses exceptions in all files compiled in the presence of this
  109.   gnat.adc file (Suppress pragmas in gnat.adc were previously ignored,
  110.   which is in accordance with the RM, but certainly not what is wanted!)
  111.  
  112.   The Assert pragma now permits expressions of types derived from Boolean
  113.   instead of requiring Standard.Boolean itself.
  114.  
  115.   A new restriction identifier No_Complex_Barriers has been added which
  116.   causes barriers to be restricted to simple boolean variables declared
  117.   within the protected type. This is one of the Ravenscar restrictions.
  118.  
  119.   A new restriction identifier No_Select_Statements has been added which
  120.   completely eliminates the use of select statements. This is one of the
  121.   Ravenscar restrictions
  122.  
  123.   GNAT now handles C, C++ and Fortran convention boolean types specially.
  124.   In all these cases, zero/non-zero semantics is used, so that any
  125.   non-zero value is treated as equivalent to True. This means that
  126.   the implementation of Interfaces.Fortran.LOGICAL is more accurate,
  127.   and provides a convenient way of importing C int values used as
  128.   boolean values.
  129.  
  130.   A preliminary version of the Data Decomposition Annex is now available
  131.   for use in ASIS. This preliminary version supports only the simple type
  132.   model, and does not yet allow queries with Portable_Data arguments.
  133.  
  134.   The output format of gnatxref has been modified to be in columnar
  135.   format so that it is easier to read.
  136.  
  137.   The gnatfind utility now accepts wild cards in the file name to allow
  138.   a set of files to be searched, and this works on all operating systems.
  139.  
  140.   The gnatprep utility now supports boolean expressions (and, or, and
  141.   then, or else, =, 'Defined), and has a new command line switch to
  142.   define symbols.
  143.  
  144.   A new package, GNAT.Current_Exception is provided for access to the
  145.   current exception name and information. This is provided for compatibility
  146.   with other Ada 83 compilers. See g-curexc.ads for a full description of
  147.   this package.
  148.  
  149.   A new package GNAT.Regpat implements the full V7 regular expression
  150.   matching, including such features as anchors, and is thus a more
  151.   complete implementation than that in GNAT.Regexp, which is retained
  152.   for compatibility (and is in any case more appropriate for certain
  153.   functions).
  154.  
  155.   A new package GNAT.Threads (in files g-thread.ads/adb) provides a general 
  156.   facility for foreign code (e.g. written in C) to create threads in a
  157.   manner known to the Ada run-time system, so that these threads can 
  158.   freely call Ada code that uses explicit or implicit tasking constructs.
  159.  
  160.   The sorting packages GNAT.Heap_Sort_A, GNAT.Heap_Sort_G, GNAT.Bubble_Sort_A
  161.   and GNAT. Bubble_Sort_G use subtype Natural instead of Positive for the
  162.   number of items to sort, so it is no longer an error to sort an empty 
  163.   range of items.
  164.  
  165.   A function and a procedure to retreive the current working directory
  166.   have been added in g-dirope.ad[sb].
  167.  
  168.   The package GNAT.Command_Line has been updated to handle sections on
  169.   the command line, as in gnatmake (-largs, -bargs, ...). There is also
  170.   a new character '!' to specify that a switch must have a parameter, and
  171.   that there must be no space between the two. Finally, a new special switch
  172.   '*' has been created, to match any item on the command line.
  173.  
  174.   Gcov, a test coverage program is now distributed with GNAT. See the gcc
  175.   documentation for its use.
  176.  
  177.   A new tool is provided, gnatdll. This is an NT/Win9x specific tool
  178.   to help in constructing DLLs.
  179.  
  180.   Add support for Windows NT Resources. Under NT there are two new tools.
  181.   RCL the resource compiler and res2coff to convert a binary resources
  182.   file to a coff object file to be linked with a program. 
  183.  
  184.   The packages Calendar and Ada.Real_Time for the NT/Win9x implementation now
  185.   use a high resolution clock providing a resolution of 1 micro-sec.
  186.  
  187.   A new convention DLL has been added to simplify the development of DLL's
  188.   using the NT/Win9x port of GNAT..
  189.   
  190.   The convention Stdcall is now available for variables as well as
  191.   subprograms for the NT/Win9x port of GNAT.
  192.  
  193.   Complete rewrite of the section of NT/Win9x specific features and
  194.   documentation of the GNAT technology in this area. This section now
  195.   clearly explains and documents how to use the NT/Win9x specific
  196.   features of the GNAT technology.
  197.  
  198.   The standard GNAT library (on Unix systems) now contains a Makefile
  199.   called Makefile.adalib which allows recompilation of the runtime
  200.   with different compilation options or different configuration
  201.   pragmas.
  202.  
  203.   24-bit packed components are now permitted in GNORT mode provided that
  204.   the alignment of the component type is explicitly set to 1.
  205.  
  206.   It is now permissible to declare library variables whose nominal type is
  207.   unconstrained String in GNORT mode if the initializing expression is a
  208.   string literal.
  209.  
  210.   GNORT now permits the use of allocators and it is also possible to
  211.   explicitly raise Program_Error. These calls are supported by user
  212.   defined subprograms. See GNORT documentation for full details.
  213.  
  214.   Zero cost exceptions are now implemented in DEC Unix and on SGI Irix.
  215.   On these two targets, zero cost exception handling is the standard
  216.   default. You can select longjmp/setjmp exception handling (smaller
  217.   executables) by using the -gnatL switch on all compilations including
  218.   the library units. The switch -gnatZ can be used to enable zero cost
  219.   exceptions on certain other targets including NT, but these are partial
  220.   implementations in which exceptions cannot be propagated through C
  221.   code (but for all Ada programs, this will work correctly).
  222.  
  223.   In the DEC Unix version, foreign threads (those created outside Ada) are
  224.   now recognized automatically and converted to Ada tasks for proper
  225.   treatment by the Ada run time as Ada tasks.
  226.  
  227.   A new gnatbind option, -shared, enables the use of a shared GNAT library
  228.   when available (currently DEC Unix, SGI IRIX and OpenVMS).
  229.   Static GNAT library is the default on all targets but VMS and SGI IRIX.
  230.  
  231.   On Digital Unix 4.0D, the run time now takes advantage of the full
  232.   range of priorities (0 .. 63).
  233.  
  234.   pragma Task_Info is now available for AiX and can be used to specify the
  235.   scheduling contention scope of each Ada task.
  236.  
  237.   [VMS] Wildcard directory specifications accepted and expanded in /SEARCH
  238.   qualifiers and ADA_{INCLUDE,OBJECTS}_PATH logicals.
  239.  
  240.   A new package GNAT.Traceback provides non-symbolic tracebacks at
  241.   run time on Solaris and Linux.
  242.  
  243.   A new package GNAT.Traceback.Symbolic provides symbolic tracebacks at
  244.   run time on Solaris and Linux.
  245.  
  246.  
  247. The WITH TYPE Clause
  248. ---------------------
  249.  
  250.   The WITH TYPE clause has been implemented. This is a language
  251.   extension that has been proposed repeatedly by programmers who need
  252.   to model mutually dependent record types, that is to say pairs of types
  253.   where each has a component that is an access to the other. This structure
  254.   is common in C++ and Java libraries. Without the WITH TYPE clause, the
  255.   only way to obtain this effect in Ada is to define the types in the same
  256.   package. The WITH TYPE clause simplifies the creation of bindings to such
  257.   libraries. Given the importance of such bindings, the Ada Rapporteur Group
  258.   is discussing the introduction of the WITH TYPE clause the first
  259.   standardized extension to Ada95. The current GNAT implementation may
  260.   differ slightly from the final, WG9-approved version, but is very close
  261.   in syntax and semantics to what is currently being proposed. 
  262.  
  263.   Syntax:
  264.       WITH_TYPE_CLAUSE ::=
  265.          with type type_NAME is access | with type type_NAME is tagged
  266.  
  267.   Legality rules:
  268.     The type_NAME must be an expanded name whose prefix denotes a package.
  269.     The visible part of that package must contain a type declaration whose
  270.     defining_identifier has the given name (the imported type). If the keyword
  271.     "access" is present, the declaration must be an access declaration. If 
  272.     keyword "tagged" is present, the declaration must be a tagged type decla-
  273.     ration, a type extension, or a tagged private type declaration. 
  274.  
  275.     Within the client unit, the imported type can only be used in component
  276.     declarations, in formal parameter specifications, and to declare access
  277.     types and classwide types. The name of its enclosing package can only be
  278.     used as the prefix of a expanded name that denotes the imported type.
  279.  
  280.   Compilation rules:
  281.     The WITH TYPE clause does not create a semantic dependency between the
  282.     importing and the exporting package.  This is what allows the declaration
  283.     of distinct packages with mutually dependent types, and WITH TYPE clauses
  284.     referencing one another.
  285.  
  286.   Usage:
  287.     By default, GNAT does not support any language extensions (no validated
  288.     compiler is allowed to, after all). In order to enable the use of the
  289.     WITH TYPE clause, the GNAT flag -gnatX must be specified.
  290.