@@ -28,15 +28,25 @@ const int b = 3;
28
28
_Static_assert (b == 3 , "" ); // pedantic-ref-warning {{not an integer constant expression}} \
29
29
// pedantic-expected-warning {{not an integer constant expression}}
30
30
31
+ /// FIXME: The new interpreter is missing the "initializer of 'c' unknown" diagnostics.
31
32
const int c ; // ref-note {{declared here}} \
32
- // pedantic-ref-note {{declared here}} \
33
- // expected-note {{declared here}} \
34
- // pedantic-expected-note {{declared here}}
33
+ // pedantic-ref-note {{declared here}}
35
34
_Static_assert (c == 0 , "" ); // ref-error {{not an integral constant expression}} \
36
35
// ref-note {{initializer of 'c' is unknown}} \
37
36
// pedantic-ref-error {{not an integral constant expression}} \
38
37
// pedantic-ref-note {{initializer of 'c' is unknown}} \
39
38
// expected-error {{not an integral constant expression}} \
40
- // expected-note {{initializer of 'c' is unknown}} \
41
- // pedantic-expected-error {{not an integral constant expression}} \
42
- // pedantic-expected-note {{initializer of 'c' is unknown}}
39
+ // pedantic-expected-error {{not an integral constant expression}}
40
+
41
+ _Static_assert (& c != 0 , "" ); // ref-warning {{always true}} \
42
+ // pedantic-ref-warning {{always true}} \
43
+ // pedantic-ref-warning {{is a GNU extension}} \
44
+ // expected-warning {{always true}} \
45
+ // pedantic-expected-warning {{always true}} \
46
+ // pedantic-expected-warning {{is a GNU extension}}
47
+ _Static_assert (& a != 0 , "" ); // ref-warning {{always true}} \
48
+ // pedantic-ref-warning {{always true}} \
49
+ // pedantic-ref-warning {{is a GNU extension}} \
50
+ // expected-warning {{always true}} \
51
+ // pedantic-expected-warning {{always true}} \
52
+ // pedantic-expected-warning {{is a GNU extension}}
0 commit comments