]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/src/c++98/ios_base_init.h
libstdc++: Move stream initialization into compiled library [PR44952]
[thirdparty/gcc.git] / libstdc++-v3 / src / c++98 / ios_base_init.h
1 // This is only in a header so we can use the system_header pragma,
2 // to suppress the warning caused by using a reserved init_priority.
3 #pragma GCC system_header
4
5 // If the target supports init priorities, set up a static object in the
6 // compiled library to perform the <iostream> initialization once and
7 // sufficiently early (so that it happens before any other global
8 // constructor when statically linking with libstdc++.a), instead of
9 // doing so in (each TU that includes) <iostream>.
10 #if __has_attribute(init_priority)
11 static ios_base::Init __ioinit __attribute__((init_priority(90)));
12 #endif