Lines Matching full:note
6 // - this (5.1.1 [expr.prim.general]) [Note: when evaluating a constant
9 // pointer to the class object. -end note];
21 // literal class or a constexpr function [ Note: Overload resolution (13.3)
22 // is applied as usual - end note ];
24 static int f() { return 1; } // expected-note {{here}} in f()
25 …int n : f(); // expected-error {{constant expression}} expected-note {{non-constexpr function 'f' …
28 constexpr NonConstexpr2(); // expected-note {{here}}
33 …int m : NonConstexpr2().n; // expected-error {{constant expression}} expected-note {{undefined con…
36 NonConstexpr4(); // expected-note {{declared here}}
40 …int n : NonConstexpr4().n; // expected-error {{constant expression}} expected-note {{non-constexpr…
47 static constexpr int undefinedConstexpr1(); // expected-note {{here}}
48 …undefinedConstexpr1(); // expected-error {{constant expression}} expected-note {{undefined functio…
64 constexpr const int *return_param(int n) { // expected-note {{declared here}} in return_param()
68 …int n : *return_param(0); // expected-error {{constant expression}} expected-note {{read of variab…
85 …st be initialized by a constant expression}} expected-note {{temporary created here}} expected-not…
96 … // expected-note {{constexpr evaluation exceeded maximum depth of 128 calls}} expected-note 9{{in… in RecurseForever()
100 …/ expected-note {{constexpr evaluation exceeded maximum depth of 128 calls}} expected-note 9{{in c… in AlsoRecurseForever()
105 … int k : RecurseForever(0); // expected-error {{constant expression}} expected-note {{in call to}}
106 …int l : AlsoRecurseForever(0).n; // expected-error {{constant expression}} expected-note {{in call…
127 // - an operation that would have undefined behavior [Note: including, for
130 // shift operations (5.8 [expr.shift]) -end note];
134 …case (int)4.4e9: // expected-error {{constant expression}} expected-note {{value 4.4E+9 is outside… in f()
136 case (int)10000000000ll: // expected-note {{here}} in f()
139 …case (int)(float)1e300: // expected-error {{constant expression}} expected-note {{value 1.0E+300 i… in f()
141 …case (int)(__fp16)65536: // expected-error {{constant expression}} expected-note {{value 65536 is … in f()
147 …constexpr int minus_int_min = -int_min; // expected-error {{constant expression}} expected-note {{…
148 …constexpr int div0 = 3 / 0; // expected-error {{constant expression}} expected-note {{division by …
149 …constexpr int mod0 = 3 % 0; // expected-error {{constant expression}} expected-note {{division by …
150 …inus_1 = int_min / -1; // expected-error {{constant expression}} expected-note {{value 2147483648 …
151 …inus_1 = int_min % -1; // expected-error {{constant expression}} expected-note {{value 2147483648 …
153 …constexpr int shl_m1 = 0 << -1; // expected-error {{constant expression}} expected-note {{negative…
156 …constexpr int shl_32 = 0 << 32; // expected-error {{constant expression}} expected-note {{shift co…
160 …d value is undefined}} // expected-error {{constant expression}} expected-note {{left shift of neg…
164 …ned_off_end = 2 << 31; // expected-error {{constant expression}} expected-note {{signed left shift…
165 …d_2 = 0x7fffffff << 2; // expected-error {{constant expression}} expected-note {{signed left shift…
166 …overflow = 1024 << 31; // expected-error {{constant expression}} expected-note {{signed left shift…
169 …constexpr int shr_m1 = 0 >> -1; // expected-error {{constant expression}} expected-note {{negative…
172 …constexpr int shr_32 = 0 >> 32; // expected-error {{constant expression}} expected-note {{shift co…
184 …int n : f(p); // expected-error {{not an integral constant expression}} expected-note {{read of de…
191 …constexpr B *p = a[0] + 4; // expected-error {{constant expression}} expected-note {{element 4 of …
193 …constexpr A *pa = &b + 1; // expected-error {{constant expression}} expected-note {{base class of …
194 …constexpr B *pb = (B*)((A*)&b + 1); // expected-error {{constant expression}} expected-note {{deri…
195 …constexpr const int *pn = &(&b + 1)->n; // expected-error {{constant expression}} expected-note {{…
196 …constexpr B *parr = &a[3][0]; // expected-error {{constant expression}} expected-note {{array elem…
200 …constexpr A &ra = *nb; // expected-error {{constant expression}} expected-note {{cannot access bas…
201 …constexpr B &rb = (B&)*na; // expected-error {{constant expression}} expected-note {{cannot access…
204 …constexpr const int &nf = nb->n; // expected-error {{constant expression}} expected-note {{cannot …
207 …int(*)[4])nullptr)[2]; // expected-error {{constant expression}} expected-note {{cannot perform po…
213 …constexpr int k2 = ((C*)nullptr)->f(); // expected-error {{constant expression}} expected-note {{c…
214 …constexpr int k3 = (&c)[1].f(); // expected-error {{constant expression}} expected-note {{cannot c…
220 …= &a[2][0] - &a[1][0]; // expected-error {{constant expression}} expected-note {{subtracted pointe…
223 …[1][2].n - &a[1][0].n; // expected-error {{constant expression}} expected-note {{subtracted pointe…
225 …[0][1] - (A*)&a[0][0]; // expected-error {{constant expression}} expected-note {{subtracted pointe…
231 …constexpr int n2 = 65536 * 32768; // expected-error {{constant expression}} expected-note {{value …
233 …constexpr int n4 = n3 + 1; // expected-error {{constant expression}} expected-note {{value 2147483…
235 …constexpr int n6 = 3 * -715827883; // expected-error {{constant expression}} expected-note {{value…
237 …constexpr int n8 = -1 + n7; // expected-error {{constant expression}} expected-note {{value -21474…
239 …constexpr int n10 = n3 - -1; // expected-error {{constant expression}} expected-note {{value 21474…
241 …constexpr int n12 = -2 - n3; // expected-error {{constant expression}} expected-note {{value -2147…
242 …constexpr int n13 = n5 + n5; // expected-error {{constant expression}} expected-note {{value -4294…
243 …constexpr int n14 = n3 - n5; // expected-error {{constant expression}} expected-note {{value 42949…
244 …constexpr int n15 = n5 * n5; // expected-error {{constant expression}} expected-note {{value 46116…
248 …constexpr long long ll2 = ll1 + 1; // expected-error {{constant}} expected-note {{ 922337203685477…
250 …constexpr long long ll4 = ll3 - 1; // expected-error {{constant}} expected-note {{ -92233720368547…
251 …constexpr long long ll5 = ll3 * ll3; // expected-error {{constant}} expected-note {{ 8507059173023…
257 …00000u] - &melchizedek[0]; // expected-error {{constant expression}} expected-note {{ 2147483648 }}
259 …melchizedek[0x80000001u]; // expected-error {{constant expression}} expected-note {{ -2147483649 }}
269 …constexpr float f2 = 1e38f * 3.4029f; // expected-error {{constant expression}} expected-note {{fl…
271 …constexpr float f4 = 1e38f / -.2938f; // expected-error {{constant expression}} expected-note {{fl…
272 …constexpr float f5 = 2e38f + 2e38f; // expected-error {{constant expression}} expected-note {{floa…
273 …constexpr float f6 = -2e38f - 2e38f; // expected-error {{constant expression}} expected-note {{flo…
274 …constexpr float f7 = 0.f / 0.f; // expected-error {{constant expression}} expected-note {{floating…
280 …ant expression}} expected-error {{integral constant expression}} expected-note {{non-literal type}} in __anon905e1dd40102()
287 // with a constant expression [Note: a string literal (2.14.5 [lex.string])
288 // corresponds to an array of such objects. -end note], or
289 volatile const int vi = 1; // expected-note 2{{here}}
292 …static_assert(vi, ""); // expected-error {{constant expression}} expected-note {{read of volatile-…
293 …static_assert(const_cast<int&>(vi), ""); // expected-error {{constant expression}} expected-note {…
294 …static_assert(vrci, ""); // expected-error {{constant expression}} expected-note {{read of volatil…
301 volatile int v; // expected-note {{not literal because}}
311 constexpr volatile S vs; // expected-note {{here}}
314 …static_assert(s.v, ""); // expected-error {{constant expression}} expected-note {{read of volatile…
315 …static_assert(const_cast<int&>(s.v), ""); // expected-error {{constant expression}} expected-note …
316 …static_assert(vs.i, ""); // expected-error {{constant expression}} expected-note {{read of volatil…
317 …cast<int&>(vs.i), ""); // expected-error {{constant expression}} expected-note {{read of volatile …
318 …static_assert(vrs.i, ""); // expected-error {{constant expression}} expected-note {{read of volati…
325 …onst S&&)(S)0).i, ""); // expected-error {{constant expression}} expected-note {{read of volatile-…
344 …constexpr int b = *bp; // expected-error {{constant expression}} expected-note {{read of member 'b…
350 …constexpr const int a2 = *pua; // expected-error {{constant expression}} expected-note {{read of m…
360 int c = 10; // expected-note 2 {{here}}
365 constexpr int &h(); // expected-note {{here}}
366 int &i = h(); // expected-note {{here}}
373 …int C : c; // expected-error {{constant expression}} expected-note {{read of non-const variable 'c…
374 …int D : d; // expected-error {{constant expression}} expected-note {{read of non-const variable 'c…
379 int H : h(); // expected-error {{constant expression}} expected-note {{undefined function 'h'}}
380 …int I : i; // expected-error {{constant expression}} expected-note {{initializer of 'i' is not a c…
391 …c_cast<const S*>(&s)->n; // expected-warning {{constant expression}} expected-note {{dynamic_cast}}
400 …st<const S*>(&s)->n; // expected-warning {{constant expression}} expected-note {{reinterpret_cast}}
403 …int m : (long)(S*)6; // expected-warning {{constant expression}} expected-note {{reinterpret_cast}}
435 … expected-error {{must be initialized by a constant expression}} expected-note {{typeid applied to…
484 …constexpr bool cmp() const { return &a < &b; } // expected-note {{comparison of address of fields … in cmp()
488 static_assert(A().cmp(), ""); // expected-error {{constant expression}} expected-note {{in call}}
492 …constexpr bool cmp() const { return &a.a < &b.a; } // expected-note {{comparison of address of fie… in cmp()
496 static_assert(B().cmp(), ""); // expected-error {{constant expression}} expected-note {{in call}}
514 …constexpr bool base1 = &e.c[0] < &e.d; // expected-error {{constant expression}} expected-note {{c…
515 …constexpr bool base2 = &e.c[1] < &e.e.f; // expected-error {{constant expression}} expected-note {…
516 …constexpr bool base3 = &e.e.f < &e.d; // expected-error {{constant expression}} expected-note {{co…
529 …constexpr bool v5 = qv >= pv; // expected-error {{constant expression}} expected-note {{unequal po…
532 …constexpr bool v8 = qv > (void*)&s.a; // expected-error {{constant expression}} expected-note {{un…
610 // expected-note{{reinterpret_cast}}