Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wuninitialized-11.C
bloba6e8beb57402bcb35ba4c675b828f82a5e5b568c
1 /* PR middle-end/96295 - -Wmaybe-uninitialized warning for range operator
2    with reference to an empty struct
3    { dg-do compile }
4    { dg-options "-Wall" }
5    { dg-require-effective-target c++11 } */
7 struct I
9   bool operator!= (const I&) const;
10   void* operator* () const;
11   I& operator++ ();
14 struct A
16   I begin () const { return I (); }
17   I end () const { return I (); }
20 void f (void)
22   for (void *p : A ())   // { dg-bogus "\\\[-Wmaybe-uninitialized" }
23     {
24       (void)p;
25     }