======================================================
GNAT 5.02 NEW FEATURES LIST Current as of Jun 22, 2004
======================================================

Copyright (c) 2003, Ada Core Technologies

This file contains a complete list of new features in
version 5.02 of GNAT. A full description of all GNAT
features can be found in the GNAT User's Guide and GNAT
Reference Manual.

An ISO date (YYYY-MM-DD) appears in parentheses after the
description line. This date shows the implementation date
of the feature. Any wavefront subsequent to this date will
contain the indicated feature.

Note on 3.17w wavefronts. Where possible, and unless otherwise
noted in the specific entry, new features provided in GNAT
version 5.02 are also available in GNAT 3.17w wavefronts.

NF-502-CC18-002 New handling of pure imported subprograms (2003-12-21)

  Imported subprograms are not by default considered pure
  in pure units. This is because there is no way to check
  that they are in fact pure. The treatment of imported
  subprograms as pure lead in some cases to mysterious
  cases where the compiler legitimately optimized away
  calls that were essential. In the new scheme, you must
  use an explicit pragma Pure_Function if you want to
  promise that an imported subprogram is in fact pure.

NF-502-CC17-009 Default secondary stack size control (2004-01-03)

  For targets using a fixed allocation secondary stack
  (in particular the AE653 port of GNAT), it is now
  possible to control the default allocation size for
  the secondary stack, using the binder switch -Dnnn to
  set the default to nnn bytes.

NF-502-CC17-008 Secondary stack high water mark (2004-01-05)

  For targets using a fixed allocation secondary stack,
  (currently these are the VxWorks ports of GNAT), package
  GNAT.Secondary_Stack_Info provides the ability to query
  the current task's secondary stack high water mark.

NF-502-CC09-002 cross-compiler can build ASIS trees (2004-04-12)

  When using ASIS with a cross-compiler, for a dynamic ASIS
  Context it is possible now  to call this cross-compiler
  to create trees on the fly. It can be done either by
  means of the new '--GCC' parameter of the Context
  definition or by defining the compiler name from the
  ASIS application name.

NF-502-CB28-001 More info for unsupported constructs (2003-12-24)

  When using the configurable run-time, if an entity is
  not available, then the -gnatf (full errors) flag
  always ensures that the name of the missing entity
  is generated as part of the error message. This was
  done in some cases previously, but now this information
  is always output.

NF-502-CB25-015 New procedure to free GNAT.Sockets.Stream (2003-11-25)

  The documentation of the GNAT.Sockets.Stream functions
  has been clarified to explicitly mention that they
  allocate a Stream object. A procedure GNAT.Sockets.Free
  has been added to allow the release of the allocated
  storage when the stream is no longer required.

NF-502-CB20-021 Form feeds generated in gnatpp output (2003-11-27)

  Output generated by gnatpp (the pretty printer) now has
  a form feed character following each pragma Page that is
  present in the source file.

NF-502-CB17-015 Last chance handler (2003-12-09)

  The actions to be taken by the runtime can be replaced by
  defining a procedure exporting __gnat_last_chance_handler
  as its entry point. The required parameter profile is the
  same as for Ada.Exceptions.Last_Chance_Handler.

NF-502-CB12-012 GNAT MAKE now accepts several mains (2003-11-12)

  When the command MAKE is used for the GNAT driver, it is now
  possible to specify on the command line several mains that will
  all be transmitted to gnatmake to be built.

NF-502-CB03-002 New switch -gnatS to print standard (2003-11-08)

  A new switch -gnatS causes the compiler to print out
  the contents of package Standard in something close to
  correct Ada (it is not possible to do this in absolutely
  standard Ada). This is useful for determining the exact
  attributes of target dependent types in Standard. This
  switch replaces the separate utility gnatpsta, which was
  not correctly implementable on some systems.

NF-502-CB21-001 Binder'Default_Switches to bind SALs (2003-10-25)

  When a Stand-Alone Library is bound, using gnatbind,
  switches specified in attribute Default_Switches ("Ada")
  in package Binder are passed to gnatbind.

