From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32290 invoked by alias); 22 Nov 2012 15:49:08 -0000 Received: (qmail 32281 invoked by uid 22791); 22 Nov 2012 15:49:06 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Nov 2012 15:48:58 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAMFmwSK027871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 22 Nov 2012 10:48:58 -0500 Received: from zebedee.pink (ovpn-113-82.phx2.redhat.com [10.3.113.82]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAMFmtTJ003576; Thu, 22 Nov 2012 10:48:57 -0500 Message-ID: <50AE4967.8090007@redhat.com> Date: Thu, 22 Nov 2012 15:49:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: LAMOME Julien CS-SI CC: gcc-help@gcc.gnu.org Subject: Re: [C++] anonymous struct linkage References: <72041471EE7D1540B7ECD771EA430DB7062251ED@AMESS102.proton.intra.irsn.fr> In-Reply-To: <72041471EE7D1540B7ECD771EA430DB7062251ED@AMESS102.proton.intra.irsn.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00174.txt.bz2 On 11/22/2012 03:44 PM, 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 > > 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 ? That doesn't sound right. Please send us example code. Andrew.