From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9b4f3e577f2bae1d X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Gnat 3.04a for 95 wierdness Date: 1997/03/11 Message-ID: X-Deja-AN: 224859525 References: <33259a7a.22085949@news.demon.co.uk> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-03-11T00:00:00+00:00 List-Id: Simon Moore said <> The updates from 3.04 to 3.09 in GNAT itself are substantial, see material at end of this message, and in addition 3.09 is a radical reimplementation of the port, using the Cygnus tools to build GNAT and its tools. Latest features in GNAT version 3.09 ==================================== (see complete list for 3.08, since for all cases except NT, 3.08 was skipped in the version sequencing) A new pragma Pure_Function allows an individual function to be specified as Pure, see documentation in the GNAT reference manual for full details. Address clauses now are much more flexible. In previous versions, GNAT rejected any address clause not required to be implemented, in accordance with the implementation permission in section 13.1(22) of the RM. Now far more cases are accepted and correctly processed as follows: 1. All address clauses for variables of any elementary type (i.e. scalars and access types) are permitted. 2. All address clauses for non-initialized variables are permitted 3. An address clause for an initialized variable of a composite type is accepted if any calls to operators or functions are to pure subprograms (i.e. either declared in a pure unit, or declared pure using the pragma Pure_Function), and all operands are literals, or constants defined prior to the variable to which the address clause applies. In practice this should mean that nearly all address clauses are now accepted. Note that To_Address is a pure function. For the VMS version only, pragma AST_Entry and the corresponding attribute are now fully implemented. Exception_Message now returns the name of the exception, together with the exception message if there is one (in previous versions of GNAT, this function yielded a null string). Latest features in GNAT version 3.08 ==================================== Unchecked conversion is now allowed for all definite types, including discriminated records with default discriminants. In addition, it is now permissible to convert from an unconstrained array type (but still not allowed to convert to an unconstrained array type, since no bounds information would be available). The storage management in the compiler has been considerably improved allowing larger programs to compile in a given virtual memory size. The pragmas Linker_Alias, Linker_Section and Weak_External have been added that give full access to the corresponding gcc features. With these additions, GNAT has all the capabilities of GNU-C with regard to specifying implementation dependent attributes. The attributes Large and Safe_Large now apply to fixed-point types as well as to floating-point types. With these additions, GNAT now implements the full set of Ada 83 attributes. The pragma Complex_Representation specifies that a record of two floats is to be laid out the same way as a complex value in Fortran. Biased representation is implemented for all discrete types. This means that values are stored with the lower bound value subtracted. For instance the range 10 .. 13 can be fit into 2 bits, with 10 .. 13 represented as 0 .. 2. Biased representation can be specified for subtypes, using the Size or Value_Size attribute to specify a size that requires biasing, or for objects, by specifying size, or for components, by specifying the component size using a component clause, and finally for array components by specifying a component size for the array. Biased representation is never selected by default. The only way that biased representation is used is if a size specification would otherwise have been rejected, but a biased representation can allow the specified size to be honored. The binder has been enhanced to generate more a more friendly binding order, i.e. one more likely to avoid access before elaboration. In addition a new switch -h for the binder (-h for horrible) chooses a deliberately bad elaboration order, which can be useful for testing code that is supposed to be portable. The Version and Body_Version attributes are no longer based on time stamps, but rather on the contents of the source files themselves. This has two important advantages. First the values are the same on different targets, facilitating heterogenous distribution. Second, trivial changes (changes in layout, capitalization of keywords/identifiers, or comments) do not affect the version number. The binder now uses version numbers as well as time stamps. This means that the binder will not force recompilation for trivial changes (as described above), giving a limited form of smart recompilation. Latest features in GNAT version 3.07 ==================================== GNAT now checks for the case of a body file present when the spec does not require a body. GNAT always diagnosed the error when the body was compiled, but if only the spec was compiled, the suspicious body was ignored. The presence of a body file when no body is allowed is now considered an error in Ada 95 mode, and a warning in Ada 83 mode. Packed arrays with bounds depending on a discriminant now work correctly The DEC pragmas have been implemented. Those of interest to GNAT ports in general are as follows (see below for full documentation) Common_Object Component_Alignment Export_Function Export_Object Export_Procedure Export_Valued_Procedure Import_Function Import_Object Import_Procedure Import_Valued_Procedure Suppress_All The DEC attributes have been implemented. Those of interest to GNAT ports in general are as follows (see below for full documentation) Bit Machine_Size Null_Parameter Type_Class Attribute Mechanism_Code allows determination of the parameter passing mechanism chosen by GNAT, as possibly controlled by the Import, Export and C_Pass_By_Copy pragmas. Pragma Extend_System allows transparent extension of package System to accomodate definitions from other implementations of Ada. Machine code insertions have been completely implemented. A new section in gnatinfo.txt describes the use. Both code statements as such, and also intrinsic calls are available. The latter allow interspersing machine instructions in Ada code. Inlining of machine code procedures is fully supported. The pragma C_Pass_By_Copy is implemented in a manner that is completely compatible with the Intermetrics implementation of this pragma. The default mechanism for passing records to foreign convention subprograms is now by-reference. This can be modified by either use of one of the DEC extended Import/Export pragmas, or by use of the C_Pass_By_Copy pragma. Further extended support for representation clauses, including more cases of misaligned fields, and non-standard layouts. Record representation clauses no longer require that the position of all fields be specified. Pragma Error_Monitoring has been removed. This pragma was not used and had a number of conceptual and implementation problems. Latest features in GNAT version 3.06 ==================================== This version is available only from SGI, and is an intermediate version between the ACT 3.05 and 3.07 releases. Consult SGI for further details Latest features in GNAT version 3.05 ==================================== Implement tight array packing for component sizes up to 31 bits Relaxation of alignment and size rules allow more record rep clauses to be accepted and correctly processed. ACVC compliance for SGI matches that of the official validation --- And in addition many bugs have been fixed, and many additional semantic checks implementd.