GNAT NEW FEATURES LIST
Current as of June 30th, 1999

Here is a list of the latest new features in GNAT. A full description of all
GNAT features can be found in the GNAT User Guide and GNAT Reference Manual.

Latest features in GNAT version 3.12p
=====================================

  The compiler is now built with options -gnatpn instead of -gnata.
  This means that the front end of the compiler is considerably
  faster, up to 2-3 times faster in some cases. The cases where you
  will see the biggest speed up are in -gnatc compilations with no
  code generation, or if very large specs are with'ed from smaller
  units.

  The binder now generates an Ada package as the main program by default
  instead of a C program. The generated files are called b~xxx.ads/adb,
  where xxx is the name of the main program. The -C switch for both
  gnatbind and gnatlink can be used to get the old behavior of generating
  the main program in C.

  The location (file and line number) at which an exception was raised now
  appears by default in the exception message, and the message for an
  unhandled exception includes this information.

  The handling of aggregates has been optimized in many cases, generating
  more efficient code and less memory usage.

  The handling of protected objects with no entries has been simplified and
  optimized.

  A new optimization circuit removes many subscript checks in loops in
  the cases where the range of the loop can be determined to be in range
  of the subscript.

  A restricted version of the run time is now provided. This version of
  the run time is automatically used if the appropriate set of restrictions
  is used. A new pragma Restricted_Run_Time sets this set of restrictions.
  The restricted run-time is more efficient for the set of allowed operations.

  Shared passive partitions are fully implemented, including support for
  protected objects that provide global locking capability. The implementation
  allows the use of shared passive partitions to communicate between separate
  programs as well as between partitions of a single distibuted program, and
  also provides for automatic persistance from one run to another.

  The -gnatR switch can now be used in conjunction with the -gnatc switch
  to obtain representation information without requiring a full compile.

  In -gnatc mode, an existing up to date ali file is no longer destroyed.
  In particular this means that the -gnatc -gnatt compilations used by
  ASIS do not destroy existing ali files.

  A new switch -gnaty activates style checking features in the compiler.
  These roughly correspond to the checking done by the special internal
  -gnatg flag, except that -gnaty allows extensive choice of which checks
  are to be performed, and also allows parametrization, e.g. of the indent
  level that is enforced.

  New switches -nostdinc and -nostdlib for gnatmake and gnatbind. New
  switch -nostdinc for gcc/gnat1 and gnatls. -nostdinc turns off looking
  for sources in the system default directory. -nostdlib turns off looking
  for library files in the system default directory.

  A new switch -gnatR causes the compiler to output representation information
  for declared arrays and records.

  A new switch -gnatD causes the compiler to generate files with names
  x.dg (where x is the source file name) that contain the expanded (-gnatG)
  code and to force debugging information to refer to these files. This
  allows source level debugging using the expanded code.

  A new flag -O for gnatbind gives a complete list of objects that are
  needed by the Ada part of the program. 

  A new flag -z for gnatmake and gnatbind allows the more convenient 
  compilation/binding/linking of an Ada program without a main subprogram.
  The execution of such a program is identical to the one of the program
  with an empty main subprogram with a "with" clause on the main package.

  The list of switches printed out when the -gnath option is used now includes
  common gcc switches.

  The compilation switches are now stored in the ali file (lines starting
  with A). This is used to implement the corresponding ASIS option to
  retrieve the command line arguments.

  Enum_Rep can now be applied to integer types and objects. This allows its
  use on (<>) formal discrete types in generic packages and subprograms.

  A new attribute System'To_Address (X) has exactly the same result value
  as System.Storage_Elements.To_Address (X), except that the result is a
  static value if the input value is static, allowing its use in a package
  to which pragma Preelaborate applies.

  A new pragma Finalize_Storage_Only has been implemented. It indicates
  that a Finalize routine is present only for the purposes of releasing
  storage, and that thus the Finalize call can be omitted in some cases
  (e.g. for objects declared at the library level).

  A new pragma Ravenscar establishes the set of restrictions that corresponds
  with the Ravenscar profile for limited tasking. This is a more restrictive
  set than Restricted_Run_Time, so use of pragma Ravenscar will also cause the
  restricted run time to be used.

  If pragma Suppress is used in the gnat.adc file, this now properly
  suppresses exceptions in all files compiled in the presence of this
  gnat.adc file (Suppress pragmas in gnat.adc were previously ignored,
  which is in accordance with the RM, but certainly not what is wanted!)

  The Assert pragma now permits expressions of types derived from Boolean
  instead of requiring Standard.Boolean itself.

  A new restriction identifier No_Complex_Barriers has been added which
  causes barriers to be restricted to simple boolean variables declared
  within the protected type. This is one of the Ravenscar restrictions.

  A new restriction identifier No_Select_Statements has been added which
  completely eliminates the use of select statements. This is one of the
  Ravenscar restrictions

  GNAT now handles C, C++ and Fortran convention boolean types specially.
  In all these cases, zero/non-zero semantics is used, so that any
  non-zero value is treated as equivalent to True. This means that
  the implementation of Interfaces.Fortran.LOGICAL is more accurate,
  and provides a convenient way of importing C int values used as
  boolean values.

  A preliminary version of the Data Decomposition Annex is now available
  for use in ASIS. This preliminary version supports only the simple type
  model, and does not yet allow queries with Portable_Data arguments.

  The output format of gnatxref has been modified to be in columnar
  format so that it is easier to read.

  The gnatfind utility now accepts wild cards in the file name to allow
  a set of files to be searched, and this works on all operating systems.

  The gnatprep utility now supports boolean expressions (and, or, and
  then, or else, =, 'Defined), and has a new command line switch to
  define symbols.

  A new package, GNAT.Current_Exception is provided for access to the
  current exception name and information. This is provided for compatibility
  with other Ada 83 compilers. See g-curexc.ads for a full description of
  this package.

  A new package GNAT.Regpat implements the full V7 regular expression
  matching, including such features as anchors, and is thus a more
  complete implementation than that in GNAT.Regexp, which is retained
  for compatibility (and is in any case more appropriate for certain
  functions).

  A new package GNAT.Threads (in files g-thread.ads/adb) provides a general 
  facility for foreign code (e.g. written in C) to create threads in a
  manner known to the Ada run-time system, so that these threads can 
  freely call Ada code that uses explicit or implicit tasking constructs.

  The sorting packages GNAT.Heap_Sort_A, GNAT.Heap_Sort_G, GNAT.Bubble_Sort_A
  and GNAT. Bubble_Sort_G use subtype Natural instead of Positive for the
  number of items to sort, so it is no longer an error to sort an empty 
  range of items.

  A function and a procedure to retreive the current working directory
  have been added in g-dirope.ad[sb].

  The package GNAT.Command_Line has been updated to handle sections on
  the command line, as in gnatmake (-largs, -bargs, ...). There is also
  a new character '!' to specify that a switch must have a parameter, and
  that there must be no space between the two. Finally, a new special switch
  '*' has been created, to match any item on the command line.

  Gcov, a test coverage program is now distributed with GNAT. See the gcc
  documentation for its use.

  A new tool is provided, gnatdll. This is an NT/Win9x specific tool
  to help in constructing DLLs.

  Add support for Windows NT Resources. Under NT there are two new tools.
  RCL the resource compiler and res2coff to convert a binary resources
  file to a coff object file to be linked with a program. 

  The packages Calendar and Ada.Real_Time for the NT/Win9x implementation now
  use a high resolution clock providing a resolution of 1 micro-sec.

  A new convention DLL has been added to simplify the development of DLL's
  using the NT/Win9x port of GNAT..
  
  The convention Stdcall is now available for variables as well as
  subprograms for the NT/Win9x port of GNAT.

  Complete rewrite of the section of NT/Win9x specific features and
  documentation of the GNAT technology in this area. This section now
  clearly explains and documents how to use the NT/Win9x specific
  features of the GNAT technology.

  The standard GNAT library (on Unix systems) now contains a Makefile
  called Makefile.adalib which allows recompilation of the runtime
  with different compilation options or different configuration
  pragmas.

  24-bit packed components are now permitted in GNORT mode provided that
  the alignment of the component type is explicitly set to 1.

  It is now permissible to declare library variables whose nominal type is
  unconstrained String in GNORT mode if the initializing expression is a
  string literal.

  GNORT now permits the use of allocators and it is also possible to
  explicitly raise Program_Error. These calls are supported by user
  defined subprograms. See GNORT documentation for full details.

  Zero cost exceptions are now implemented in DEC Unix and on SGI Irix.
  On these two targets, zero cost exception handling is the standard
  default. You can select longjmp/setjmp exception handling (smaller
  executables) by using the -gnatL switch on all compilations including
  the library units. The switch -gnatZ can be used to enable zero cost
  exceptions on certain other targets including NT, but these are partial
  implementations in which exceptions cannot be propagated through C
  code (but for all Ada programs, this will work correctly).

  In the DEC Unix version, foreign threads (those created outside Ada) are
  now recognized automatically and converted to Ada tasks for proper
  treatment by the Ada run time as Ada tasks.

  A new gnatbind option, -shared, enables the use of a shared GNAT library
  when available (currently DEC Unix, SGI IRIX and OpenVMS).
  Static GNAT library is the default on all targets but VMS and SGI IRIX.

  On Digital Unix 4.0D, the run time now takes advantage of the full
  range of priorities (0 .. 63).

  pragma Task_Info is now available for AiX and can be used to specify the
  scheduling contention scope of each Ada task.

  [VMS] Wildcard directory specifications accepted and expanded in /SEARCH
  qualifiers and ADA_{INCLUDE,OBJECTS}_PATH logicals.

  A new package GNAT.Traceback provides non-symbolic tracebacks at
  run time on Solaris and Linux.

  A new package GNAT.Traceback.Symbolic provides symbolic tracebacks at
  run time on Solaris and Linux.


The WITH TYPE Clause
---------------------

  The WITH TYPE clause has been implemented. This is a language
  extension that has been proposed repeatedly by programmers who need
  to model mutually dependent record types, that is to say pairs of types
  where each has a component that is an access to the other. This structure
  is common in C++ and Java libraries. Without the WITH TYPE clause, the
  only way to obtain this effect in Ada is to define the types in the same
  package. The WITH TYPE clause simplifies the creation of bindings to such
  libraries. Given the importance of such bindings, the Ada Rapporteur Group
  is discussing the introduction of the WITH TYPE clause the first
  standardized extension to Ada95. The current GNAT implementation may
  differ slightly from the final, WG9-approved version, but is very close
  in syntax and semantics to what is currently being proposed. 

  Syntax:
      WITH_TYPE_CLAUSE ::=
         with type type_NAME is access | with type type_NAME is tagged

  Legality rules:
    The type_NAME must be an expanded name whose prefix denotes a package.
    The visible part of that package must contain a type declaration whose
    defining_identifier has the given name (the imported type). If the keyword
    "access" is present, the declaration must be an access declaration. If 
    keyword "tagged" is present, the declaration must be a tagged type decla-
    ration, a type extension, or a tagged private type declaration. 

    Within the client unit, the imported type can only be used in component
    declarations, in formal parameter specifications, and to declare access
    types and classwide types. The name of its enclosing package can only be
    used as the prefix of a expanded name that denotes the imported type.

  Compilation rules:
    The WITH TYPE clause does not create a semantic dependency between the
    importing and the exporting package.  This is what allows the declaration
    of distinct packages with mutually dependent types, and WITH TYPE clauses
    referencing one another.

  Usage:
    By default, GNAT does not support any language extensions (no validated
    compiler is allowed to, after all). In order to enable the use of the
    WITH TYPE clause, the GNAT flag -gnatX must be specified.
