views:

104

answers:

0

We have a body of C++ code which is being ported from a RHEL4-based distro to RHEL-5-based. It used to compile with g++ 3.4.3, and now compiles with g++ 4.1.2. It turns out that there are local POD variables that are being used uninitialized, which is causing failures under the new environment -- not surprising, since C++ rules say that local POD structures are left uninitialized and therefore random.

I'm looking for an explanation of why this didn't bother us when compiled with 3.4.3, but is now wreaking havoc with 4.1.2. Is there maybe an obscure setting in the specs of gcc3 that helpfully initialized local POD variables?