g++, ld: Warning: size of symbol '_' changed (g++3.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am getting the following linker warning,

ld: Warning: size of symbol `markschar_' changed from 600 in bld/SRCA.o to 800 in
bld/SRCB.o

This is actually in old Fortran code compiled in g77. These are just functions called
from c++ code compiled under g++. My understanding is that this means that there are
multiple definitions of the symbol MARKSCHAR with different sizes.

MARKSCHAR is defined in a COMMON statement that declared two arrays,

      CHARACTER*2 ELEMENT, ELEMENT_LOOKUP
      COMMON /IGROUPMARKSCHAR/ELEMENT(MAXN), ELEMENT_LOOKUP(100)

This is in a COMMON file that is included in both src files (SRCA.FOR, SRCB.FOR). The
allocated size of the arrays is declared in the common file that is then included in
the src, so I don't see how there could be different different definitions with
different sizes.

Further the ELEMENT() and ELEMENT_LOOKUP() arrays don't appear anywhere in SRCA.FOR
and are only assigned or read in SRCB.FOR.

The size of MAXN = 300 and since the array is of CHARACTER*2, that would make the
size of ELEMENT(MAXN) 600, so I guess it is the ELEMENT(MAXN) that is being
complained about. This suggests that he value of MAXN has been changed to 400
somewhere, but MAXN is defined as PARAMETER in another included file.

      PARAMETER(MAXN = 300)

This is fairly old code and I have never seen this warning before.

This is compiled with gcc34/g++34/g77/GNU Make 3.81 under CentOS-5.9x86_64.

Any enlightenment would be appreciated.

LMH




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux