public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: NightStrike <nightstrike@gmail.com>
Cc: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	   gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Fortran C interoperabiltiy documentation
Date: Mon, 24 Jun 2019 08:05:00 -0000	[thread overview]
Message-ID: <Prayer.1.3.5.1906240905290.6920@hermes-1.csi.cam.ac.uk> (raw)
In-Reply-To: <CAF1jjLvy75qGPV5UdzA=itdcqbSdy=04KezrQi-gjb3PAqNaEw@mail.gmail.com>

On Jun 21 2019, NightStrike wrote:

>https://gcc.gnu.org/onlinedocs/gfortran/Working-with-Pointers.html
>
>"If a pointer is a dummy-argument of an interoperable procedure, it
>usually has to be declared using the VALUE attribute. void* matches
>TYPE(C_PTR), VALUE, while TYPE(C_PTR) alone matches void**."
>
>What does "usually" mean in this context?  Under what conditions do we
>have to do this?

Just as it says.  Use VALUE to match 'void *' and not to match 'void **';
the former is more common in C interfaces.


Regards,
Nick Maclaren.

      reply	other threads:[~2019-06-24  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 21:47 NightStrike
2019-06-24  8:05 ` N.M. Maclaren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Prayer.1.3.5.1906240905290.6920@hermes-1.csi.cam.ac.uk \
    --to=nmm1@cam.ac.uk \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=nightstrike@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).