On Mar 8, 8:04 pm, fenwayfool <peterson.russ...@gmail.com> wrote: > Does anyone know of portability issues regarding the implicit copy > constructor? > > I'm porting some code written for WIndows & Linux into an embedded > system. I have found that my stack gets corrupted (in the embedded > system) unless I create copy constructors for a few classes. It seems > that on Linux this is not required since the original code relied on > the implicit copy constructor. > > What complicates this a bit is that the objects in question have > objects in them based on templates. Since all the objects in question > have operator= defined, writing the copy constructor was easy... but > I'm still not sure I solved the memory corruption issue or just moved > it so things just appear to work. > > The compilers used are very different... I don't have the versions > handy but 1 is g++ on red hat while the other is a g++ cross compiler > for PPC. > > Anyone have some advice?
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- infodir=/usr/share/info --enable-shared --enable-threads=posix -- disable-checking --with-system-zlib --enable-__cxa_atexit --disable- libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux Thread model: posix gcc version 3.4.6 20060404 (Red Hat 3.4.6-9) Using built-in specs. Configured with: /usr/wrs/WindRiver64a/gnu/3.4.4-vxworks-6.4/gcc/ configure --prefix=/usr/wrs/WindRiver64a/gnu/3.4.4-vxworks-6.4/x86- linux2 --target=powerpc-wrs-vxworks --host=i686-linux --enable- languages=c,c++ --disable-shared --disable-checking --with-gxx-include- dir=include/c++/3.4.4 --enable-version-specific-runtime-libs Thread model: vxworks gcc version 3.4.4 (Wind River vxworks-6.4) (built 20060808) Library SPR fixes: 110583 _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus