From rz48@rz.uni-karlsruhe.de  Sun Dec  8 20:25:42 1996
Received: from nz11.rz.uni-karlsruhe.de (nz11.rz.uni-karlsruhe.de [129.13.64.7]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id UAA09146 for <sc22wg5@dkuug.dk>; Sun, 8 Dec 1996 20:25:32 +0100
Message-Id: <199612081925.UAA09146@dkuug.dk>
Received: from ry73.rz.uni-karlsruhe.de by nz11.rz.uni-karlsruhe.de with SMTP (PP); Sun, 8 Dec 1996 20:24:33 +0100
Received: by ry73.rz.uni-karlsruhe.de
	(1.38.193.4/16.2) id AA24414; Sun, 8 Dec 1996 20:24:32 +0100
Subject: Error in N1235 (97-107)...
To: sc22wg5@dkuug.dk, sc22wg5-interop@ncsa.uiuc.edu
Date: Sun, 8 Dec 1996 20:24:31 +0100 (CET)
From: hennecke@rz.uni-karlsruhe.de (Michael Hennecke)
Reply-To: hennecke@rz.uni-karlsruhe.de (Michael Hennecke)
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Length: 1807      

In WG5/N1235 (X3J3/97-107) topic 1, I wrote in the first bulleted item:

>    extern void c_func ( int *i );
>
>  * It may well happen that #c_func# also modifies the value of #i# 
>    itself, because in C there are two possible uses of such a function:
> 
>      int f;                  int *g;
>      (void) c_func(&f);      (void) c_func(g);    /* these are CALLs */
> 
>    The call using the address #&f# of #f# is what the PASSBY("*") with
>    automatic address-of-actual-arg semantics supports, but not the call
>    with #g#. C functions dealing with the more general call with a 
>    pointer #g# may modify the dummy #i# itself, e.g. store any address 
>    in #i# instead of just modifying its target. This will break the 
>    Fortran program (at best). 

This is simply wrong -- must have been too late that day. Of course 
c_func may LOCALLY change the pointer #i# in addition to its target #*i#, 
but this will not have an effect on the caller since that pointer is 
passed in by value. Only changes in the target will be visible outside.

But the second bulleted item (passing in a null pointer) remains valid,
which is enough to keep that issue a key problem.

Sorry for any confusion I may have caused,
Michael

 ======================================================================
  Michael Hennecke      http://www.uni-karlsruhe.de/~Michael.Hennecke/ 
 ----------------------------------------------------------------------
  University of Karlsruhe         RFC822: hennecke@rz.uni-karlsruhe.de 
  Computing Center (G20.21 R210)               No longer on BITNET :-(
  Zirkel 2  *  P.O. Box 69 80                 Phone: +49 721  608-4862 
  D-76128  Karlsruhe                               Fax: +49 721  32550 
 ======================================================================
