You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
staticint disallowedStatic1 = 0; // hidden-warning {{'disallowedStatic1' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage}}
21
21
// Initialization might run more than once
22
-
staticconstdouble disallowedStatic2 = disallowedStatic1++; // hidden-warning {{initializeation of 'disallowedStatic2' may run twice when built into a shared library: it has hidden visibility and external linkage}}
22
+
staticconstdouble disallowedStatic2 = disallowedStatic1++; // hidden-warning {{initialization of 'disallowedStatic2' may run twice when built into a shared library: it has hidden visibility and external linkage}}
23
23
24
24
// OK, because immutable and compile-time-initialized
25
25
staticconstexprint allowedStatic1 = 0;
@@ -112,7 +112,7 @@ namespace GlobalTest {
112
112
inlinefloat disallowedGlobal1 = 3.14; // hidden-warning {{'disallowedGlobal1' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage}}
113
113
114
114
// Initialization might run more than once
115
-
inlineconstdouble disallowedGlobal5 = disallowedGlobal1++; // hidden-warning {{initializeation of 'disallowedGlobal5' may run twice when built into a shared library: it has hidden visibility and external linkage}}
115
+
inlineconstdouble disallowedGlobal5 = disallowedGlobal1++; // hidden-warning {{initialization of 'disallowedGlobal5' may run twice when built into a shared library: it has hidden visibility and external linkage}}
116
116
117
117
// OK because internal linkage, so duplication is intended
118
118
staticfloat allowedGlobal1 = 3.14;
@@ -178,4 +178,4 @@ inline int allowedTemplate2 = 0;
0 commit comments