(j3.2006) COMPILER_OPTIONS and COMPILER_VERSION

Aleksandar Donev donev1
Fri Sep 19 13:31:15 EDT 2008


On Friday 19 September 2008 08:33, Lionel, Steve wrote:

> > Are the functions COMPILER_OPTIONS and COMPILER_VERSION required to
> > return the same value throughout the execution of a program
No, their results are not constants. I am not even sure they need to return 
the same result within one object file, but presumably this will be the case 
in practice.

>From what I remember, they are somewhat strange beasts in that they can be 
used in initialization expressions:

character, parameter :: my_options=compiler_options()

but they are not constants.

As to the bit in the note "A processor might include this information in an 
object file automatically, without the user needing to save the result of 
this function in a variable."
that was meant so that people can hexgrep the object files to see what they 
were compiled with. Apparently some compilers already include this in their 
object files.

This is all my recollection---Dick is the one that wanted these routines so he 
can explain better the intention.

Aleks
-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ Lawrence Livermore National Laboratory
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev




More information about the J3 mailing list