]> git.lizzy.rs Git - rust.git/blob - tests/run-make/native-link-modifier-whole-archive/c_static_lib_with_constructor.cpp
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / run-make / native-link-modifier-whole-archive / c_static_lib_with_constructor.cpp
1 #include <cstdio>
2
3 // Since this is a global variable, its constructor will be called before
4 // main() is executed. But only if the object file containing it actually
5 // gets linked into the executable.
6 struct Foo {
7     Foo() {
8         printf("static-initializer.");
9         fflush(stdout);
10     }
11 } FOO;