Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/pr79290.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-additional-options "-Wall" } |
2 // PR 79290, bogus warning looking inside PMF | |
3 | |
4 struct Song { | |
5 int get() const ; | |
6 }; | |
7 | |
8 typedef int (Song::*PMF_t)() const; | |
9 | |
10 struct SongTag { | |
11 PMF_t function () const; | |
12 }; | |
13 | |
14 | |
15 template<typename T> | |
16 struct Printer { | |
17 bool Foo(const SongTag &st) { | |
18 return st.function () == &Song::get; | |
19 } | |
20 }; | |
21 | |
22 void Baz (Printer<int> *p, SongTag const &st) | |
23 { | |
24 p->Foo (st); | |
25 } |