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