From owner-sc22wg5@open-std.org  Mon Dec  8 19:55:58 2008
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 5376DC178E0; Mon,  8 Dec 2008 19:55:58 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mailrelay1.lrz-muenchen.de (mailrelay1.lrz-muenchen.de [129.187.254.106])
	by www2.open-std.org (Postfix) with ESMTP id 89C50C178DC
	for <sc22wg5@open-std.org>; Mon,  8 Dec 2008 19:55:57 +0100 (CET)
Received: from [129.187.15.179] ([129.187.15.179] [129.187.15.179]) by mailout.lrz-muenchen.de with ESMTP; Mon, 8 Dec 2008 19:55:26 +0100
Message-Id: <493D6D9D.3030609@lrz.de>
Date: Mon, 08 Dec 2008 19:55:25 +0100
From: Reinhold Bader <Reinhold.Bader@lrz.de>
User-Agent: Thunderbird 2.0.0.18 (X11/20081112)
MIME-Version: 1.0
To: "WG5, " <sc22wg5@open-std.org>
Subject: Re: (j3.2006) (SC22WG5.3763)  Response on the TR29113 draft N1761
References: <20081207203535.92039C178D6@www2.open-std.org> <20081208183121.F21E4C178E4@www2.open-std.org>
In-Reply-To: <20081208183121.F21E4C178E4@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk



Aleksandar Donev schrieb:
> Hi,
> 
> I am still processing Reinhold's proposals, but this I have thought 
> about already:
> 
>> Issue 2 - polymorphism of assumed-type entity:
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Since no changes to the definition of C_LOC() have been introduced,
>> and this function is used to cast an object of TYPE(*) to a usable
>> type, the text beginning in line 92 of N1761 should be replaced by
> I am not sure I understand. If the dummy is TYPE(*), and the actual is 
> polymorphic, then the assumed type of the dummy becomes the dynamic 
> type of the actual. It is no longer polymorphic once you are inside the 
> procedure. So what is the problem with doing C_LOC on it?

   Could one not apply the same argument to C_LOC() itself? Why was
   a polymorphic argument to C_LOC() disallowed?
   (Not that I'm against lifting that restriction :-))

> 
>> "In the association of actual and dummy arguments, an assumed-type
>>  dummy argument is type and kind compatible with a non-polymorphic
>>  actual data argument of any type."
> I think there be some restriction that the type should be interoperable 
> if the procedure is BIND(C). But I am not sure it can be made to work. 
> It definitely requires more work.

   I don't think interoperability should be enforced here. It is not required
   for C_LOC() arguments either. One wants to be able to use handles.
> 
> Best,
> Aleks
> 
> _______________________________________________
> J3 mailing list
> J3@j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3

Regards
Reinhold