NF-502-CA25-001 New restriction No_Direct_Boolean_Operators (2003-10-24)

  This restriction prevents the use of any logical or
  comparison operators on operands of Boolean type (or
  any type derived from Boolean). This is intended for
  use in conjunction with certification protocols and
  procedures that prohibit the use of such operators,
  and insist on the exclusive use of short-circuit forms
  in their place.

NF-502-CA20-011 Mains not in the specified project (2003-10-23)

  When gnatmake is invoked with a project file, without
  -u or -U and one or several mains on the command lines,
  these mains need not to belong to the specified project.
  They need to be from the same project in the project
  tree rooted at the specified project. This common project
  is then the "main project". That is the one where package
  Builder is considered.

NF-502-CA17-012 Full validity checks on arguments in calls (2003-11-26)

  When validity checks are enabled, the compiler generates
  checks for expressions that are actuals in calls.
  Previously validity checks were only applied to entities.

NF-502-CA17-005 gnatchop no longer fails on empty file

  When gnatchop input is an empty file, or a file containing
  only Ada comments, only warnings are issued. If there is no
  other error, then gnatchop returns a status of success.

NF-502-CA16-011 New GNAT run time under HP-UX (2003-10-16)

  An alternate run time configured for setjmp/longjmp
  exception handling is now provided under HP-UX.

NF-502-CA15-014 New Match function in g-regpat (2003-10-22)

  Implement a Match function returning a boolean result
  indicating whether or not the string matches a
  precompiled regurlar expression.

NF-502-CA14-009 New gnatmake switch -U (2003-10-16)

  When gnatmake is invoked with the new switch -U, a
  project file (switch -P) and no main on the command line,
  all sources of all projects are checked and recompiled
  if necessary, and libraries are rebuilt if necessary.

NF-502-CA14-002 Cross-ref information for generic formals (2003-10-14)

  Compiler now generates cross-reference information
  on formals that appear in named associations in
  instantiations, for use in various source navigation
  and refactoring tools.

NF-502-CA09-012 String concatenation with no run time (2003-10-10)

  String concatenation normally uses run time routines
  which means that in configurable run-time (HIE) mode,
  string concatenation is not available if these routines
  are not in the run time. The compiler has now been
  modified so that inline concatenation is done if the
  routines are not available, meaning that concatenation
  of strings is always possible even if these routines are
  not available.

NF-502-CA03-010 Bit-packed array objects not initialized (2003-10-21)

  Record components whose type is a small bit-packed array
  (<= 64 bits) are no longer implicitly initialized to
  zero. This avoids some unexpected behavior.

NF-502-CA03-003 Relaxed restrictions on component clauses (2003-11-24)

  The restriction that components of structures must be on
  byte boundaries and occupy an integral number of bytes
  has been relaxed in GNAT 5 releases. For example, a
  80-bit packed record may be positioned on bits 2-81 of
  a record. The only cases for which the restriction still
  applies is the case of a bit-packed array, or a record
  type that contains a bit-packed array field. Note that
  in GNAT 3 versions, the full restriction still applies
  for all large records and arrays.

NF-502-C930-003 Remove GNU/Linux link limitation (2003-10-06)

  Linking big applications could fail on some GNU/Linux
  configurations because of command line limitation issues.
  GNAT now uses a GNU link response file on this platform
  after a certain threshold. The -f option of gnatlink
  is also supported.

NF-502-C924-011 Pragma Thread_Body (2003-11-27)

  This pragma supports registration of foreign threads with
  the Ada run-time system, and also allows specification of
  the secondary stack size. It is only implemented on some
  targets (see detailed release documentation).

NF-502-C919-011 ALI files in error flagged by gnatmake (2003-09-30)

  When an ALI file generated with switch -gnatQ is marked
  as in error, gnatmake will now detect this and attempt
  a recompilation, even when switch -gnatc is used.

NF-502-C919-004 Improvement of GNAT.Command_Line.Getopt (2003-10-11)

  Getopt now takes a new Boolean parameter Concatenate,
  defaulted to True. When Concatenate is False, switches
  that do not require an argument cannot be concatenated
  (if only -ab is allowed, -a -b is not allowed when
  Concatenate is False)

