FW: statically declared static structs with constructors procueces random symbol
Steven Seeger
sseeger@stellartec.com
Tue Nov 25 14:49:00 GMT 2003
(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
More information about the Gcc-bugs
mailing list