public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ángel González" <keisial@gmail.com>
To: LAMOME Julien CS-SI <julien.lamome-cs-si@irsn.fr>
Cc: gcc-help@gcc.gnu.org
Subject: Re: [C++] anonymous struct linkage
Date: Thu, 22 Nov 2012 18:53:00 -0000	[thread overview]
Message-ID: <50AE7433.1060002@gmail.com> (raw)
In-Reply-To: <72041471EE7D1540B7ECD771EA430DB7062251ED@AMESS102.proton.intra.irsn.fr>

On 22/11/12 16:44, LAMOME Julien CS-SI wrote:
> Hi,
> we have a code mixing C++ and Fortran 77. In fortran, we have some COMMON like :
> COMMON / DEMOF/VARIABLE
> Which are include in fortran source file like this :
> #include <demof.include>
>
> We link with C++ code like this :
> struct { double variable}demof ;
>
> The problem is : 
> Between gcc 4.3 and gcc 4.6, the linkage of demof (in C++) change from global to local. This breaks the link between C++ and fortran.
>
> How can I restore the global linkage in gcc 4.6 ?
>
> Thanks you for your help.
It's probably not that it doesn't global linkage, but something else
like mangling (extern "C"), not going to the common section (although it
should, __attribute__ ((section ("common"))) ), that you want instead to
refer to it when defined from fortran (extern), etc.

What are you doing, how is it expected to work from each side, and what
are you getting?


  parent reply	other threads:[~2012-11-22 18:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 15:44 LAMOME Julien CS-SI
2012-11-22 15:49 ` Andrew Haley
2012-11-22 18:53 ` Ángel González [this message]
2012-11-22 21:03 ` Jonathan Wakely
2012-11-22 21:06   ` Jonathan Wakely
2012-11-23  7:58     ` LAMOME Julien CS-SI
2012-11-23  9:37       ` Jonathan Wakely
2012-11-26 15:49       ` Ángel González

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=50AE7433.1060002@gmail.com \
    --to=keisial@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=julien.lamome-cs-si@irsn.fr \
    /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).