This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FW: statically declared static structs with constructors procueces random symbol


(Resending because I forgot to include version information!)

I'm using GCC 3.3.2 on an i686-linux platform.

The following code will always produce a different .o file on output: --
class A
{
	public:
		A();
};

typedef struct thestruct
{
	A i;
};

static thestruct s;
-- (con.cpp)

Compiled with:

g++ -o con.o -c con.cpp

An strings output shows the difference in two consecutive
compilations:

_GLOBAL__I__ZN8dastructC1Evcon.cppyOEb7c

_GLOBAL__I__ZN8dastructC1Evcon.cppHEGJAa

Should this be the same in every compilation? We are hoping to calculate and
compare the crc of .o files as a way to ensure gcc is set up correctly on a
machine.

Thanks!

Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]