NF-502-C912-006 New warning for compare with True (2003-09-14)

  If the -gnatwr (warn on redundant constructs flag)
  is set, then a warning is generated for an explicit
  comparison of True (since expr = True can be replaced
  simply by expr).

NF-502-C911-018 New warning for redundant parentheses (2003-09-14)

  If the -gnatwr (warn on redundant constructs flag) is
  set, then a warning is generated for the use of a C-style
  extra level of parentheses around conditionals in IF,
  WHILE, and EXIT statements.

NF-502-C909-004 Optimization of mod/rem 1 (2003-09-09)

  Expressions of the form x mod y and x rem y are now
  optimized to always give a result of zero when the
  value of y is known to be 1 at compile time.

NF-502-C908-014 Better handling of bad with (2003-11-22)

  The compiler now handles the case of with'ing a unit
  from the predefined library that does not exist more
  smoothly. Incorrect messages are avoided, and the
  compilation continues instead of being abandoned.

NF-502-C907-001 Improved Ada.Strings.Wide_Bounded (2003-09-07)

  The implementation of Ada.Strings.Wide_Bounded has been
  rewritten so all instantiations of Generic_Bounded_Length
  share a non generic implementation. This will reduce the
  size of applications where Generic_Bounded_Length is
  instantiated more than once. This is similar to the
  implementation of Ada.Strings.Bounded (9802-001).

NF-502-C830-002 Unbiased rounding of float constants (2003-08-31)

  The original formulation in the RM required biased
  rounding of float constants at compile time, which was
  unfortunate since it differed from the run-time behavior
  which was to round unbiased (round to nearest even). A
  new approved AI-100 allows implementations to perform
  correct (unbiased) rounding at compile time. GNAT Pro
  now takes advantage of this permission. The warning
  flag -gnatwb/B that controlled warnings for biased
  rounding is removed, since it is no longer needed.

NF-502-C809-003 New unit GNAT.Bounded_Buffers (2003-08-13)

  This new unit provides a concurrent generic bounded
  buffer abstraction. Instances are useful directly or
  as part of the implementation of other abstractions,
  such as mailboxes (see below).

NF-502-C816-002 Warning on unused generic instantiation

  GNAT now emits a warning on an unused package instantiation
  when it appears in a package body.

NF-502-C810-001 New unit GNAT.Bounded_Mailboxes (2003-08-13)

  This new unit provides a generic asynchronous intertask
  mailbox communication facility.

NF-502-C811-003 New unit GNAT.Semaphores (2003-08-13)

  This new unit provides classic counting and binary
  semaphores.

NF-502-C807-009 Remove restrictions on library names (2003-08-07)

  The restrictions on naming of libraries have been
  removed, allowing names like c++ or libgtkada-2.

NF-502-C807-006 New constant Default_Attribute_Count (2003-10-16)

   The constant System.Parameters.Default_Attribute_Count
   represents the number of pre-allocated Address-sized
   task attributes stored in the task control block and can
   be increased if needed by the application to improve the
   efficiency of accessing task attributes.

NF-502-C804-011 New unit GNAT.Memory_Dump (2003-08-05)

  This new unit provides a convenient routine for dumping
  raw memory in hex to either standard output or standard
  error (it uses GNAT.IO for the output).

NF-502-C804-007 Ada.Exceptions.Traceback made public (2003-08-06)

  This unit provide routine Tracebacks, which gives a
  traceback based on an exception occurrence. It has been
  moved from the set of implementation units to those that
  are publicly usable.

NF-502-C726-002 Warning on redundant exception handler (2003-08-06)

  The -gnatr switch now also generates a warning on
  a useless exception handler that contains only a
  reraise statement (raise with operand).

NF-502-C724-001 Preprocessing triggered by -gnateD (2003-07-25)

  Invoking the compiler with a switch -gnateD is sufficient
  to trigger integrated preprocessing. -gnatep is no longer
  necessary. With -gnateD and no -gnatep, all sources of
  the compilation will be preprocessed.

NF-502-C723-011 Locally_Removed_Files and gnatmake (2003-07-25)

  Files listed in attributes Locally_Removed_Files are now
  taken into account by gnatmake. If such a file is still
  needed, gnatmake will detect this and this will trigger
  compilations that will fail with an explicit message.

NF-501-C718-005 Improved speed for large number of errors (2003-08-06)

  The algorithm for handling error messages used to be
  quadratic in the number of messages, which could get
  slow in the case of a large number of messages. This
  has been improved to be linear, resulting in a big
  improvement in compilation time in this case.

NF-501-C718-003 Increased limit on number of errors (2003-07-23)

  The default limit on maximum number of errors/warnings
  which is 9999 can now be increased to any value up to
  999999 using the -gnatm switch (-m for the binder).

NF-502-C709-018 Binding stand alone library with gnatmake (2003-07-07)

  Invoking gnatmake -b and/or -l with a library project file will
  allow you to bind a stand-alone library or to build any other
  library, instead of doing nothing.

NF-502-C708-016 More efficient handling of task attributes (2003-10-16)

   The handling of task attributes in Ada.Task_Attributes whose size
   is smaller or equal to System.Address'Size (32 or 64 bits) has
   been significantly improved.

NF-501-C704-009 Improved handling of No_Asynchronous_Select (2003-07-07)

  The restriction No_Asynchronous_Select is now recognized
  to allow the suppression of useless implicit defer and
  reenable abort calls (No_Abort must also be set).

NF-502-C629-001 Warning on inefficient packing (2003-07-31)

  If pragma Pack is used to pack an array where the
  component base type has a size of 8/16/32, and the
  subtype has a size that is 1 bit less (common case
  is array of Natural), then a warning is given for
  possibly unintended inefficiency.

NF-502-C515-002 New validity checking features (2003-08-06)

  Two improvements to validity checking have been made.
  First, suppressing range checks on an entity will
  suppress validity checking on that entity. Second a
  new switch -gnatVp avoids making any assumptions
  about parameters within a subprogram, and forces
  validity checking of parameters within the subprogram.

NF-502-C317-004 No fail status for gnatchop warnings (2003-12-11)

  When gnatchop is invoked and there are one or more
  warnings, but no error, the status returned by gnatchop
  is no longer a failure, but a success.

NF-502-C109-008 New package GNAT.Signals (2003-10-29)

  Introduce user capability for manipulating blocked status
  of signals, on supported targets.

NF-502-BB30-011 New pragma Suppress_Exception_Locations

  A new configuration pragma Suppress_Exception_Locations
  is available to suppress the normal default exception
  messages for explicit raise statements. These strings
  are useful in debugging, but take space in the image.
  So this pragma is useful to minimize space.

NF-502-BA28-018 New parameters for ASIS Context (2003-10-18)

  Two new parameters (-gnatec and -gnatA) have been added
  to the set of ASIS Context parameters. They are supposed
  to be used for source-based ASIS Context. They are passed
  to the gcc calls that generate trees on the fly and have
  the same meaning as for the GNAT compiler.

NF-502-B523-005 Ada entity name completion in the debugger (2003-09-18)

  The gdb name completion circuit now properly handles the
  automatic completion of Ada entity names in debug
  commands, so that the full name need not be typed in.

NF-502-B512-005 Shared runtime library on NT (2004-01-20)

  Shared version of GNAT RTL is now supported on NT in addition
  to the static one. It will be used when gnatbind switch -shared
  is specified. This feature is only available on GNAT5.

NF-502-9918-004 New tool "gnatclean" (2003-07-21)

  A new tool "gnatclean" has been added to the GNAT tools.
  gnatclean allows the deletion of files produced by
  the compiler, the binder and the linker. It can be used
  with or without project files.

NF-502-9802-001 Improved Ada.Strings.Bounded (2003-09-07)

  The implementation of Ada.Strings.Bounded has been
  rewritten so all instantiations of Generic_Bounded_Length
  share a non generic implementation. This will reduce the
  size of applications where Generic_Bounded_Length is
  instantiated more than once.

NF-502-7813-004 Trailing zeroes in real input ignored (2003-08-14)

  When reading real values with Text_IO, or converting real
  values using the 'Value attribute, trailing zeroes after
  the decimal point are ignored, leading to more consistent
  results (e.g. 10.0E+40 is guaranteed to have the same
  exact bit representation as 10.0000E+40).
