Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/test/codesize/libcxxabi_message.cpp
6175 views
1
struct Foo {
2
int counter = 5;
3
};
4
5
int main() {
6
// libc++abi will emit some checks for proper static initialization, which
7
// can call abort_message(). the point of this test is to see that getting
8
// that code does not lead to including printf logging which libc++abi
9
// does by default. And in general, that a tiny program like this should
10
// end up a tiny wasm file, with no other surprises.
11
static Foo foo;
12
return ++foo.counter;
13
}
14
15