On 13/02/2013 22:06, Edward Maros wrote:
I have a very simple piece of code that behaves differently depending if
it is compiled 32bit vs 64bit. Is this an issue with the compiler or how
it was packaged?

Probably the packaging as I've built gcc 4.7.2 and don't have the problem. I can't see a difference, ask me where to look.



$ cat t.cc
#include <stdexcept>

int main(int, char**)
{
  try {
     throw std::runtime_error( "Catch me if you can!");
  } catch(...) {
     return 0;
  }
  return 1;
}
$ g++ -m64 t.cc
$ ./a.out
$ file a.out
a.out: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available
$ ldd a.out
        libstdc++.so.6 =>        /opt/XXXX/lib/64/libstdc++.so.6
        libm.so.2 =>     /lib/64/libm.so.2
        libgcc_s.so.1 =>         /opt/XXXX/lib/64/libgcc_s.so.1
        libc.so.1 =>     /lib/64/libc.so.1
$ g++ --version
g++ (GCC) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -a
SunOS XXXX 5.10 Generic_147148-26 i86pc i386 i86pc




James.
_______________________________________________
users mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/users

Reply via email to