Created
January 18, 2012 20:20
-
-
Save justinsb/1635304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir test2 | |
cd test2 | |
cat > test.cc <<EOF | |
#include <memory> | |
#include <iostream> | |
#include <stdexcept> | |
using namespace std; | |
int main() { | |
try { | |
throw invalid_argument("Hello world"); | |
} catch (exception& e) { | |
cerr << "Caught exception\n"; | |
} | |
return 0; | |
} | |
EOF | |
g++ -m32 test.cc; ./a.out | |
# Caught exception | |
g++ -m64 test.cc; ./a.out | |
# terminate called after throwing an instance of 'std::invalid_argument' | |
# Abort (core dumped) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment