(j3.2006) nonstandard specifics of standard intrinsic generics

Robert Corbett Robert.Corbett
Thu Apr 17 05:16:21 EDT 2008


Bill Long wrote:
> 
> Robert Corbett wrote:
> 
>>Can a standard-conforming processor provide nonstandard specific
>>interfaces of a generic intrinsic interface in addition to the
>>standard specific interfaces?  Existing implementations do, but
>>that can create conflicts with otherwise standard-conforming
>>programs.  In such a case, is the program or the processor
>>nonconforming?
>>  
> 
> 
> This is allowed.  See [2:36-41] in f03.

Please see the attached response I sent to Andy Vaught.

>>For example, suppose an implementation provides a nonstandard
>>specific interface for the function SQRT that takes an INTEGER
>>argument.  Consider the program
>>
>>       REAL FUNCTION SQRTI(I)
>>         SQRTI = SQRT(DBLE(I))
>>       END
>>
>>       PROGRAM MAIN
>>         INTRINSIC SQRT
>>         INTERFACE SQRT
>>           REAL FUNCTION SQRTI(I)
>>           END FUNCTION
>>         END INTERFACE
>>       END
>>
>>If the processor reports a violation of constraint C547 of
>>Section 5.1.2.8 of the Fortran 2003 standard for this program,
>>is the processor nonconforming?
>>  
> 
> 
> I don't see how this program is nonconforming.  The conditions of C547 
> are met here, so no error.  A processor that reports an error for this 
> code would seem to be nonconforming.

I stated that the implementation provides a nonstandard specific
interface for SQRT that takes an INTEGER argument.  That interface
conflicts with the specific interface of the generic interface.
The characteristics of the nonstandard intrinsic procedure and the
procedure in the interface do not differ as specified in 16.2.3.
Therefore, constraint C547 is violated.

You might have a point.  It might be that the standard allows a
processor to add nonstandard specific intrinsic interfaces to
generic intrinsics, provided it does not treat cases where they
cause conflicts with user generic interfaces as errors.  I don't
see a way a conforming program can tell if a generic intrinsic has
any nonstandard specific interfaces.  Therefore, if a processor
treats the standard and nonstandard specific interfaces
differently with regard to constraint C547, it might be able to
get away with providing nonstandard specific interfaces to
generic intrinsics.

Bob Corbett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: response.txt
Type: text/english
Size: 2476 bytes
Desc: not available
Url : http://j3-fortran.org/pipermail/j3/attachments/20080417/7b260725/attachment.bin 



More information about the J3 mailing list