public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Fortran C interoperabiltiy documentation
@ 2019-06-21 21:47 NightStrike
  2019-06-24  8:05 ` N.M. Maclaren
  0 siblings, 1 reply; 2+ messages in thread
From: NightStrike @ 2019-06-21 21:47 UTC (permalink / raw)
  To: fortran, gcc-help

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fortran C interoperabiltiy documentation
  2019-06-21 21:47 Fortran C interoperabiltiy documentation NightStrike
@ 2019-06-24  8:05 ` N.M. Maclaren
  0 siblings, 0 replies; 2+ messages in thread
From: N.M. Maclaren @ 2019-06-24  8:05 UTC (permalink / raw)
  To: NightStrike; +Cc: fortran, gcc-help

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-24  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-21 21:47 Fortran C interoperabiltiy documentation NightStrike
2019-06-24  8:05 ` N.M. Maclaren

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).