[C++] anonymous struct linkage

LAMOME Julien CS-SI julien.lamome-cs-si@irsn.fr
Thu Nov 22 15:44:00 GMT 2012


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.



More information about the Gcc-help mailing list