(j3.2006) (SC22WG5.3681) [ukfortran] N1755: Request for new features from MPI Forum

Bill Long longb
Thu Nov 13 20:35:07 EST 2008



Robert Corbett wrote:
> The committe might have intended PROTECTED to be something other than
> a promise made by the programmer, but the standard as written makes it
> exactly that.  Just because INTENT(IN) has a similar defect does not
> make it any the less true.
>
> The standard as written allows a compiler to assume that a variable
> that has the PROTECTED attribute is not definable outside the module,
> but it allows programs to be written that define the variable outside
> of the module and it does not require the processor to detect the error.
> If a programmer writes a program that defines the variable outside the
> module, it is not a standard-conforming program, and so a
> standard-conforming processor is free to do anything whatever when
> compiling or executing the program.  The onus is on the programmer to
> avoid defining the variable outside the module.
>
>   

The first sentence says the standard allows a programmer to do X.  The 
second one seems to say that IF the programmer does X, the program is 
not standard conforming.   That seems a bit contradictory.

Cheers,
Bill


-- 
Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            




More information about the J3 mailing list