Last active
May 8, 2019 03:06
-
-
Save bkerley/5a21aae4feb94fe9af341114c657392a to your computer and use it in GitHub Desktop.
cxx_goofin
This file contains hidden or 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
main.dSYM | |
main |
This file contains hidden or 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
/* | |
> clang++ --version | |
Apple LLVM version 10.0.1 (clang-1001.0.46.4) | |
Target: x86_64-apple-darwin18.5.0 | |
Thread model: posix | |
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin | |
> clang++ -o main -std=c++1y -g main.cpp | |
> ./main | |
asdf | |
*/ | |
#include <iostream> | |
#include <string_view> | |
struct __attribute__((packed)) cool_struct { | |
int first; | |
char second; | |
int third; | |
}; | |
constexpr int x = 69; | |
constexpr char bort[] = "bort"; | |
constexpr int y = 420; | |
constexpr struct cool_struct cool2 = { | |
.first = 32, | |
.second = 'x', | |
.third = 65535 | |
}; | |
int cool(std::ostream& w) { | |
struct cool_struct cool3 = { | |
.first = 15, | |
.second = 'y', | |
.third = 0xF00F | |
}; | |
w << x << bort << y << cool2.second << cool3.second << std::endl; | |
return 1234; | |
} | |
int main() { | |
std::cout << "asdf" << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment