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
[C2y] Implement WG14 N3622 static used in an inline (#162877)
This paper removes the constraint that a static variable or function
cannot be used within an extern inline function. The diagnostic is still
being produced in earlier language modes for conformance reasons but has
always been accepted as an extension.
inlineintuseStaticMainFileInLineMarker(void) { // expected-note 2 {{use 'static' to give inline function 'useStaticMainFileInLineMarker' internal linkage}}
89
-
staticFunction(); // expected-warning{{static function 'staticFunction' is used in an inline function with external linkage}}
90
-
returnstaticVar; // expected-warning{{static variable 'staticVar' is used in an inline function with external linkage}}
89
+
staticFunction(); // expected-warning{{using static function 'staticFunction' in an inline function with external linkage is a C2y extension}}
90
+
returnstaticVar; // expected-warning{{using static variable 'staticVar' in an inline function with external linkage is a C2y extension}}
0 commit comments