J3/05-123r1 Date: 2005 Jan 24 To: J3 From: Dan Nagle Subject: Documenting Compiler Versions This paper is a "doneness" paper for the "Documenting Compiler Versions" feature for f03++, which got a Hate -> Love vote of 0-0-9-2 at 167, and has not been reconsidered since. What follows is pretty nearly 04-137, but I've fixed some bugs in that paper. Number: Title: Document Processor Version Submitted By: J3 Status: For Consideration References: Basic Functionality: Add to iso_fortran_env a processor defined character constant, scalar or rank-1, of processor-defined length, containing processor specified version information. Rationale: Many times, after a suspected compiler bug has been detected, the next step is to check a bug database. This lookup needs the compiler's version information to succeed. Today, this comes from a "-V" or "-version" command line option, or some other processor dependent means. Even when the bug is an application error, knowing the compiler version which first detected it is often helpful. Benchmarks and verifications also must document the exact processor used to compile the application. Estimated Impact: The Estimate is 3 on the John Reid scale. Processors would have to make their version strings available via a name in iso_fortran_env. Vendors might actually benefit from more detailed bug reports. Detailed Specification: Add to iso_fortran_env a default character constant or rank-1 constant array named processor_version. This will contain the processor-dependent version information. A Note is added to recognize that a sufficiently clever user may subvert simple implementations of this proposal by "mix-and-match"ing components of a processor. However, such actions are so far beyond the standard that nothing may be done beyond a simple warning. If defined by standard Fortran, it's declaration might appear similar to: character( len= *), parameter :: processor_version = & 'Ajax Fortran 2008 Version 0.99+ (beta)' or, perhaps: character( len= 72), dimension( 3), parameter :: & processor_version = [ 'Acme Fortran 2008 v 8.2a', & 'Acme SuperLinker v 5.6c', & 'Acme RTL v 3.4e' ] A programmer could add: write(*,*) trim( processor_version) or write(*,*) ( trim( processor_version( i), & i = 1, size( processor_version)) to an application to document the processor in use in the application's preconnected output file. Perhaps add a Note detailing that the usefulness of this feature may be subverted by users who mix-and- match components from several releases of a processor. History: at M167, paper J3/04-137, at M171, paper J3/05-123